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

# Перечисление пользователей через едва различающиеся ответы

Заметки по лабораторным работам PortSwigger Web Security Academy о перечислении пользователей через едва различающиеся ответы, включая рабочий процесс эксплуатации, тестирование полезной нагрузки, проверку в Burp Suite и контекст устранения уязвимости.

### Перебор имен пользователей через слегка отличающийся ответ

Сайт немного уязвим к перечислению имен пользователей, а также к грубому подбору пароля. / У учетной записи используется имя пользователя и пароль, присутствующие в предоставленных списках слов. / Цель: найти действительное имя пользователя, подобрать пароль методом грубой силы, а затем получить доступ к **Мой аккаунт** страница.

#### Данные лаборатории

* Список имен пользователей (пользователи лаборатории аутентификации).
* Список паролей (пароли лаборатории аутентификации).
* Стандартная форма входа.

#### Шаг 1 – Список имен пользователей

1. Перехватите запрос формы входа и отправьте его в **Intruder**.

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

* Запустите атаку на **имя пользователя** параметр, используя список имен пользователей.
* По умолчанию сервер возвращает сообщение:/ `Неверное имя пользователя или пароль`.

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

* В **настройки**dIntruder, задайте условие для **не совпадают** этот общий ответ (чтобы отфильтровать идентичные ответы).

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

* При просмотре результатов мы находим запись, чей ответ немного отличается: / ответ без обычной точки в сообщении, связанный с пользователем **alpha**.

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

Можно сделать вывод, что **alpha** — допустимое имя пользователя.

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

#### Шаг 2 – Подбор пароля методом грубой силы

1. Оставьте тот же запрос входа, с **alpha** установленным именем пользователя.
2. Настройте Intruder на атаку **пароль** параметр, используя список паролей.
3. Запустите атаку и сравните ответы сервера.
4. Для пароля **123456**, ответом является **302** помеченный как ok в заметках, что указывает на успешность попытки подключения.

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