Clickjacking PoC Generator
What’s clickjacking#
Target page gets loaded in an invisible iframe. Overlay it on a decoy page. Victim thinks they’re clicking “Free iPad” but they’re actually clicking “Delete My Account” on the real site underneath.
It’s been around forever and the fix is trivial, which makes it surprising how often it’s still missing.
The fix (and what we’re testing for)#
Two headers kill this attack:
X-Frame-Options: DENY
or
Content-Security-Policy: frame-ancestors 'none'
DENY blocks framing entirely. SAMEORIGIN / frame-ancestors 'self' allows same-origin framing only. If neither header is present, the page can be framed by anyone.
The tool#
Dead simple. An HTML page that iframes a target URL.
The core concept is literally this:
| |
If the target renders inside the frame — vulnerable. If you get a blank frame or an error — headers are working.
The PoC generator wraps this in a nicer UI where you punch in a URL and it builds the test page for you. Nothing fancy. Does what it needs to do.
Usage#
- Open the HTML file in a browser
- Enter the target URL
- Page loads in the iframe? Vulnerable.
- Blank frame or broken? Protected.
That’s it. You now have a visual PoC you can screenshot for a report.
When to report it#
This is the part most people get wrong.
X-Frame-Options header is not automatically a finding. Stop reporting it like one.Report it when:
- The frameable page has sensitive actions — password change, fund transfer, settings modification, OAuth authorization
- You can demonstrate a realistic attack scenario where a user would be tricked into performing an unintended action
- The application relies on click-based actions that don’t have additional confirmation steps (CSRF tokens alone don’t prevent clickjacking)
Don’t report it when:
- The page is a static marketing site with no interactive elements. “Your homepage can be framed” is not a vulnerability, it’s a fact about HTML.
- It’s a login page with no other sensitive actions. Low impact, everyone knows, nobody cares.
- Your scanner flagged “missing X-Frame-Options” on a page that displays a logo and a phone number. Congratulations, you found nothing.
- The page already uses
frame-ancestorsin CSP but your tool only checked forX-Frame-Options. Read both headers before filing.
Source#
Code is on GitHub: fhd342gs/Clickjacking_PoC