Skip to content
UI spoofing Write-up Beginner

Clickjacked to the Core: Turning UI into a Trapdoor

An admin portal lacked X-Frame-Options and CSP headers, allowing an attacker to embed it in an iframe and trick a logged-in user into clicking a disguised button that deleted their account. The attacker could perform unauthorised account deletion via clickjacking.

medium.com

Published on medium.com

Free Link🎈

Iski, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The admin portal did not set X-Frame-Options or Content-Security-Policy headers, allowing it to be framed by other sites.

Impact

An attacker could trick a logged-in user into deleting their account without consent, as the portal had no CSRF protection or confirmation for account deletion.

What the attacker needed

Victim is logged in; victim visits attacker's page; victim clicks a disguised button

The fix

The portal should be fixed by setting X-Frame-Options or a Content-Security-Policy frame-ancestors directive to prevent framing, and adding CSRF protection and confirmation for sensitive actions.

How it was found

  1. Find a subdomain with a login page that lacks X-Frame-Options and CSP headers.
  2. Create an iframe pointing to a sensitive action like account deletion.
  3. Overlay a fake button on top of the iframe to trick the user into clicking.
  4. Host the page and get a logged-in user to click the fake button, triggering the action.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Clickjacking is when a malicious site hides a legitimate site's button under a fake button, so you think you're clicking one thing but actually click another. Here, the admin portal could be embedded in another site because it didn't send headers telling browsers not to allow that. A logged-in user could be tricked into deleting their own account.

What is UI spoofing?

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.