Cross Site Request Forgery
Cross site Request Forgery (CSRF) attacks forces the user to perform action the he did not intend to perform. This usually (only?) possible by creating a malicious URL-address that the victim executes in his browser, while he is logged in.
What's the worst that can happen?
The attacker can make actions for the user. For example change the email-address, make a purchase, or something like that. So it could be used to change the adress, and reset the password by sending an email.
How to perform it?
Investigate how the website works First you need to know how the application works. What the endpoints are.
Construct your malicious URL Now you just construct the URL. Either using get or post.
GETIf you use only
GETyou can construct the URL like this:
If the requests are sent as
POST you need to make the victim run a link that where you control the server. So that you can add the arguments in the body.
There is one creat trick for this. It is to use the image-tag. Because the image-tag can be used to automatically retrieve information from other sites. If you have an image on your site but it is referenced to
<img style="display: none" src="http://example.com/image.jpg">
The only real solution is to use unique tokens for each request.