CSRF Isn’t A Big Deal - Duh!

Wednesday, April 14, 2010

Cross-Posted from Robert "RSnake" Hansen's Blog:

Did you hear the news? CSRF isn’t a big deal. I just got the memo too! There were a few posts pointing me to an article on the fact that CSRF isn’t that big of a deal. Fear not, I am here to lay the smack down on this foolishness. To be fair, I have no idea who this guy is, and maybe he’s great at other forms of hacking - web applications just don’t happen to be his strong point. Let’s dissect the argument, just to be clear:

"Even with some of the best commercial Web vulnerability scanners, it’s very rare that I find cross-site request forgery (CSRF). That doesn’t mean it’s not there. Given the complexity of CSRF, it’s actually pretty difficult to find."

Huh? It’s difficult to find with a scanner so therefore it’s difficult to find period? Noooo… almost every single form on the internet is vulnerable to it unless it’s using a nonce. Just because scanners have a tough time dealing with it doesn’t mean it’s hard for a human to find. If you set down your scanner and do a manual pentest once in a while you’ll find that nearly every site is vulnerable to it in multiple places (.NET with encrypted ViewStates are the only sites that naively don’t have this problem regularly).

"The good news is it’s even more difficult to exploit CSRF which essentially takes advantage of the trust a Web application has for a user."

What the?! Difficult to exploit? If writing HTML and/or JavaScript is difficult, sure. However, if you have even the slightest idea of how how to create a form and a one liner JavaScript to submit it, or even worse a single image tag in a lot of cases, it’s not difficult. It’s not even mildly challenging. The only hard part is getting the user to click on that page with the payload, but even that should still be kitten play in almost all cases through web-boards, spear phishing and the like. Getting people to click on links is insanely easy. Maybe I’m not getting the difficult part. Also, that is a terrible way to think about CSRF - it’s not always about trust, it’s just about getting another user to commit an action on your behalf. Trust is only involve in some instances of CSRF - there are many many examples that have nothing to do with user credentials.

"So, based on what I’m seeing in my work I don’t think CSRF is as big of a deal - or perhaps I should say as top of a priority."

No, not top priority compared to something like SQL injection or command injection or something. But yes, it’s very much a big deal. Last week I did an assessment where one of the CSRF attacks would allow me to create a new admin user in the system. A huge percentage of the fraud on the Internet (TOS fraud, not actual hacking) is related to CSRF abuse (click fraud, affiliate fraud, etc…). We’re talking about hundreds of millions of dollars lost to a single exploit and only in those two variants. Like lots of exploits it totally depends on the problem at hand. Sorry, folks, CSRF is not getting downgraded because a piece of software can’t find the issue for you.

Possibly Related Articles:
Vulnerabilities Webappsec->General
CSRF Browser Security Web Application Security
Post Rating I Like this!
Ray Tan The existing commercial scanner can not detect the vulnerability does mean it is not there, as an experienced hacker, they can find it out manually.
We can not rely on the products totally, that's not the way we use it.
Angel Redoble This guy is all talk..and right on, web app hacking is not one of the forte of this guy. However, CSRF depends on the type of business the application is being used to. In banks for example, doing an internet banking would be the best target for CSRF. CRSF with link injection and unupdated session tokens..I'd say 99% you can rob somebody's bank account or information...if you know your stuff.

Probably this guy is using a different kind of web app scanner, a scanner that only detects a certain vulnerbaility and does not understand CSRF... :)


Most Liked