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

# Queue-Vergiftung mit H2.TE

### Vergiftung der Antwortwarteschlange durch H2.TE-Request-Smuggling

* Nutzen Sie die Request-Smuggling-Schwachstelle, um die Antwortwarteschlange zu vergiften.
* Nutzen Sie diese Vergiftung, um auf die `/admin` Administrationspanel zuzugreifen.
* Erfassen Sie die Admin-Anfrage (und damit ihr Session-Cookie), wenn sie sich verbindet, und löschen Sie dann die `carlos` Benutzer.

#### Technischer Kontext

* Die Anwendung akzeptiert Anfragen **HTTP/2** Frontend-Seite.
* Das Frontend **stuft herab** diese HTTP/2-Anfragen auf HTTP/1, selbst wenn die Länge mehrdeutig ist.
* Der Angriff basiert auf einer Desynchronisierung vom Typ **H2.TE**:
* Sendet eine HTTP/2-Anfrage, die beide enthält:
* eine `Transfer-Encoding: chunked` Kopfzeile
* eine `Content-Length` Kopfzeile
* Die Verbindung zum Back-end wird **alle 10 Anfragen zurückgesetzt**:
* wenn die Verbindung "defekt" ist, senden Sie einfach ein paar normale Anfragen, um zu einer sauberen Verbindung zurückzukehren.
* In HTTP/2 müssen Sie nicht definieren `Content-Length` normalerweise, was das gleichzeitige Vorhandensein von `Transfer-Encoding` und `Content-Length` mehrdeutig und nutzbar.

#### Angriffsablauf

```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
```

* Der HTTP/2-Teil wird vom Frontend gesehen, das ihn für das Back-end in HTTP/1 umwandelt.
* Aufgrund der Mehrdeutigkeit `H2.TE`, interpretiert das Back-end das Ende der Anfrage anders.
* Das `GET / HTTP/1.1` Zeile und die folgenden werden **heimlich eingefügt** als Anfang der nächsten Anfrage in der Back-end-Zeile.

Wir **die Anfrage für den vergifteten Admin abrufen**, was es uns ermöglicht, zu erhalten: sein **Session-Cookie**.

<figure><img src="/files/77f727b9cc990f7807ad4a024ecb9bafccd6ca56" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/c4f4aaef9ec0fb4318a56961df8243654d9e43cb" 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/de/web/request-smuggling/queue-poisoning-with-h2-te.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.
