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

# 通过细微不同的响应进行用户名枚举

### 通过细微不同的响应进行用户名枚举

该网站在用户名枚举以及粗暴的密码暴力破解方面略有漏洞。/ 一个账户使用了所提供的词表中存在的用户名和密码。/ 目的：找到一个有效的用户名，暴力破解密码，然后访问 **我的账户** 页面。

#### 实验室数据

* 用户名词表（认证实验室用户）。
* 密码词表（认证实验室密码）。
* 标准登录表单。

#### 步骤 1 – 用户名列表

1. 拦截登录表单请求并将其发送到 **Intruder**.

<figure><img src="/files/1f4ba54b63015df583bba7f45d97c6b4e1d9853e" alt=""><figcaption></figcaption></figure>

* 对……发起攻击 **username** 参数，使用用户名词表。
* 默认情况下，服务器返回消息：/ `用户名或密码无效`.

<figure><img src="/files/578b9b1a71a1f51c1fefee85237642cbd1c39b1c" alt=""><figcaption></figcaption></figure>

* 在 **设置**dIntruder，设置一个条件用于 **不匹配** 此通用响应（以便过滤相同的响应）。

<figure><img src="/files/937176e75509df6df3d647037e43c487d2a98d51" alt=""><figcaption></figcaption></figure>

* 观察结果时，我们发现有一条记录的响应略有不同：/ 一条消息中没有通常句点的响应，与用户相关 **alpha**.

<figure><img src="/files/a0fdd6fa035649a1a99de8bc64b5723074ad6d8f" alt=""><figcaption></figcaption></figure>

由此推断 **alpha** 是一个有效的用户名。

<figure><img src="/files/7261b49de70bcd502090d23b1d7969d489e601b0" alt=""><figcaption></figcaption></figure>

#### 步骤 2 – 暴力破解密码

1. 保持相同的登录请求，并将 **alpha** 固定为用户名。
2. 配置 Intruder 以攻击 **密码** 参数，使用密码词表。
3. 启动攻击并比较服务器响应。
4. 对于密码 **123456**，答案是一个 **302** 在备注中标记为 ok，表示连接尝试成功。

<figure><img src="/files/fe83e5ecefd755dd58bc251f5c81285d473c7ffe" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
