Skip to content
Account takeover Write-up Intermediate

How I managed to hack User accounts of a billion-dollar sport platform

The application used a six-digit OTP for login and rate-limited wrong attempts only per IP address. An attacker could rotate source IPs to bypass the limit and brute-force the OTP, then log in to any user account.

vishnuraj Follow

Published on medium.com

This post is regarding one of my favorite types of vulnerability, Account takeover. I was able to execute an account takeover in a bugcrowd private program, which allows a complete takeover of user accounts.

vishnuraj, on 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This write-up covers an account takeover found in a private Bugcrowd program. The report does not name the organisation or the specific endpoints involved. The feature at issue is the login flow: the application authenticates users with a one-time password (OTP) sent to a linked email address or mobile number, and that OTP is the single source of authentication. There is no password step described in the report.

The vulnerability category given is Broken Authentication. The author frames account takeover as identity theft in which an attacker gains unauthorised access to another person's account, and notes that such accounts are valuable when they hold funds or access to products, services or stored value.

Setup

The report does not describe creating test accounts, assigning roles, or any particular application version. The tooling used for exploitation was:

  • AWS, used to provide the rotating source addresses
  • Burp Suite
  • The IpRotate Burp extension, linked in the report to its PortSwigger BApp Store page

Finding it

During initial recon and an application walkthrough, the author observed that the app uses OTP login. The OTP is a 6 digit number, and obtaining it normally requires access to the user's email account.

The first idea was to inspect the responses of the login requests to see whether the OTP leaked anywhere in them. It did not. The next step was to brute force the OTP, but the application had a proper rate limit in place and blocked consecutive wrong OTP attempts.

The interesting observation came from changing the source address: when the test OTP was sent from a different IP, the application did not block consecutive wrong tries. In other words, sending the test OTP from a different IP was not blocked, so rotating IP addresses bypassed the protection.

Exploitation

Step 1: Understand the login flow

The application sends an OTP to a linked email address or mobile number, and that OTP is the only authentication factor. The author illustrates the general email OTP flow with a diagram from an external tutorial:

https://www.arengu.com/tutorials/the-complete-guide-to-email-otp-flows From the original on medium.com

The HTTP request that the iOS application sends during login is shown in the report as a screenshot. The report does not reproduce the request as text, so its headers, parameters and body are not available here:

From the original on medium.com

Step 2: Confirm the OTP does not leak

Responses to the login requests were checked for the OTP. Nothing was found, so the OTP had to be guessed rather than read.

Step 3: Confirm the rate limit and find its weakness

Sending consecutive wrong OTPs from one address caused the application to block further attempts. Sending the same wrong OTPs from a different IP address was not blocked. A different IP address was not blocked.

Step 4: Build an IP rotation environment

To exploit this, every single request had to come from a different IP address. The author set this up with AWS, Burp Suite and the IpRotate addon:

From the original on medium.com

With the addon configured, each request can be sent from a different IP address. The report includes a proof of concept of the rotation working against a non-target system:

From the original on medium.com

Step 5: Brute force the OTP

With a fresh source address per attempt, the per-IP block never triggered, and the 6 digit OTP could be brute forced until the correct value was found. Submitting the correct OTP logged the attacker in to the target user's account, giving complete access to that account. The author reports that an attacker can gain access to any user account in less than a few minutes:

From the original on medium.com

Root cause

The rate limit blocked consecutive wrong OTP attempts from one IP address, but not from a different one. An attacker who sends each attempt from a different IP address is not blocked, so the 6 digit space can be searched. Because the OTP is the only authentication factor, a correct guess is equivalent to a full login.

Impact

Successful exploitation allows an attacker to gain access to any user account in less than a few minutes. Once inside, the attacker can reach the linked user's PII or saved credit card details. The author notes that the issue is more serious still if account takeover is possible on admin privileged users.

Fix

Variants to test

  1. Rotate source IPs against OTP or code verification on other applications. A positive result is that wrong codes are rejected indefinitely from fresh addresses while the same address is blocked after a few tries.
  2. Test whether the attempt counter follows the account rather than the IP: send failures from one address, then continue from another against the same account. If the second address is not blocked, the counter is per-IP.
  3. Check whether the OTP is invalidated after a successful login or after a fixed number of failures. A positive result is an OTP that stays valid across many attempts or sessions.
  4. Look for OTP leakage in login responses, as the author first did. A positive result is the code appearing in a response body, header or error message.
  5. Test the same per-IP weakness on password reset codes and other short numeric tokens, where the same throttling design is often reused.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

What happened, in plain words

A security researcher found a way to break into any user account on a private Bugcrowd program's application. The site let people log in by sending a one-time code (OTP) to their email or phone. The researcher discovered that the site blocked consecutive wrong guesses, but sending the test OTP from a different IP address was not blocked. By using many different IP addresses, the researcher could guess the 6-digit code over and over until it was correct, and then log in as that user. The author says an attacker can gain access to any user account in less than a few minutes. The researcher reported it through a private Bugcrowd program and wrote this write-up.

Context

This write-up is about an account takeover vulnerability found in a private bug bounty program on Bugcrowd. The author does not name the company. The report also does not list the specific web addresses (endpoints) that were involved.

The feature that had the problem is the login flow. Instead of asking for a password, the application sends a one-time password (OTP) to the user's linked email address or mobile number. That OTP is the only thing needed to log in. There is no password step described in the report.

The vulnerability is categorised as "Broken Authentication". Account takeover means an attacker gains unauthorised access to someone else's account. Such accounts are valuable because they may hold funds, access to products or services, or stored value like saved credit card details.

Setup

The report does not describe creating test accounts, assigning roles, or any particular application version. The tools used for exploitation were:

  • AWS: Amazon Web Services, a cloud computing platform used here to provide many different IP addresses.
  • Burp Suite: A tool used by security testers to intercept and modify web traffic between a browser and a server.
  • IpRotate: A Burp Suite extension (add-on) that automatically changes the source IP address for each request. The report links to its PortSwigger BApp Store page.

Finding it

During the initial reconnaissance (recon) and walking through the application, the author noticed that the app uses OTP login. The OTP is a 6-digit number. Normally, to get the OTP, you need access to the user's email account.

The first idea was to check the responses to the login requests to see if the OTP was leaked anywhere in them. It was not. The next step was to try to brute force the OTP, but the application had a proper rate limit in place: it blocked consecutive wrong OTP attempts.

The key observation came when the author sent the test OTP from a different IP address. The application did not block consecutive wrong tries. In other words, sending the test OTP from a different IP address was not blocked, so rotating IP addresses bypassed the protection.

Exploitation

Step 1: Understand the login flow

The application sends an OTP to a linked email address or mobile number, and that OTP is the only authentication factor. The author illustrates the general email OTP flow with a diagram from an external tutorial:

https://www.arengu.com/tutorials/the-complete-guide-to-email-otp-flows From the original on medium.com

The HTTP request that the iOS application sends during login is shown in the report as a screenshot. The report does not reproduce the request as text, so its headers, parameters and body are not available here:

From the original on medium.com

Step 2: Confirm the OTP does not leak

The author checked the responses to the login requests for the OTP. Nothing was found, so the OTP had to be guessed rather than read.

Step 3: Confirm the rate limit and find its weakness

Sending consecutive wrong OTPs from one address caused the application to block further attempts. Sending the same wrong OTPs from a different IP address was not blocked. A different IP address was not blocked.

Step 4: Build an IP rotation environment

To exploit this, every single request had to come from a different IP address. The author set this up with AWS, Burp Suite and the IpRotate addon:

From the original on medium.com

With the addon configured, each request can be sent from a different IP address. The report includes a proof of concept of the rotation working against a non-target system:

From the original on medium.com

Step 5: Brute force the OTP

With a fresh source address per attempt, the per-IP block never triggered, and the 6-digit OTP could be brute forced until the correct value was found. Submitting the correct OTP logged the attacker in to the target user's account, giving complete access to that account. The author reports that an attacker can gain access to any user account in less than a few minutes:

From the original on medium.com

Root cause

The rate limit blocked consecutive wrong OTP attempts from one IP address, but not from a different one. An attacker who sends each attempt from a different IP address is not blocked, so the 6-digit space can be searched. Because the OTP is the only authentication factor, a correct guess is equivalent to a full login.

Impact

Successful exploitation allows an attacker to gain access to any user account in less than a few minutes. Once inside, the attacker can reach the linked user's PII (personally identifiable information) or saved credit card details. The author notes that the issue is more serious still if account takeover is possible on admin privileged users. The report does not give a bounty amount, CVSS score or the program's final severity rating.

Fix

Variants to test

  1. Rotate source IPs against OTP or code verification on other applications. A positive result is that wrong codes are rejected indefinitely from fresh addresses while the same address is blocked after a few tries.
  2. Test whether the attempt counter follows the account rather than the IP: send failures from one address, then continue from another against the same account. If the second address is not blocked, the counter is per-IP.
  3. Check whether the OTP is invalidated after a successful login or after a fixed number of failures. A positive result is an OTP that stays valid across many attempts or sessions.
  4. Look for OTP leakage in login responses, as the author first did. A positive result is the code appearing in a response body, header or error message.
  5. Test the same per-IP weakness on password reset codes and other short numeric tokens, where the same throttling design is often reused.

Glossary

  • Account takeover: A type of attack where someone gains unauthorised access to another person's account.
  • API: Application Programming Interface; a set of rules that allows different software programs to communicate with each other.
  • AWS: Amazon Web Services; a cloud computing platform that provides various services, including the ability to use many different IP addresses.
  • Broken Authentication: A security weakness where authentication mechanisms (like login) can be bypassed or are improperly implemented.
  • Brute force: An attack method that tries many possible combinations (e.g. all 6-digit numbers) until the correct one is found.
  • Burp Suite: A tool used for security testing of web applications, allowing interception and modification of HTTP traffic.
  • Cookie: A small piece of data stored by a website in a user's browser, often used to maintain sessions.
  • CVSS: Common Vulnerability Scoring System; a standardised way to rate the severity of security vulnerabilities.
  • Endpoint: A specific URL or URI where an API or web service can be accessed.
  • HTTP request: A message sent by a client (like a browser or app) to a server, asking for a resource or action.
  • IP address: A unique numerical label assigned to each device connected to a computer network.
  • IP rotation: The process of changing the IP address used for requests, often to avoid detection or rate limits.
  • IpRotate: A Burp Suite extension that automatically rotates the source IP address for each request.
  • OTP (One-Time Password): A password that is valid for only one login session or transaction, often sent via email or SMS.
  • PII (Personally Identifiable Information): Information that can be used to identify a specific individual, such as name, email, or phone number.
  • Rate limit: A restriction on how many requests can be made within a certain time frame, to prevent abuse.
  • Recon (reconnaissance): The initial phase of gathering information about a target system.
  • Token: A piece of data used to authenticate a user or authorise an action, often replacing a password after login.
  • Vulnerability: A weakness in a system that can be exploited to compromise security.

More by vishnuraj

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.