Re:CSRF: Cross-Site Request Forgeries
by adrr on Thursday July 19, 2012 @12:00PM
(#4266595)
If you have XSS attack vector on your site, the attacker can do almost anything including cookie access(for all cookies that aren't HttpOnly). Also CSRF protection doesn't protect against clickjacking attacks where the page is iframed set transparent and user is encouraged to click in a specific location(punch the monkey in the face) on the attackers page. Easiest solution is to use javascript to detect if your page is iframed and bust out of it.
[ Parent
| on HN ]
Re:CSRF: Cross-Site Request Forgeries
by jamessocol on Thursday July 19, 2012 @12:08PM
(#4266635)
For click-jacking, the easiest thing to do is to set the X-Frame-Options header, but I'll get to that. And it doesn't help IE <= 7, so you need to weigh cost/benefit and your user base there.
And we'll get to session hijacking and why your session cookies in particular should always be HttpOnly and preferably secure.