Skip to content
Info disclosure Write-up Beginner

⚙️ 01. — Username and Password Enumeration via Different Re

The login form returned different error messages depending on whether the username existed, so an attacker could tell valid accounts apart from invalid ones. With no rate limiting, the attacker could then brute-force the password for the discovered username and log in.

The4v1 Follow

Published on medium.com

3. 🖱️ Click the 302 row → check Response tab → confirm Location: /my-account

The4v1, 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 login handler returned distinct error messages (and response lengths) for a non-existent username versus a wrong password, and applied no rate limiting.

Impact

An attacker could confirm which usernames exist and, because there is no rate limiting, brute-force the matching password to take over the account.

What the attacker needed

Access to the login page; no rate limiting on login; a wordlist of candidate usernames

The fix

The login should return one generic error message for any failure, always perform the password hash to keep timing constant, and add rate limiting, lockout and CAPTCHA after repeated failures.

How it was found

  1. Submit fake credentials on the login page and capture the login request in the proxy.
  2. Send the request to Intruder, clear positions and mark only the username value.
  3. Load the candidate usernames wordlist and run a Sniper attack.
  4. Sort results by response length and open the outlier, which says the password was incorrect, giving the valid username.
  5. Reconfigure Intruder with the found username fixed and only the password marked, load the password wordlist and attack again.
  6. Sort by status code, find the redirect response, and log in with the discovered credentials.

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, the site checks your username and your password separately. Here it said 'invalid username' when the name did not exist but 'incorrect password' when the name did exist, which quietly tells an attacker which names are real. Once a name is known, the attacker can keep guessing passwords until one works.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.