Clickjacking
An attack that tricks users into clicking hidden elements from another site by overlaying transparent iframes over deceptive content.
Clickjacking (UI Redressing) is an attack where a malicious page tricks users into clicking on hidden or disguised elements from another site, typically by overlaying transparent iframes. Victims believe they're interacting with the visible page but are actually clicking on the hidden target.
How It Works
The attacker creates a page that loads the target site in a transparent iframe positioned over deceptive content. When users click on what appears to be the attacker's page, they're actually clicking buttons or links on the hidden target site.
Attack Scenarios
- Tricking users into changing security settings
- Unauthorized social media actions (likes, follows)
- Initiating fund transfers
- Enabling webcam/microphone permissions
Protection Headers
# Legacy header
X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
# Modern CSP approach
Content-Security-Policy: frame-ancestors 'none'
Content-Security-Policy: frame-ancestors 'self'