# Username Enumeration via different responses

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEcfyp5SkvNY8ektBZ8%2Fimage.png?alt=media\&token=27ed81b9-d9f4-464f-9a66-5778cdc56012)

This lab can be solved using Burp Suite's intruder to perform a brute-force attack.

Using burp interception, we first input some random credentials and try to login on the website, noticing the "Invalid username" error.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEci5t4C6saYYOzep6n%2Fimage.png?alt=media\&token=f832e538-03c4-4706-a38a-fc88e10e8a29)

On burp, we send the intercepted response on the login form to intruder.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEciPaQfjRAdgZ069VQ%2Fimage.png?alt=media\&token=d81df620-722c-4951-a573-5bac704675cd)

The first step is to find the correct username, so we just run an attack with the usernames wordlist provided.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEckCCrnO5FStHqhnG5%2Fimage.png?alt=media\&token=3e98e25b-aaf0-4038-b313-2572c1fc50b2)

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEckRN91QfEyJbAX3jX%2Fimage.png?alt=media\&token=40acc80e-4b48-4a17-a6ac-121141e26a0e)

Having found our username, its time to find the correct password. The process is the same, but instead we use the correct username in the "Username" field and select the password field as our attack field, alongside the passwords wordlist.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEckzCbJYbJeq8FUIld%2Fimage.png?alt=media\&token=b6ab5182-0e5f-48be-9ad1-03e66c0588fd)

This time, instead of only looking at the length, we are also looking for a different status response. Every query will return a "200" status response, so we are looking for a "302" which means a URL redirection happened, or in other words, we were able to login.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEcmNM_HgI7LFUcXj19%2Fimage.png?alt=media\&token=838cf92c-af18-489f-a822-4d98f5257b30)

Using our brute-forced credentials we are able to login and complete the lab.

![](https://3889206050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6DIEHtstePxj4NCmCC%2F-MEZIEMExJRPfEzQOq80%2F-MEcmiWu1t5mp9QN26Nr%2Fimage.png?alt=media\&token=4054b2ed-6596-4561-ace0-5db48ee8c911)
