Exploiting Timing-Based Username Enumeration and Credential Brute
The login endpoint responded more slowly for valid usernames than invalid ones, letting an attacker work out which accounts exist. The application also trusted a client-supplied forwarding header for rate limiting, so rotating that value allowed a password brute-force that found the account's password.
CyberSec Xploit | Prasangam Follow
Published on medium.com
This write-up documents the successful exploitation of a web application’s authentication mechanism to first enumerate a valid username via timing attack, then brute-force the corresponding password. The target was vulnerable to both username enumeration (through response time differences) and credential brute-forcing…
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 flow performed expensive work only for existing usernames, and rate limiting keyed on a spoofable forwarding header rather than the real client address.
Impact
An attacker could confirm which usernames exist and then guess the matching password without being blocked, gaining access to the account.
What the attacker needed
No account needed; network access to the login page
The fix
The login response should take the same time regardless of whether the username exists, and rate limiting should use the real client address rather than a client-supplied header.
How it was found
- Send login requests with candidate usernames and a very long password, timing each response.
- Identify the username whose response is much slower than the rest.
- Send password guesses for that username while changing the forwarding header each time to avoid blocks.
- Treat a redirect response as a successful login and confirm manually.
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 server checks whether your username exists and then whether the password matches. Here the server spent extra time only when the username was real, so measuring how long each reply took revealed which accounts exist. The site also counted login attempts per address taken from a header the client controls, so the attacker could pretend to come from many addresses and keep guessing passwords.
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.