> 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-subtly-different-responses.md).

# Username Enumeration via Subtly Different Responses

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

### Username Enumeration via Subtly Different Respons

The site is slightly vulnerable to the enumeration of user names as well as to the gross password force. / An account uses a username and password present in the provided wordlists. / Purpose: Find a valid user name, brute-force password, and then access the **My account** page.

#### Lab Data

* Wordlist of user names ( Authentication lab users ).
* Password Wordlist ( Authentication lab passwords ).
* Standard login form.

#### Step 1 – User Name List

1. Intercept the login form request and send it to **Intruder**.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-eb39d8ae818ad4fb4e614f3fc298d2e39480f237%2F%7BA9AEDE98-3182-4F84-8B46-6CDE553E6F73%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

* Run an attack on the **username** parameter using the user name wordlist.
* By default, the server returns the message:/ `Invalid username or password`.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b5e0a0350e7a99fe6777192848c0301eb43605c9%2F%7B67CBD3B5-A971-4FB9-BC5F-AE3223CE9A7A%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

* In **settings**dIntruder, set a condition for **do not match** this generic answer (in order to filter identical responses).

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c1f6f142ab6818ebfa877755af9cf7fcb93b9f7a%2F%7B5511E563-9259-4565-8B7A-F2D5BB4378E2%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

* In observing the results, we find an entry whose response differs slightly: / a response without the usual point in the message, associated with the user **alpha**.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2cbcc8f16c89de39ac7a09f123340a328432929c%2F%7BA935B1D0-1C22-4C85-9E6E-5086C6E04B2B%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

It is deduced that **alpha** is a valid user name.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e2f1235373a077f9486315c23f97a278fc152f3f%2F%7B3C49C1D2-8AA1-4E3F-A462-37A47F7A4F6E%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Step 2 – Brute Password Strength

1. Keep the same login request, with **alpha** fixed as username.
2. Configure Intruder to attack the **password** parameter, using the password wordlist.
3. Launch the attack and compare server responses.
4. For the password **123456**, the answer is a **302** marked as ok in the notes, indicating that the connection attempt was successful.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d7087c2d84c6a9966ffce47c635b50075ecf2d44%2F%7BBA33590D-70A6-451D-8F07-77A448F154FA%7D.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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-subtly-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.
