> 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-Poisoning mit H2.TE

Notizen zu Queue-Poisoning mit H2.TE für Labs der PortSwigger Web Security Academy, einschließlich Ausnutzungs-Workflow, Payload-Tests, Burp-Suite-Validierung und Behebungskontext.

### Response-Queue-Vergiftung per H2.TE-Request-Smuggling

* Nutze die Request-Smuggling-Schwachstelle, um die Response-Queue zu vergiften.
* Nutze diese Vergiftung, um auf die `/admin` das Administrationspanel zuzugreifen.
* Fange die Admin-Anfrage ab (und damit ihr Session-Cookie), wenn sie sich verbindet, und lösche dann die `carlos` Benutzer.

#### Technischer Kontext

* Die Anwendung akzeptiert Anfragen **HTTP/2** Front-End-Seite.
* Das Front-End **stuft herab** diese HTTP/2-Anfragen auf HTTP/1 herunter, selbst wenn die Länge mehrdeutig ist.
* Der Angriff basiert auf einer Desynchronisierung des Typs **H2.TE**:
* Sendet eine HTTP/2-Anfrage, die beides enthält:
* eine `Transfer-Encoding: chunked` Header
* eine `Content-Length` Header
* Die Verbindung zum Back-End wird **alle 10 Anfragen zurückgesetzt**:
* Wenn die Verbindung „defekt“ ist, sende einfach ein paar normale Anfragen, um wieder zu einer sauberen Verbindung zu gelangen.
* In HTTP/2 musst du nicht definieren `Content-Length` normalerweise, wodurch das gleichzeitige Vorhandensein von `Transfer-Encoding` und `Content-Length` mehrdeutig und nutzbar wird.

#### Angriffsverlauf

```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 Front-End 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 eingeschleust** als Beginn der nächsten Anfrage in die Back-End-Zeile.

Wir **rufe die Anfrage des vergifteten Admins ab**, wodurch wir Folgendes erhalten können: sein **Session-Cookie**.

<figure><img src="https://2955439919-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://2955439919-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/de/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.
