3 ms·
This attack vector requires: 1) previous authentication to a service. 2) service which supports destructive actions as guessable URLs. 3) "third-party cookie
by javajosh 15y ago
This attack vector requires:
1) previous authentication to a service.
2) service which supports destructive actions as guessable URLs.
3) "third-party cookie" support in the user agent. [1]
4) a visit to a page with a malicious resource construct (an image, script, iframe, external style sheet, or object). Note that this resource could be generated by JavaScript, although this is not necessary.
Sadly, the first three criteria are widely met. If we are to systematically remove this threat, then we have to look at removing each in turn:
1) Previous authentication to a service can be mitigated by simply logging out when you are done, but this is inconvenient and requires manual user intervention. However, there is an interesting possibility to limit "important" services to a separate process - a browser, an "incognito" window, etc.
2) Services should be built with an unguessable component that is provided just prior to calling by a known-good API, probably with additional referrer verification.
3) It is my belief that disabling third-party cookies is the right solution here: users rarely, if ever, get value from third-party cookies. Denying them would allow API authors to write simpler APIs that do not have a secret component, and would allow users to maintain the same behavior and login to all their services from the same browser.
4) While it seems that little can be done on this front apart from releasing some chemical agent into the atmosphere that made people trustworthy and good, actually it may be possible for browser makers to do some simple analysis of resource URLs to detect possible hanky-panky.
[1] https://en.wikipedia.org/wiki/HTTP_cookie#Privacy_and_third-party_cookies https://en.wikipedia.org/wiki/HTTP_cookie#Privacy_and_third-...
- eurleif 15y agoThird party cookie support isn't necessary. You could just use a link instead of an image.
- javajosh 15y agoYes, that's the active form of the attack. To me, the passive form is far more pernicious (you are taking destructive action passively). At least with the active form you know that you've done something unintentional. But this does imply that the final onus is on the programmers of services to design services that do not have guessable, destructive one-step inputs.
- eurleif 15y agoYou could use a redirect, too.
- javajosh 15y agoOk so I have two more ideas to mitigate this vector: 1) Rename "Third-party cookies" to "Evil Cookies" and lobby all browser vendors to disable them in all circumstances. They are enabled by default(!) in the major browsers presumably to placate advertising networks. 2) Introduce a new HTTP verb, SECURE, which browsers will not send to a third-party website under any circumstance, including navigation events. That would make requirement number four impossible to satisfy (even for links and redirects).