> For the complete documentation index, see [llms.txt](https://kyou00.gitbook.io/xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kyou00.gitbook.io/xyz/tcm/practical-web-hacking/authentication/lab-username-enumeration-via-different-responses.md).

# Lab: Username enumeration via different responses

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FQFxpHx0LB00q5fvGO4fy%2Fimage.png?alt=media&amp;token=2963f221-13f5-434b-90cd-eb450a9faadb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FtvCwfjnOs7cjUbT2La35%2Fimage.png?alt=media&amp;token=03f620dd-5d0c-45f4-b4c8-38d385f6e0be" alt=""><figcaption></figcaption></figure>

save the password and usernames

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2F0LsbCrS616eKFYp16DYD%2Fimage.png?alt=media&amp;token=be0f8246-12da-472d-a6d2-937aee70cefc" alt=""><figcaption></figcaption></figure>

access the lab

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FXMOFfCfnI8fVJTgA53EW%2Fimage.png?alt=media&amp;token=a648ff4f-38d6-4010-af7a-d980df26ae0d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FPTe0WNtH4wHsYErhRWdL%2Fimage.png?alt=media&amp;token=fc9b0782-9777-42d7-acb2-41a21966b38e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FfiMsjxndzlzE0UETL4rz%2Fimage.png?alt=media&amp;token=9b1e1878-50d7-4bc1-acc6-2ec6f0c9772c" alt=""><figcaption></figcaption></figure>

When we actually try to login as user that does not exist&#x20;

we get the error message

which means that we have to find the correct user&#x20;

that will return different result

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FJChfAKTsCSuu6ljYHd0o%2Fimage.png?alt=media&amp;token=c77a674f-a83b-4620-9265-7f61e9f4d18a" alt=""><figcaption></figcaption></figure>

see the request

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FM2lrzWLOvSO41JV8Hd6k%2Fimage.png?alt=media&amp;token=0a20248a-f60c-4018-9f03-c0fb0b19d495" alt=""><figcaption></figcaption></figure>

send to intruder

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FfjXmdge9HqptcpxMlr0U%2Fimage.png?alt=media&amp;token=01eb4a39-5b0d-4765-8ee9-739f7f2a826e" alt=""><figcaption></figcaption></figure>

load the usernames

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FCkkWYb07MYFnzPQkBowm%2Fimage.png?alt=media&amp;token=d22bd2fe-5241-44f7-8588-33fc164b2352" alt=""><figcaption></figcaption></figure>

We see different response from username app01

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2Fk18mH03XQEoXXZ9BNU4G%2Fimage.png?alt=media&amp;token=39999a57-a093-46ea-a46f-338456a72ec9" alt=""><figcaption></figcaption></figure>

Now we will use that username

put the curly braces in password parameter

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FVxIlI4tPXyd2D0wyoTr5%2Fimage.png?alt=media&amp;token=5c3549af-00d2-45d6-9d0a-a4c69ce99b61" alt=""><figcaption></figcaption></figure>

load password.txt

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FSMdPqXWD1LwgQPozj3LS%2Fimage.png?alt=media&amp;token=675765db-c74e-4fda-ad20-9f80cd58266c" alt=""><figcaption></figcaption></figure>

now we get different length and status code

302 status code means redirect to different page

which means like dashboard or account settings

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2F32puT2fkrz8MJZoKixfS%2Fimage.png?alt=media&amp;token=d2262600-1c81-48d2-aad2-999731d60270" alt=""><figcaption></figcaption></figure>

now try to login

```
app01:password
```

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FKDNFy0O8lVA7y6XRJ4DG%2Fimage.png?alt=media&amp;token=86b174bb-9b0c-41f6-9a95-78f1773d00a9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FeQptXAIeAb3WdgUkLBjD%2Fimage.png?alt=media&amp;token=14d50097-bc04-4bd0-8899-0fc7549b227c" alt=""><figcaption></figcaption></figure>

***

other way using ffuf

copy the file to req.txt

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FmLQxwh5EMRcrE5eDu7Qy%2Fimage.png?alt=media&amp;token=6549ec71-6ae3-4da7-aa7c-6a52f887f362" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FU3nModEoa7Lb861F9z8u%2Fimage.png?alt=media&amp;token=e19a092b-2c5f-4887-bc5f-ce3c1b2ae3c0" alt=""><figcaption></figcaption></figure>

{% code overflow="wrap" %}

```
ffuf -request req.txt -request-proto https -mode clusterbomb -w usernames.txt:FUZZUSER -w passwords.txt:FUZZPASS -mc 302
```

{% endcode %}

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2Fq320pD9AnQCJCS28PAVY%2Fimage.png?alt=media&amp;token=c2f7952d-a7f8-4875-a4b0-228f7f42ac02" alt=""><figcaption></figcaption></figure>
