Skip to content
On this page

Username Enumeration via Different Responses

Link: https://portswigger.net/web-security/authentication/password-based/lab-username-enumeration-via-different-responses

In this lab, we explore what the login process looks like and how users are informed when incorrect credentials are used.

For this exercise, we will use two lists that we see even before clicking "Access the lab":


Upon entering the lab, we are presented with this page:

Username enumeration via different responses main page

We click on "My Account" because we want to access the section related to "authentication".

We see the login panel:

Username enumeration via different responses login panel

Let's try to enter a made-up username and password, for example, adrian:password.

We see the message: "Invalid username":

invalid username

This likely means that there is no user with such a username in the system.

It's worth noting here that the error message should not reveal such information.

What instead? A better practice is to provide information like: "Invalid username or password", so as not to directly inform what was entered incorrectly.

Let's move on to Burp Suite to see what the HTTP communication looked like:

burp suite http communication

This is the POST request we used to log in.

I will use the Intruder tool to check if I can determine which of the list's users is the correct user.

I click on the request, selecting "Send to Intruder":

send to intruder

I go to the "Intruder" tab. In it, I select my "username" (line 23):

username in intruder

I click on the right side on "Add §" - so that "Intruder" takes this particular value into account and substitutes the list values that we will upload shortly.

We move to the "Payloads" tab:

payloads tab

From the page with usernames ( https://portswigger.net/web-security/authentication/auth-lab-usernames ), I copy all the usernames and paste them by clicking the "Paste" button:

paste the usernames

After clicking "Paste":

after paste clicking

We click on the right side "Start attack", then "OK" in the newly appeared window.