Skip to content
Account takeover Write-up Beginner

I Hacked Your Account with a 6-Digit PIN: The Brute-Force Nightmare You Need to Fix

A password reset PIN verification endpoint lacked rate limiting, allowing an attacker to brute-force all six-digit PINs. An attacker could guess the correct PIN and take over the victim's account.

infosecwriteups.com

Published on infosecwriteups.com

You know that “Forgot Password” link? The one you’ve clicked a thousand times?

Krishna Kumar, 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

Root cause

Likely the server did not enforce rate limiting or account lockout on the PIN verification endpoint, and it kept the reset session alive via a cookie, allowing unlimited guesses.

What the attacker needed

Victim's email address; no rate limiting on PIN endpoint; automation tool like Burp Intruder

The fix

The application should implement strict rate limiting, add CAPTCHA after failed attempts, and enforce short expiration times for reset tokens.

How it was found

  1. Capture a legitimate PIN verification request using a random PIN.
  2. Send the request to an automated attack tool and set the PIN as the payload position.
  3. Configure the payload to generate all numbers from 000000 to 999999 with six digits.
  4. Launch the attack and observe responses for a different status code or response length.
  5. Identify the correct PIN from the unique response.

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 password reset PIN is a short number sent to your email to prove you own the account. If a website lets someone try unlimited PINs without slowing them down, an attacker can use a tool to guess every possible PIN until they find the right one. This lets them reset your password and take over your account.

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.