> 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/pt-br/web/authentication/username-enumeration-via-different-responses.md).

# Enumeração de nome de usuário via respostas diferentes

Notas sobre enumeração de nome de usuário via respostas diferentes para os laboratórios do PortSwigger Web Security Academy, incluindo fluxo de exploração, teste de payload, validação no Burp Suite e contexto de remediação.

### Enumeração de nomes de usuário por meio de respostas diferentes

O site é vulnerável a:

* enumeração de nomes de usuário por meio de mensagens de resposta diferentes;
* a senha de força bruta.

O objetivo é:

1. Encontrar um nome de usuário válido em uma lista de palavras.
2. Fazer força bruta da senha associada, a partir de outra lista de palavras.
3. Fazer login e acessar a página da conta do usuário.

<figure><img src="https://783634792-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>

#### Configuração

* O site oferece um clássico **login** formulário.
* Há listas de **nomes de usuário** e **passwords** fornecidos pelo laboratório.
* A solicitação de conexão é interceptada para enviar ao **Burp Intruder**.

#### 1. Lista de usuários

1. Intercepte uma tentativa de conexão e envie-a para **Intruder**.
2. Coloque uma carga útil no **nome de usuário** parâmetro.

<figure><img src="https://783634792-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>

* Carregue a **lista de palavras de usuários** fornecidos pelo laboratório.

<figure><img src="https://783634792-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. Inicie o ataque e observe as respostas (status, comprimento, etc.).

Observe que, para o nome de usuário **`apollo`**, a resposta tem um **comprimento** diferente das outras.

→ Isso indica que **`apollo`** é válido **nome de usuário**.

<figure><img src="https://783634792-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. Força bruta da senha

1. Retome a solicitação de login com **nome de usuário fixo para `apollo`**.
2. Envie a requisição novamente em **Intruder**.
3. Coloque a carga útil desta vez no **senha** parâmetro.
4. Carregue a **lista de senhas** fornecida.
5. Inicie o ataque e analise as respostas.

<figure><img src="https://783634792-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>

O **`mustang`** a senha produz uma resposta diferente **resposta** (por exemplo, comprimento ou conteúdo) indicando uma conexão bem-sucedida **conexão**.

<figure><img src="https://783634792-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. Login final

As credenciais válidas são:

* **Nome de usuário :** `apollo`
* **Senha :** `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/pt-br/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.
