![]() |
|
Password Reset Poisoning: Intercepting and Manipulating Email Links - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449) +---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4) +----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47) +----- Thread: Password Reset Poisoning: Intercepting and Manipulating Email Links (/showthread.php?tid=6278632) |
Password Reset Poisoning: Intercepting and Manipulating Email Links - #AfterDark - Aug 27, 2024 Password Reset Poisoning:Intercepting, Manipulating Email Links This tutorial demonstrates how to exploit vulnerabilities in the password reset process by intercepting and manipulating email links using BurpSuite. This can allow an attacker to reset a user’s password and gain unauthorized access to their account. This guide is intended for educational purposes to enhance your penetration testing skills as part of OSCP training Step-by-Step Guide Prerequisites
Configuring BurpSuite
Configuring Browser to interact with BurpSuite
Initiating the Password Reset Process Trigger Password Reset Navigate to the Target Web Application's Password Reset Page:
Capture the Request Intercept the Request in BurpSuite:
Code `POST /reset_password HTTP/1.1 Host: example.com Content-Type: application/x-www-form-urlencoded Content-Length: 40Look for parameters like email or user_id. Forward the request to allow the email to be sent to the target's email address. Intercepting the Password Reset Email Receive the Email
Code https://example.com/reset_password?token=abcd1234***Capture the Reset Link*** Intercepting and Modifying the Reset Link Request
Code GET /reset_password?token=abcd1234 HTTP/1.1 Host: example.comLook for parameters like token, reset_token, email, or user_id. Identify which parameter controls the reset functionality. Modify the Parameters as Needed: Example 1: Change the token to another valid token if you have multiple accounts. Let's assume you have another valid token efgh5678: Code GET /reset_password?token=efgh5678 HTTP/1.1 Host: example.comExample 2: Change the email parameter to another valid email. Suppose the original request was: Code GET /reset_password?token=abcd1234&[email protected] HTTP/1.1 Host: example.comYou could change the email to an attacker-controlled email: Code GET /reset_password?token=abcd1234&[email protected] HTTP/1.1 Host: example.comUnderstand the Application's Logic: Analyze how the application validates the reset token. This can involve replaying the same request with slight modifications to see how the server responds. Check if the token is validated against the user's session or if it's independent. For example, some applications may bind the token to a specific IP address or session ID Forward the Modified Request:
Additional Examples and Techniques Example: Exploiting Parameter Manipulation Suppose the reset link contains multiple parameters including a user identifier: https://example.com/reset_password?token=abcd1234&user_id=123 You could change the user_id parameter to another valid user ID to see if the application allows resetting another user's password: https://example.com/reset_password?token=abcd1234&user_id=456 Example: Using BurpSuite Repeater for Token Manipulation
Mitigation Strategies To prevent password reset poisoning attacks, consider implementing the following security measures: Token Expiration:
Secure Token Generation
Rate Limiting:
Email Confirmation:
Logging and Monitoring:
Use HTTPS:
Hope you enjoy this tutorial by #AfterDark 😎 HackthePlanet! RE: Password Reset Poisoning: Intercepting and Manipulating Email Links - DramaKing - Aug 27, 2024 In the first example, how would changing the token for one password reset request for one attacker-controlled account to a token for another attacker-controlled account do anything useful? In the second example, are you saying that a token for one email could be valid for another? That would be pretty crazy and an easy bounty. RE: Password Reset Poisoning: Intercepting and Manipulating Email Links - #AfterDark - Aug 27, 2024 (Aug 27, 2024 07:02 PM)DramaKing Wrote: In the first example, how would changing the token for one password reset request for one attacker-controlled account to a token for another attacker-controlled account do anything useful? In the second example, are you saying that a token for one email could be valid for another? That would be pretty crazy and an easy bounty. Example one shows the enumeration steps of identifying the parameters for the password reset. By creating both accounts you are able to intercept and manipulate cookies and token to test the backend permission of the application. We utilize waybackurls as well to further help with this scenario. Example two is a perfect example of broken access controls by manipulating the account id. And yes very easy bounties indeed. Got a 7.9 high bounty on Airbnb with this same exact method. ;) Always think of bad habbits and lazy developers. They make it easy for us 😎 |