3 ms·
Interesting attack, but it only works for CSRF tokens included in a URL. If you instead place your tokens in hidden form fields (which I recommend, since you sh
by simonw 17y ago
Interesting attack, but it only works for CSRF tokens included in a URL. If you instead place your tokens in hidden form fields (which I recommend, since you should only need to protect POST requests) this attack won't affect you.
- timf 17y agoThe problem is not applications you code, it's ones that you use. Do you stop using a webapp once you see a session token in the URL?
- simonw 17y agoGood point - I was thinking about this entirely from the POV of an application developer.
- tptacek 17y agoDo you notice all the other crazy bad things that the applications you use do? This is not a particularly virulent attack.
- timf 17y agoSure. And I noticed the tokens in URLs but did not usually care that much since they are over https which doesn't reveal the parameters. Now I do care.
- philfreo 17y agoAnd it also only includes tokens that are short enough to be bruteforced, essentially in JavaScript. And it would only work for tokens that haven't already expired (isn't it pretty common practice to only let a token be used once?). All in all, it seems like most developers who know enough security to try to stop CSRF with tokens in the first place would create an implementation where the hack is useless. Still an interesting idea though.