CSRF: Cross-Site Request Forgeries
coffeeonthekeyboard.com
coffeeonthekeyboard.com
The sandbox: http://google-gruyere.appspot.com/start
I don't think that the author implies that using POST prevents CSRFs but the article seems to imply it. In case anyone thinks it is the case: using POST won't prevent a CSRF.
Cross Site Request Forgeries occur when a user opens an "evil" page on site B, while being logged on site A. If site A solely relies on cookies in order to identify logged users, there is a risk of CSRF. The attack exploits the fact that the user's browser will always send the auth cookies when issuing a request to siteA. If the evil page on siteB embeds an image (or script, or any resource that can be loaded using an URL) whose source is an URL on siteA, the browser will request the resource on siteA with the auth cookie coming along.
In order to issue a POST request to siteA from the evil page, the attacker only has to submit a crafted POST form using an iframe.
Yes, but requiring POST for anything that changes anything (especially bank transfers) is a best practice anyway, for how all actors involved understand HTTP verbs, and reduces the surface area of attack.
You can create a POST with an iframe, but you can create a GET with an image tag: `<img src="http://mybank.com/transfer?...>`
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...
edit: maybe not grey but some colour which doesn't contrast with brown at all
One of those days
And we'll get to session hijacking and why your session cookies in particular should always be HttpOnly and preferably secure.
One way to exploit the Victim via XSS would be to convince them to browse to the compromised section of the site. Sometimes, that's as simple as getting them to click on a malformed URL -- basically, the same vector as getting them to click on your CSRF-ized link, anyway.
Many applications, however, don't have direct URLs to certain areas of the app. It could be hidden by Javascript/AJAX population, or written in a language/framework that doesn't support that kind of direct linking.
Therefore, if some kind of sensitive function is easily owned by CSRF (say, account.php?sendto=Eve), but the XSS is stored someplace obscure that might not be available via public URL (browse to Accounts -> Details -> My Bio, which populates dynamically), the higher threat severity would be the CSRF.
Sorry this turned kind of long, but I deal with a lot of webapp security issues on a day-to-day basis and feel relatively qualified to answer this one in some depth :)