> 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/business-logic/inconsistent-security-controls.md).

# 不一致的安全控制

### 不一致的安全控制

**实验目标**

该实验室存在一个与不一致安全检查相关的逻辑漏洞。/ 任意用户都可以访问通常仅供公司员工使用的管理功能。/ 目标是访问管理面板并删除该用户 **carlos**.

**初步观察**

当尝试直接访问管理界面时，将显示以下消息：

> *仅在以 DontWannaCry 用户身份登录时，管理员界面才可用*

可访问 `/admin` 因此仅限于属于以下域的用户 **DontWannaCry** 域中的应用程序清单。

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

**注册尝试**

使用以下信息注册一个新用户：

* **用户名**: `DontWannaCry` (已存在)
* **电子邮件地址**：由攻击者控制的地址/ `attacker@exploit-0a2500bc04ce231c81841ade012e0049.exploit-server.net`

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

提交表单后，应用程序提示：

> *请检查您的电子邮件以获取账户注册链接*

<figure><img src="/files/1117e9d9996baaf1ec2b5346dc9bbcfef6fabc67" alt=""><figcaption></figcaption></figure>

**账户验证**

会收到一封确认电子邮件，其中包含一个带有令牌的链接。

<figure><img src="/files/3440a1b3c0f8796cc501de96f20653313e827664" alt=""><figcaption></figcaption></figure>

使用的凭据是：

* **用户**: `DontWannaCry`
* **密码**: `jordan`

连接正常工作。

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

**电子邮件地址修改**

登录后，您无需进行任何额外验证即可更改账户电子邮件地址，使用：

```bash
jordan@dontwannacry.com
```

对此更改的合法性没有任何控制。

<figure><img src="/files/3e08dbb6c6e9aaec2e66c46138d8730f30af6de7" alt=""><figcaption></figcaption></figure>

**访问管理界面**

更改电子邮件后，系统现在将该用户视为属于以下域 **DontWannaCry**。/ 对以下内容的访问 `/admin` 界面随后被允许。

<figure><img src="/files/5c3562226e6c63252f9cc6d84623c14749194690" 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/business-logic/inconsistent-security-controls.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.
