> 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/csrf.md).

# Межсайтовая подделка запроса (CSRF)

Межсайтовая подделка запроса, обход SameSite, недостатки проверки токена, обход проверки Referer и полезные нагрузки эксплойт-сервера.

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

## Процесс тестирования

1. Определите уязвимую функцию и соответствующий запрос, параметр, заголовок, cookie или sink на стороне браузера.
2. Воспроизведите поведение в Burp Suite с минимальной полезной нагрузкой, прежде чем усиливать атаку.
3. Подтвердите влияние с помощью наглядного доказательства концепции, например доступа к аккаунту, раскрытия данных, выполнения кода, SSRF или изменения состояния.
4. Оставляйте полезные нагрузки, URL, токены и учётные данные лаборатории без изменений, документируя путь эксплуатации.

## Лаборатории

<table><thead><tr><th data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/ru/web/csrf/csrf-vulnerability-with-no-defenses.md">Уязвимость CSRF без защиты</a></td></tr><tr><td><a href="/ru/web/csrf/csrf-with-broken-referer-validation.md">CSRF с нарушенной проверкой Referer</a></td></tr><tr><td><a href="/ru/web/csrf/csrf-with-duplicated-token-in-a-double-submit-cookie.md">CSRF с дублированным токеном в cookie с двойной отправкой</a></td></tr><tr><td><a href="/ru/web/csrf/csrf-referer-validation-depends-on-header-presence.md">CSRF с проверкой Referer только при его наличии</a></td></tr><tr><td><a href="/ru/web/csrf/csrf-token-not-tied-to-session.md">CSRF с токеном, не привязанным к сессии</a></td></tr><tr><td><a href="/ru/web/csrf/csrf-token-tied-to-non-session-cookie.md">CSRF с токеном, привязанным к cookie, но не к сессии</a></td></tr><tr><td><a href="/ru/web/csrf/csrf-token-validation-depends-on-http-method.md">CSRF с проверкой токена на основе HTTP-метода</a></td></tr><tr><td><a href="/ru/web/csrf/samesite-lax-bypass-via-cookie-refresh.md">Обход SameSite Lax через обновление cookie</a></td></tr><tr><td><a href="/ru/web/csrf/samesite-lax-bypass-via-method-override.md">Обход SameSite Lax через подмену метода</a></td></tr><tr><td><a href="/ru/web/csrf/samesite-strict-bypass-via-client-side-redirect.md">Обход SameSite Strict через перенаправление на стороне клиента</a></td></tr><tr><td><a href="/ru/web/csrf/samesite-strict-bypass-via-sibling-domain.md">Обход SameSite Strict через соседний домен</a></td></tr></tbody></table>


---

# 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/csrf.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.
