Skip to content
Account takeover Write-up Intermediate

Account Takeover via OTP Brute Force in E-commerce Platform .

The password reset endpoint accepted a 4-digit OTP with only a per-IP rate limit and no lockout or CAPTCHA, so an attacker could brute-force the code. By rotating source IPs through the Tor network, the attacker could guess the OTP and reset any account's password, leading to full account takeover.

waleedosamaeg Follow

Published on waleedosamaeg.medium.com

In short: The site trusted the OTP too much… And I was like: “Challenge accepted.” 😈

Waleed Osama, on waleedosamaeg.medium.com

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 OTP verification endpoint relied solely on per-IP rate limiting and lacked account-level lockout, CAPTCHA, or attempt limits, allowing IP rotation to bypass the protection.

Impact

An attacker could take over any account, including admin accounts, by brute-forcing the OTP, though the process was slow due to Tor.

What the attacker needed

Victim's phone number; Tor network access; automation script

The fix

The text suggests implementing rate limiting, adding CAPTCHA, and using time-based OTPs with session binding; it does not state that a fix was applied.

How it was found

  1. Request an OTP for the victim's phone number via the forgot password function.
  2. Send OTP guesses to the verification endpoint and observe the per-IP block after 10 attempts.
  3. Route requests through the Tor network and rotate identities when blocked to obtain fresh IPs.
  4. Run a script to brute-force the 4-digit OTP until a valid code is accepted.
  5. Use the valid OTP to reset the account password.

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.

A one-time password (OTP) is a short code sent to your phone to prove it is you. This site let someone keep guessing that code, only slowing them down by blocking one network address at a time. By switching network addresses, the attacker could guess the code and change the victim's password.

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.

More by waleedosamaeg

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.