Skip to content
Account takeover Write-up Beginner

Nothing changed… except for one detail. And that was enough to

The login form returned subtly different responses for a valid username with a wrong password versus an invalid username, allowing an attacker to enumerate valid usernames. After identifying a valid user, the attacker brute-forced the password and logged into the account.

phoenixcatalan Follow

Published on infosecwriteups.com

Some hackers tend to overlook authentication, even though it sits at the very heart of an application’s defense against malicious attacks.

phoenixcatalan, 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 application returned subtly different responses (such as error message wording or timing) for valid versus invalid usernames, leaking which accounts exist.

Impact

An attacker could enumerate valid usernames and then brute-force a user's password to gain access to their account.

What the attacker needed

A list of candidate usernames; a list of candidate passwords; ability to send many login requests

How it was found

  1. Submit a set of usernames with random passwords.
  2. Record every detail of server responses, including status code, redirects, on-screen information and differences in the HTML source.
  3. Detect subtle or obvious differences in server responses for all login attempts.
  4. Use the difference to obtain the list of valid usernames.
  5. Brute-force the password for the valid username.
  6. Log in to the account page.

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 try to log in, the website checks your username and password. If the site gives a slightly different message or behaviour depending on whether the username exists, an attacker can use that difference to find out which usernames are real. Once a real username is known, the attacker can focus on guessing its password.

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.