> 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/pt-br/web/web-cache-deception/web-cache-deception-with-path-delimiters.md).

# Engano de Cache Web com Delimitadores de Caminho

### Explorando delimitadores de caminho para engano de cache da web

#### Contexto

**Laboratório:** Limites de caminho da operação para engano de cache da web / **Objetivo:** recuperar a \*\*chave de API\*\* do usuário **carlos**. / **Acesso fornecido:** possível conexão com `wiener:peter`. / **Ajuda:** uma lista de delimitadores possíveis é fornecida pelo laboratório.

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

#### Observação inicial

* Na **Minha conta** página, vemos um sinal que exibe claramente nossa própria chave de API\*\*.
* Em segundo plano, o acesso normal aciona uma solicitação:

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

Neste caso, **a resposta não é servida do cache** (nenhum comportamento de cache visível/interpretado).

<figure><img src="/files/1cf3d79de066b5fad4ac5577b80edda5b339dff2" alt=""><figcaption></figcaption></figure>

#### Teste de delimitadores

* Ao adicionar um \*\*ponto e vírgula\*\* `;` no caminho, a \*\*aplicação ainda interpreta a rota\*\* para `my-account`, mas desta vez **com comportamento de cache**.

Usando **Intruder**, testamos vários delimitadores e descobrimos que **o ponto e vírgula funciona**.

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

Exemplo de um caminho válido:

* `/my-account;test.js`

<figure><img src="/files/1cfb6c12acc3832ea29689b7d759d58a3ce2361c" alt=""><figcaption></figcaption></figure>

#### Exploração

Objetivo: garantir que a vítima visite uma URL armadilhada para fazer com que a **/my-account** resposta \*\*em cache\*\* e, em seguida, relida com outra variante para obter os **carlos** dados.

Do**Servidor de exploração**, a vítima é redirecionada para:

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

<figure><img src="/files/5c26158ac9c01454dcc342af4230d5664ee90724" alt=""><figcaption></figcaption></figure>

#### Recuperação da chave de API

* Em seguida, alteramos a URL e acessamos:
* `/my-account;jordan.js`

Essa resposta então contém **a chave de API do Carlos**.

<figure><img src="/files/32479b52a03467be2dd4438719e2cb22bf0005b7" 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/pt-br/web/web-cache-deception/web-cache-deception-with-path-delimiters.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.
