Skip to content
Account takeover Write-up Beginner

My first bug bounty write-up about my first valid finding | A very simple ATO bug in a target who wasn’t running any bug bounty program (Bounty: 40K INR)

The target's OTP resend endpoint did not verify that the phone number belonged to the account being logged into, allowing an attacker to change the phone parameter to their own number and receive the OTP for the victim's account. This enabled account takeover. A similar flaw existed on the account deletion OTP endpoint.

Shubham Bhamare Follow

Published on infosecwriteups.com

Hi guys, I’m Shubham Bhamare from Maharashtra, India. It’s my first bug bounty write-up about my first valid bug which could have allowed a malicious user to take over any account on that target site.

Shubham Bhamare, 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 by receiving the victim's OTP on their own phone; the same flaw also affected the account deletion OTP endpoint.

What the attacker needed

Attacker has an account; victim has an account; attacker can intercept requests

The fix

The OTP resend endpoint should verify that the supplied phone number matches the account being authenticated, and the same check should be applied to the account deletion OTP flow.

How it was found

  1. Create two accounts: attacker and victim.
  2. From the attacker's side, start an OTP login for the victim's account using the victim's phone or username.
  3. Wait for the OTP to be sent, then after 60 seconds click 'Resend' and capture the request.
  4. Change the phone parameter in the request to the attacker's phone number.
  5. Forward the request; the attacker receives the OTP.
  6. Enter the received OTP to log in to the victim's account.

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 should only send that code to the phone number linked to your account. Here, the server trusted a phone number supplied by the user when resending the code, so an attacker could ask for the code to be sent to their own phone and then use it to log in as someone else.

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 Shubham Bhamare

View all

6 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.