Lab: CSRF where token is not tied to user session
This lab's email change functionality is vulnerable to CSRF. It uses tokens to try to prevent CSRF attacks, but they aren't integrated into the site's session handling system.
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 have two accounts on the application that you can use to help design your attack. The credentials are:
With your browser proxying traffic through Burp Suite, log in to your account, submit the "Change email" form, and intercept the resulting request.
Make a note of the value of the CSRF token, then drop the request.
Open a private/incognito browser window, log in to your other account, and send the change email request into Burp Repeater.
Observe that if you swap the CSRF token with the value from the other account, then the request is accepted.