OTP Bruteforce Chained with Response Manipulation Leads to Zero Click Account Takeover
The password reset flow used a short numeric verification code that could be brute-forced because the server did not rate-limit attempts. An attacker could also bypass the code check by intercepting the response and changing a 'success' flag from false to true, leading to account takeover.
Published on medium.com
In today’s article, I’ll be sharing about an account takeover on a target which I found by chaining OTP bruteforce along with response manipulation so let’s get started.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server did not enforce rate limiting on verification attempts and relied on a client-side success flag to decide whether to allow the password reset.
Impact
An attacker could take over any account by brute-forcing the OTP or by manipulating the response to bypass verification, as demonstrated on the tester's own account.
What the attacker needed
Victim's email address; ability to intercept HTTP responses
How it was found
- Visit the forgot-password page and enter the victim's email address.
- Request a verification code and capture the verify-code request.
- Send the request to Intruder and set the code parameter to brute-force a range of numbers.
- Notice a different response length for the valid code.
- Intercept the response for an invalid code and change the success value from false to true.
- Forward the modified response and set a new password for the victim.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you reset a password, the site sends a code to your email. This site used a short number code and let someone try many codes quickly, and it also trusted a simple 'success' message from the server that could be edited in transit. By guessing the code or faking the success message, an attacker could set a new password for someone else's account.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.