Username enumeration via response timing
Last updated
Was this helpful?
Last updated
Was this helpful?
Lab Description
Upon visiting the login page, entering arbitrary credentials results in a rate-limiting error after multiple failed attempts, stating that you must wait 30 minutes.
This indicates brute-force protection is enabled.
Use Burp Suite to intercept the login request with arbitrary credentials such as test:test
.
The intercepted request contains two key parameters:
Username: The entered username.
Password: The entered password.
Send this intercepted request to Intruder for automation.
Based on the lab hint, the rate limiting can be bypassed by manipulating the X-Forwarded-For
header to spoof the IP address.
Test different headers until X-Forwarded-For
successfully allows bypassing the rate-limiting mechanism.
The lab leverages a timing-based username enumeration vulnerability:
When a valid username is entered, the server spends additional time verifying the password hash.
For invalid usernames, the server rejects the request immediately after checking the username
Mark Payload Positions:
Mark X-Forwarded-For
and username
as payload positions.
Use a long password to maximize the timing difference when hashing valid usernames.
Set Payload Sets:
Payload Set 1 (X-Forwarded-For): Generate sequential numbers or IP addresses to bypass rate limiting.
Payload Set 2 (Username): Use the provided wordlist of usernames.
Attack Type:
Select Pitchfork Attack to test both payloads simultaneously.
After executing the attack, observe the response times for each username.
Identify the username with a noticeably longer response time. This indicates a valid username.
Update the request in Burp Suite with the identified valid username.
Mark the password parameter as the payload position.
Load the provided password wordlist into Intruder.
A 302 Found
response indicates a successful login.
Use the identified valid username and password to log into the application.
Access the account page to confirm successful exploitation.