Clickjacking
Clickjacking is a malicious technique of tricking a user into clicking on something different from what the user perceives, thus potentially revealing confidential information or allowing others to take control of their computer while clicking on seemingly innocuous objects, including web pages.
-- Wikipedia
Basic clickjacking attack
Just cover the target site by an overlay, like in follows. Or use Burp Suite's Clickbandit (Burp
-> Burp Clickbandit
).
To prefill form data, just try appending params via url (GET).
Bypass frame detection
A common protection to avoid clickjacking is to try to detect, when a website is being framed.
This can potentially be bypassed by using HTML5's sandbox
iframe attribute, by specifing allow-forms
, but omittin allow-scripts
and allow-top-navigation
.
Combining with XSS
Sometimes you may be able to combine the attack with XSS, by e.g. providing an XSS exploit via prefilled form data.
Mitigation
Setting
X-Frame-Options
header todeny
,sameorigin
orallow-from <website>
.Using
Content-Security-Policy: <policy>
header, where<policy>
should containframe-ancestors
being set tonone
,self
orframe-ancestors <website>
.
Last updated