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

# Обман кэша с разделителями в пути

Заметки по обману кэша с разделителями в пути для лабораторий PortSwigger Web Security Academy, включая рабочий процесс эксплуатации, тестирование полезных нагрузок, валидацию в Burp Suite и контекст устранения.

### Эксплуатация разделителей путей для обмана веб-кэша

#### Контекст

**Лабораторная:** Ограничения пути для обмана веб-кэша / **Цель:** извлечь \*\*API-ключ\*\* у пользователя **carlos**. / **Предоставленный доступ:** возможная связь с `wiener:peter`. / **Помощь:** список возможных разделителей предоставляется лабораторией.

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

#### Первое наблюдение

* На **Мой аккаунт** на странице мы видим знак, который явно отображает наш собственный API-ключ\*\*.
* В фоновом режиме обычный доступ вызывает запрос:

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

В этом случае, **ответ не подается из кэша** (видимого/интерпретируемого поведения кэша нет).

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

#### Тест разделителей

* Добавив \*\*точку с запятой\*\* `;` в пути, \*\*приложение всё ещё интерпретирует маршрут\*\* к `my-account`, но на этот раз **с поведением кэша**.

Используя **Intruder**, мы проверяем несколько разделителей и обнаруживаем, что **точка с запятой работает**.

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

Пример допустимого пути:

* `/my-account;test.js`

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

#### Эксплуатация

Цель: убедиться, что жертва переходит по ловушечному URL, чтобы сделать **/my-account** ответ \*\*закэшированным\*\* и затем перечитать его с другим вариантом, чтобы получить **carlos** данные.

С**сервера Exploit**, жертва перенаправляется на:

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

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

#### Получение API-ключа

* Затем мы изменяем URL и переходим к:
* `/my-account;jordan.js`

Этот ответ затем содержит **API-ключ Карлоса**.

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