CSRF where token validation depends on request method
CSRF where token validation depends on request method: This lab's email change functionality is vulnerable to CSRF. It attempts to block CSRF attacks, but only applies defenses to certain types of requests. • PortSwigger • CSRF • csrf, lab2
This lab's email change functionality is vulnerable to CSRF. It attempts to block CSRF attacks, but only applies defenses to certain types of requests.
To solve the lab, use your exploit server to host an HTML page that uses a CSRF attack to change the viewer's email address.
You can log in to your own account using the following credentials: wiener:peter
I started of with intercepting the reuqest within burp-suite afterwards
I crafted with the CSRF PoC tool within burp following HTML:
history.pushState('', '', '/') document.forms[0].submit(); The email is updated
Though I didnt solve the lab but when I remove the post method it works.
history.pushState('', '', '/') document.forms[0].submit(); 