> 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/web-cache-deception/cheating-the-cache-with-delimiters-in-the-path.md).

# Engañar a la caché con delimitadores en la ruta

### Explotación de delimitadores de ruta para el engaño de caché web

#### Contexto

**Laboratorio:** Límites de ruta de operación para el engaño de caché web / **Objetivo:** recuperar la \*\*clave API\*\* del usuario **carlos**. / **Acceso proporcionado:** posible conexión con `wiener:peter`. / **Ayuda:** el laboratorio proporciona una lista de posibles delimitadores.

<figure><img src="/files/8df7b614d24c075cad89fee432983388366315a7" alt=""><figcaption></figcaption></figure>

#### Observación inicial

* En la **Mi cuenta** página, vemos un letrero que muestra claramente nuestra propia \*\*clave API\*\*.
* En segundo plano, el acceso normal activa una solicitud:

```bash
GET /my-account HTTP/2
```

En este caso, **la respuesta no se sirve desde la caché** (sin comportamiento de caché visible/interpretado).

<figure><img src="/files/3ec3984623fd9375c6d98c4f4c5e58acb76e696f" alt=""><figcaption></figcaption></figure>

#### Prueba de delimitadores

* Al añadir un \*\*punto y coma\*\* `;` en la ruta, la \*\*aplicación sigue interpretando la ruta\*\* hacia `my-account`, pero esta vez **con comportamiento de caché**.

Usando **Intruder**, comprobamos varios delimitadores y encontramos que **el punto y coma funciona**.

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

Ejemplo de una ruta válida:

* `/my-account;test.js`

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

#### Explotación

Objetivo: asegurarse de que la víctima visite una URL trampa para hacer que la **/my-account** respuesta \*\*almacenada en caché\*\* y luego volver a leerla con otra variante para obtener los **carlos** datos.

Desde el**servidor de explotación**, la víctima es redirigida a:

```javascript
<script>
    document.location="https://0a5e005c048218fb80a3f0ec00c2000d.web-security-academy.net/my-account/my-account;test.js";
</script>
```

<figure><img src="/files/76a03a715cd3f5dab5d85e67825fa1103da66f1c" alt=""><figcaption></figcaption></figure>

#### Recuperación de la clave API

* Luego cambiamos la URL y accedemos a:
* `/my-account;jordan.js`

Esta respuesta entonces contiene **la clave API de carlos**.

<figure><img src="/files/38c2c8b26c74559d458375bdebfd5ae246a82ed1" 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/web-cache-deception/cheating-the-cache-with-delimiters-in-the-path.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.
