> 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/password-brute-force-via-password-change.md).

# 通过修改密码功能进行密码暴力破解

### 通过修改密码进行密码暴力破解

本实验展示了密码修改功能中的一个漏洞 **修改密码**，从而允许通过……进行攻击 **暴力破解**。/ 目标是找出……的密码 **Carlos**，然后访问其页面 \*\*

**提供的凭据：**

* 用户： `wiener`
* 密码： `peter`

**目标用户：**

* `carlos`

有一个部分允许你在身份验证后修改密码。/ 当输入错误的 **当前密码** 时，应用程序会返回一条特定的错误消息。

<figure><img src="/files/9b3f3e2a465a1aa915174423b9aef091fd75160a" alt=""><figcaption></figcaption></figure>

应用程序发送的请求示例：

{% code overflow="wrap" %}

```bash
username=wiener&current-password=test&new-password-1=test1234&new-password-2=test123
```

{% endcode %}

如果 `current-password` 字段无效时，显示的错误提示表明当前密码不正确。

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

当替换 `wiener` 替换为 `carlos` 在查询中， **错误消息保持不变**，只要测试的密码不是正确的。配置一个 Burp Intruder 攻击

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

然而，对于 **正确的密码**，错误消息会发生变化：/ 应用程序不再提示密码错误，而是提示 **身份信息不匹配**.

这种响应差异使我们能够 **区分有效密码和无效密码**.

<figure><img src="/files/63148f979d9faf9a2c9ea8406fc3ac135b02dd93" 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/password-brute-force-via-password-change.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.
