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

# Tromper le cache avec des délimiteurs dans le chemin

### Exploitation des délimiteurs de chemin pour la tromperie du cache web

#### Contexte

**Lab :** Limites de chemin d’opération pour la tromperie du cache web / **Objectif :** récupérer la \*\*clé API\*\* de l’utilisateur **carlos**. / **Accès fourni :** connexion possible avec `wiener:peter`. / **Aide :** une liste de délimiteurs possibles est fournie par le lab.

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

#### Observation initiale

* Sur la **Mon compte** page, nous voyons un panneau qui affiche clairement notre propre clé API\*\*.
* En arrière-plan, l’accès normal déclenche une requête :

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

Dans ce cas, **la réponse n’est pas servie depuis le cache** (aucun comportement de cache visible/interprété).

<figure><img src="/files/8158443ac7e17189e28919a21963bf34c8af6fbc" alt=""><figcaption></figcaption></figure>

#### Test des délimiteurs

* En ajoutant un \*\*point-virgule\*\* `;` dans le chemin, l’\*\*application interprète toujours la route\*\* vers `my-account`, mais cette fois **avec un comportement de cache**.

En utilisant **Intruder**, nous vérifions plusieurs délimiteurs, et nous constatons que **le point-virgule fonctionne**.

<figure><img src="/files/093d077c0ad06fe053c4b4831438934ab7faa9e5" alt=""><figcaption></figcaption></figure>

Exemple d’un chemin valide :

* `/my-account;test.js`

<figure><img src="/files/42b6c877da22757e11e694d2f7e94b008d2ddf2d" alt=""><figcaption></figcaption></figure>

#### Exploitation

Objectif : s’assurer que la victime visite une URL piégée afin de faire en sorte que la **/my-account** réponse soit \*\*mise en cache\*\* puis relue avec une autre variante pour obtenir la **carlos** données.

Depuis le**Serveur d’exploitation**, la victime est redirigée vers :

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

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

#### Récupération de la clé API

* Ensuite, nous modifions l’URL et accédons à :
* `/my-account;jordan.js`

Cette réponse contient alors **la clé API de Carlos**.

<figure><img src="/files/f5cc12a2c1924b05838cbe68cfef986779fca347" 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/fr/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.
