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

# Username Enumeration via Different Responses

Username Enumeration via Different Responses notes for PortSwigger Web Security Academy labs, including exploitation workflow, payload testing, Burp Suite validation, and remediation context.

### Username Enumeration via Different Responses

The site is vulnerable to:

* enumeration of user names via different response messages;
* the gross-force password.

The aim is:

1. Find a valid username from a wordlist.
2. Brute-force the associated password, from another wordlist.
3. Log in and access the user account page.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ccf67dcce26dcb02361d0b122a217b0baf941691%2F%7B61DF05E8-D935-493C-A8BA-42F89F5BF167%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Setup

* The site offers a classic **login** form.
* There are lists of **usernames** and **passwords** provided by the lab.
* The connection request is intercepted to send to **Burp Intruder**.

#### 1. User List

1. Intercept a connection attempt and send it to **Intruder**.
2. Place a payload on the **username** parameter.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d64b3af1411e7ddc82aa5b4402b72fad22cbcc4c%2F%7B0A70DC87-588C-4D73-BCAF-F6C8640691A7%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

* Load the **wordlist of users** provided by the lab.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-343bb5b164b93bdf0b805791b01f94bc649de7c3%2F%7B046A8173-59EB-484C-ABCC-B98AFAA50EC1%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

1. Launch the attack and observe the answers (statute, length, etc.).

Note that for the user name **`apollo`**, the answer has a different **length** from the others.

→ This indicates that **`apollo`** is a valid **username**.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-880b9c0db9f438e08a0ef307ec12294cc17e1d3a%2F%7B299782D1-1A98-4977-89AD-8C95D9068556%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 2. Brute Password Strength

1. Resume the login request with **username fixed to `apollo`**.
2. Send the query again in **Intruder**.
3. Place the payload this time on the **password** parameter.
4. Load the **passwordlist** provided.
5. Launch the attack and analyze the answers.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b7ea540ea8a7329fdc8028f9da40afb6c901514f%2F%7B2AFE17EE-304B-469A-AD9D-EBBAD864C983%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

The **`mustang`** password produces a different **response** (e.g. length or content) indicating a successful **connection**.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f92948a7310a9632c0ef2d47e7803cabad1e056a%2F%7BE01944EF-74C1-4ACD-B148-FF4EB5AD9631%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 3. Final Login

Valid credentials are:

* **Username :** `apollo`
* **Password :** `mustang`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/web/authentication/username-enumeration-via-different-responses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
