Skip to content
Account takeover Write-up Intermediate

How I Bypassed OTP Like a Devil, Leading to Full Account Takeover

The OTP verification response could be modified by the client to change the type field to REGISTER and set the status code to 200, which the server accepted as valid. This allowed an attacker to take over any account linked to a phone number.

infosecwriteups.com

Published on infosecwriteups.com

Hello, hackers! Zero is back with another thrilling tale from my bug bounty adventures.

jirosec, on infosecwriteups.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

Impact

An attacker could take over any account linked to a phone number, gaining full control.

What the attacker needed

Ability to intercept and modify responses; victim's phone number

How it was found

  1. Intercept the OTP verification request after submitting a wrong OTP.
  2. Modify the response body to change the type field to REGISTER.
  3. Change the response status code to 200 OK.
  4. Forward the modified response to the server, which accepts it and allows account takeover.

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 log in with a one-time code (OTP), the server checks if the code is correct. Here, the server trusted the client's browser to say whether the check passed. By altering the response, an attacker could make the server believe the OTP was correct and register or log in as any user.

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.

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.