Lab: Password reset poisoning via middleware
To solve this lab, you have to mix different techniques seen in the previous labs of the same series in order to steal, once again, the cookie of this unfortunate Carlos.
On the home page, click “My account
Then, click “Forgot password”
Enter your username, “wiener” and click “Submit”
Access the email client through the exploit server (take the opportunity to keep the exploit server’s URL on a notepad for later)
Click the link
Enter twice a password (kept “peter” in this example) and click “Submit”
In Burp Suite > Proxy > HTTP History, find the POST request “/forgot-password” that contains the username “wiener”, send it to Repeater
In Repeater, add the header“
X-Forwarded-Host: <your exploit server URL>
”, change “wiener” to “carlos” and send itGo back to your email client, copy the link, paste it in a new tab, delete the token and don’t send it for the moment
Go back to the exploit server, click “Access logs”
Find the GET request for “/forgot-password” that contains the token for “carlos“
Go back to the new open tab (the one opened step 9), add carlos’s token at the end of the URL, where you deleted yours a few steps ago, and send it
Enter twice a password (entered “peter” as well for this account) and submit
Go to “My account” again
Enter Carlos’s new credentials and click “Submit”
The lab is solved