> 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

Anotações sobre Engano de cache web com delimitadores de caminho para os laboratórios da PortSwigger Web Security Academy, incluindo fluxo de exploração, testes de payloads, validação no Burp Suite e contexto de remediação.

### 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 da 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="https://783634792-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>

#### Observação inicial

* Na **Minha conta** página, vemos uma indicação que exibe claramente nossa própria chave da 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="https://783634792-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>

#### 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**, verificamos vários delimitadores e descobrimos que **o ponto e vírgula funciona**.

<figure><img src="https://783634792-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>

Exemplo de um caminho válido:

* `/my-account;test.js`

<figure><img src="https://783634792-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>

#### Exploração

Objetivo: garantir que a vítima visite uma URL armadilhada para fazer com que o **/my-account** resposta seja \*\*armazenada em cache\*\* e depois lida novamente com outra variante para obter os **carlos** dados.

Do**Servidor de Exploits**, 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="https://783634792-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>

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

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

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

<figure><img src="https://783634792-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/pt-br/web/web-cache-deception/web-cache-deception-with-path-delimiters.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.
