Username enumeration via account lock
Last updated
Was this helpful?
Last updated
Was this helpful?
The lab description mentions a logic flaw in account locking. Upon initial testing:
Using a wrong username results in the error: "Invalid username or password."
After repeated attempts with an invalid username, the account does not get locked, suggesting account lockouts apply only to valid usernames.
This is an indication that we can use account lockouts as a mechanism to enumerate valid usernames.
The account lockout mechanism is usually triggered after multiple failed login attempts. However, we hypothesized that this logic might only apply to valid usernames and not invalid ones.
Burp Suite Intruder Configuration:
Payload Set: Used the Null Payload option, which generates a specific number of empty payloads (in this case, 50).
This allowed us to send 50 login attempts with the same invalid username.
Invalid Username Input:
We used an arbitrary (allegedly invalid) username and any random password.
The payload repeatedly sent requests with this invalid username.
The error message remained the same: "Invalid username or password."
Importantly, no lockout message was displayed, and the system did not mention being locked out due to too many attempts.
Configure Burp Suite Intruder.
Payload Set 1: Load the Candidate Usernames list.
Payload Set 2: Use Null Payloads (repeating each username multiple times).
Use the Cluster Bomb attack type to test each username 10 times with an invalid password.
Why repeat attempts?
A valid username will trigger an account lockout after multiple failed login attempts.
Invalid usernames will not trigger any lockout, and the response will stay consistent.
This will make burp send each username 10 times with the wrong password to trigger the lockout
Use Burp Suite's Grep - Extract feature to highlight responses.
Filter for differences in the error message or response length.
A valid username will display an account lockout message instead of "Invalid username or password.
Modify the Intruder attack to focus on brute-forcing the password.
Use Payload Set 1: Fixed username (valid).
Use Payload Set 2: Candidate passwords.
Notice a response length differs slightly, inspect the request.
A shorter response or the absence of an error message often indicates a successful login.
Using the identified password, log in with the valid username and confirm access to the account page.