CSRF
Introduction
<html> <body> <form action="https://vulnerable-website.com/email/change" method="POST"> <input type="hidden" name="email" value="pwned@evil-user.net" /> </form> <script> document.forms[0].submit(); </script> </body> </html>
Testing CSRF
Base Steps:
Bypass Method -1 : Change the request method POST → GET
POST → GETBypass Method - 2: Remove csrf param from POST request.
POST request.Bypass Method - 3: Feed your own account generated CSRF token in attack.
Bypass Method - 4 : Chain any other vulnerability to add your cookie for example XSS, CRLF → CSRF
XSS, CRLF → CSRFBypass Method - 5 : Delete the Referrer Header Completely or Suppress it.
Bypass Method - 6 : Try attacker.com or similar payload in referer header. (Validation of Referer can be circumvented)
Bypass Method - 7: Send null value in csrf token.
null value in csrf token.Mitigation
Reference
Author:
Last updated
Was this helpful?