CSRF
Cross Site Request Forgery (CSRF)
Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they’re currently authenticated. With a little help of social engineering (such as sending a link via email or chat), an attacker may trick the users of a web application into executing actions of the attacker’s choosing.
Overview and Prerequisites
Valuable Action: One needs to find an action that is worth exploiting, such as, changing user information.
Session: The user's session must only be managed by a cookie.
Exploitation
Both methods mentioned below can be distributed via social engineering
GET
This is a normal request to change a user's (
acc
) password (new_pass
) on a platformTo exploit this and change the password of the victim, one can do this:
POST
Basic request to change password
To exploit it, one needs to create a fake form which points to the URL that the they need with the attributes needed
Since the form needs to be sent, one can just make add an autosubmit functionality to the page:
References
Last updated