> 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/host-header/routing-based-ssrf.md).

# SSRF basado en enrutamiento

### SSRF basada en enrutamiento

**Descripción del laboratorio**

Este laboratorio tiene una **Vulnerabilidad SSRF basada en el enrutamiento**, explotable mediante **cabecera Host**. / La aplicación se basa en el valor de la `Host` campo para determinar el destino de las solicitudes, lo que permite acceder a recursos internos no expuestos.

Objetivo:

* Acceder al panel de administración interno alojado en una dirección IP de la `192.168.0.0/24` red
* Eliminar usuario **carlos**

**Observación inicial**

El `/admin` punto de acceso no es accesible desde el exterior. / Sin embargo, la aplicación reenvía las solicitudes según el valor de la `Host` campo, lo que permite redirigir la solicitud a direcciones internas.

**Paso 1 – Exploración de la red interna**

La siguiente consulta se envía a **Intruder** para probar direcciones IP internas:

```http
GET /admin HTTP/2
Host: 192.168.0.X
```

⚠️ Importante :

* Deshabilitar la opción **Actualizar la cabecera Host** en Burp, de lo contrario el ataque falla.

<figure><img src="/files/4086baff4fd4bab403db776fd97fdd7ed54c2eea" alt=""><figcaption></figcaption></figure>

Resultado:

* El `192.168.0.221` la dirección devuelve una respuesta **HTTP 200**, lo que indica la presencia del panel de administración interno.

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

**Paso 2 – Acceso al panel de administración**

Una vez identificada una IP válida, diriges la solicitud directamente al panel de administración:

```http
GET /admin/delete?username=carlos HTTP/2
Host: 192.168.0.221
```

La interfaz de administración interna se vuelve accesible.

<figure><img src="/files/97e47836d21a3f72ae034c73dd35f83e00634194" alt=""><figcaption></figcaption></figure>

**Paso 3 – Eliminación del usuario carlos**

La eliminación requiere una **POST** solicitud con un token CSRF válido:

```http
POST /admin/delete HTTP/2
Host: 192.168.0.221

csrf=iWyb78rJxAsoblmARVtqSef6YOsKG0Ph&username=carlos
```

Resultado:

* El servidor responde con **302 Found**, confirmando que el usuario **carlos** ha sido eliminado.

<figure><img src="/files/51729f0415f2d041c917724b3086ae8b0b6fc613" 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/host-header/routing-based-ssrf.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.
