Imagine trying to click a "Play Video" button on a website, only to unknowingly transfer money, post a social media update, or change security settings. This is the essence of Clickjacking, a sneaky cyberattack that tricks users into performing unintended actions.
From account takeovers to enabling cameras and microphones without consent, clickjacking has been used in real-world attacks to exploit millions of users. In this blog, we'll explore how clickjacking works, real-world cases, and strategies to prevent it.
What is Clickjacking?
Clickjacking (UI Redressing) is an attack where an attacker overlays an invisible or deceptive element over a legitimate webpage, tricking users into clicking something harmful.
How Clickjacking Works
A hacker creates a malicious webpage.
The real webpage (e.g., a banking site) is loaded inside an invisible iframe on this malicious page.
The attacker positions a fake button or transparent layer over a legitimate button.
The user clicks, thinking they are performing a safe action, but instead, they unknowingly execute an unintended action (e.g., transferring money or changing privacy settings).

Real-World Clickjacking Attacks
1. Facebook Clickjacking (2011)
A notorious attack tricked users into "liking" pages they never intended to.
Attackers embedded invisible "Like" buttons over deceptive images.
Users thought they were clicking to "see a funny video," but they actually liked and shared a malicious post, spreading the attack.
2. Adobe Flash Settings Exploit (2008)
Attackers used clickjacking to turn on users' webcams and microphones without consent.
Adobe Flash allowed users to adjust security settings via a web-based control panel.
Hackers placed a transparent iframe of this settings page over a fake button.
Clicking the fake button unknowingly enabled the webcam and microphone.
3. Cryptocurrency Theft via Clickjacking (2021)
Attackers created a fake "Buy Now" button for a trending NFT sale.
The real action was approving a high-value Ethereum transaction in the victim’s wallet.
Victims unknowingly transferred their cryptocurrency to the attacker.
Types of Clickjacking Attacks
Likejacking: Users unknowingly "like" or share malicious content on social media.🔴
Cursorjacking: Attackers manipulate the mouse cursor’s position, making users click the wrong spot.
Form Clickjacking: Users enter sensitive information (e.g. login credentials) into a disguised form.
Webcam/Mic Activation Clickjacking: Attackers trick users into enabling camera or microphone access.
How to Prevent Clickjacking
Now that we know what clickjacking attack is, here is the most interesting part, how to prevent it?
Use X-Frame-Options HTTP Header
Prevent your website from being loaded inside an iframe (the primary attack vector).
X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN (Only allows iframes from the same domain.)
Use Content Security Policy (CSP) Frame-Ancestors
This modern approach blocks unauthorized iframes.
Content-Security-Policy: frame-ancestors 'none';
Implement Frame Busting (JavaScript Defense)
Prevent your site from being embedded in iframes.
if (window.top !== window.self) { window.top.location = window.self.location; }
User Awareness & Security Extensions
Encourage users to disable auto-execution of JavaScript on unknown sites.
Security tools like NoScript and browser-based protections can block clickjacking.
Clickjacking is a silent yet dangerous attack method that preys on user trust. With just a simple click, victims can unknowingly compromise their data, enable unauthorized actions, or spread malware.
By implementing X-Frame-Options, Content Security Policy, and user education, we can significantly reduce the risk of clickjacking attacks.
As Batman wisely said in The Dark Knight, “It’s not who I am underneath, but what I do that defines me.”
Note: Feel free to drop your thoughts in the comments below - whether it's feedback, a topic you'd love to see covered, or just to say hi! Don’t forget to join the forum for more engaging discussions and stay updated with the latest blog posts. Let’s keep the conversation going and make cybersecurity a community effort!
-AJ
Comments