CSRF
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.
-Exploitation: A successful CSRF attack can force the user to perform state
changing requests like transferring funds, changing their email address, password,
etc.
Steps:
======
1. To perform the attack we need to first copy the page html code for the input
fields. It is usually in the <form> field.
2. In the form, give the complete url of the page for the action parameter where
the modifications are to be done.
5. Give your own value for the field you want to change. Ex : value="xyz"
Prevention Techniques:
1. Authenticating the user by asking the old password as well before making any
changes.
2. If the attacker knows the old password as well, in that scenario the developer
needs to implement CSRF tokens.