Skip to content
Account takeover Write-up Beginner

Bypassing Rate Limit Protection to Account Takeover

The login page's rate limiting could be bypassed by adding an X-Forwarded-For header with a different IP address, allowing an attacker to make many password guesses without being blocked. The author demonstrated that by rotating the header value, they could guess the correct password on the 99th attempt, leading to account takeover.

sohailahmed0x0 Follow

Published on medium.com

In this blog, I will share my finding in which I was able to bypass Rate Limit Protection on the Login page and was also able to show a valid POC for Account Takeover.

Sohail Ahmed, 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.

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 application used the client-supplied X-Forwarded-For header to identify the source IP for rate limiting, instead of using the actual connection IP or a trusted proxy chain.

Impact

An attacker could perform a brute-force attack against the login page without being rate-limited, potentially leading to account takeover.

What the attacker needed

A valid email address; ability to send custom HTTP headers; no account lockout after many attempts

How it was found

  1. Enter valid email and a wrong password on the login page and capture the request.
  2. Send the request to Burp Intruder and try about 50 random passwords to trigger a 429 Too Many Requests response.
  3. Add an X-Forwarded-For header with a different IP address to the request and observe the response change from 429 to 403, indicating the rate limit is bypassed.
  4. Use Burp Intruder's Pitchfork attack type with two payload positions: one for the X-Forwarded-For IP and one for the password.
  5. Set the IP payload to numbers from 2 to 100 and the password payload to 98 random passwords followed by the correct password.
  6. Run the attack and observe that the correct password is accepted on the 99th attempt without being blocked.

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.

Rate limiting is a security measure that stops someone from trying too many passwords quickly by blocking them after a few attempts. Here, the website trusted a header called X-Forwarded-For, which is supposed to show the real IP address of the visitor, but an attacker can set it to any value. By changing that header for each attempt, the attacker tricked the website into thinking each try came from a different computer, so the block never triggered.

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 sohailahmed0x0

View all

1 more disclosed report, 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.