> 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).

# 不一致的安全控制

不一致的安全控制，PortSwigger Web Security Academy 实验笔记，包括利用流程、载荷测试、Burp Suite 验证以及修复上下文。

### 不一致的安全控制

**实验目标**

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

**初步观察**

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

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

访问 `/admin` 因此仅限属于以下群组的用户 **DontWannaCry** 域中存在的应用创建一个清单。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-00b61d550c80761c4d65153f3db8f1ae6e423d1a%2Fimage%20(221).png?alt=media" alt=""><figcaption></figcaption></figure>

**注册尝试**

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

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-98e59af6772b98d590529f0085d8a13439a0f565%2Fimage%20(224).png?alt=media" alt=""><figcaption></figcaption></figure>

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

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5a54ffad4a29badedc933d6a9bcbabe5cca8b43c%2Fimage%20(225).png?alt=media" alt=""><figcaption></figcaption></figure>

**账户验证**

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-af619b5a42ea8801e4110ff2ff329c737606e71d%2Fimage%20(226).png?alt=media" alt=""><figcaption></figcaption></figure>

使用的凭据是：

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

连接正常。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5ef776b0321aeeca5733e0b6904b5f3320e67e7d%2Fimage%20(227).png?alt=media" alt=""><figcaption></figcaption></figure>

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

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

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

对此更改的合法性没有任何校验。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d66e12ee6fb36b1bab6e11f7265e81e61bb064fd%2Fimage%20(228).png?alt=media" alt=""><figcaption></figcaption></figure>

**访问管理界面**

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e9764a777490eae8513db1f813f3ac108f655a4c%2Fimage%20(229).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/zh/web/business-logic/inconsistent-security-controls.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.
