> 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

Notas sobre Engañar a la caché con delimitadores en la ruta para los laboratorios de PortSwigger Web Security Academy, incluyendo flujo de explotación, pruebas de payload, validación con Burp Suite y contexto de remediación.

### Aprovechamiento de delimitadores de ruta para engaño de caché web

#### Contexto

**Laboratorio:** Límites de ruta de operación para 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 delimitadores posibles.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7d2d25b19759891c924f495db86cec9b8731efcd%2F%7B1E6EFECE-A0F3-4DF6-9D0E-1A6EBE6482B1%7D.png?alt=media" 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 desencadena 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="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-166e3bc6025b41ab76cff764fc9c09a0de8b3b97%2F%7BE95ADD51-26B1-4D3C-A48F-3A6C758D04ED%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Prueba de delimitadores

* Al añadir un \*\*punto y coma\*\* `;` en la ruta, la \*\*aplicación sigue interpretando la ruta\*\* a `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="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-233c87ff615198c217cbd53a6ad57f98c19360fd%2F%7B8DFE85D2-8813-472D-AD26-0AB0AF4E77B9%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Ejemplo de una ruta válida:

* `/my-account;test.js`

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-71b1b7ef57caa58a9faa5a3c6ea16f2bb9ef223e%2Fimage%20(80).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Explotación

Propósito: Asegurarse de que la víctima visite una URL trampa para hacer que la **/my-account** respuesta \*\*se almacene en caché\*\* y luego volver a leerla con otra variante para obtener la **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="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-40626dbcbbd1ff8d5619a793bc771da69b710f3f%2F%7BF05779E6-A4C1-45E9-BE49-3D311E98BCA0%7D.png?alt=media" 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="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7f21b64eb382c6456ce24a4bd1a5ba3f8f561123%2F%7B44422477-9CA3-462E-8C7E-951F71853DB6%7D.png?alt=media" 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 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/web-cache-deception/cheating-the-cache-with-delimiters-in-the-path.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.
