Live data from Hacker News

CSRF: Cross-Site Request Forgeries

coffeeonthekeyboard.com

21–22 of 22 posts

Re: CSRF: Cross-Site Request Forgeries

#21
post #12

Earlier quoted context omitted.

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…

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 And we'll get to session hijacking and why your session cookies in particular should always be HttpOnly and preferably secure.

Thanks for the info, didn't know about the header.

Re: CSRF: Cross-Site Request Forgeries

#22

This is a decent article, but it's really just another "use your framework to mitigate CSRF" article. There's probably been hundreds of them in the last five years. Useful for junior devs who haven't seen it before; uninteresting for most everyone else.

Speaking as someone who is still, arguably, a "junior dev", and who started reading Hacker News as a far-more-junior dev, getting these topics on your radar has to happen somehow. I've learned about many topics' existence by simply bumping into articles like this, and checking the comments to learn more.

I do agree the article is little more than introductory, but rather than complain, let's provide some more in-depth links for those who want to learn:

http://www.slideshare.net/guestdb261a/csrfrsa2008jeremiahgro...

http://appsandsecurity.blogspot.com/2012/01/stateless-csrf-p...

Post reply on HN