> 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-management-of-exceptional-entries.md).

# 对异常条目的不一致管理

### 异常输入处理不一致

**实验说明**

该实验室展示了注册过程中对用户输入的验证不充分。这个逻辑缺陷使得可以访问通常仅供员工使用的管理功能。/ 目的：访问管理面板并删除用户 **carlos**.

<figure><img src="/files/21c459e6329c8535e7f672bf1270961def686cbe" alt=""><figcaption></figcaption></figure>

**初步观察**

注册后，验证邮件会发送到所提供的地址。/ 运行服务器会接收与该域及其子域相关的\*\*所有邮件\*\*：

```bash
@exploit-0a8c00a504628ac58246f51601c6009c.exploit-server.net
```

<figure><img src="/files/0518168097386fee7ea9f80f8938fdb9da2315b9" alt=""><figcaption></figcaption></figure>

因此，使用该域或其子域创建的任何地址都是可接受的。

<figure><img src="/files/8d42454eeefac5cc83664c81fd4904eb03e71f87" alt=""><figcaption></figcaption></figure>

**已识别异常行为**

通过创建一个在 `@` 符号前包含大量字符的邮箱地址，我们发现该字段\*\*

{% code overflow="wrap" %}

```bash
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@exploit-0a8c00a504628ac58246f51601c6009c.exploit-server.net
```

{% endcode %}

这个限制会导致实际存储的值与显示或用于安全检查的值之间不一致。

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

**漏洞运作方式**

目标是强制发生截断，使注册的邮箱最终恰好以 `dontwannacry.com` 信任区域。

长度验证：

{% code overflow="wrap" %}

```bash
eecho -n "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@dontwannacry.com" | wc -c
```

{% endcode %}

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

一旦达到255个字符，最终地址会按如下方式构造：

{% code overflow="wrap" %}

```bash
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@dontwannacry.com.exploit-0a8c00a504628ac58246f51601c6009c.exploit-server.net
```

{% endcode %}

运行服务器能够正确接收该邮件，因为它接受所有子域。

<figure><img src="/files/17fd48612b9f133fd71e75d3ba1d21749060b38b" alt=""><figcaption></figcaption></figure>

该应用在截断后将该地址解释为属于 `dontwannacry.com` 域中的应用程序清单。

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

该账户被视为内部或可信。/ 一旦连接，即可访问 **管理面板** 而无需额外控制。

<figure><img src="/files/a8758a50169fbdf55e28298f8a528aeaf198d494" 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-management-of-exceptional-entries.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.
