Security Guide

What is Clickjacking?

Understanding the invisible threat that compromises user security

Introduction to Clickjacking

Clickjacking (also known as UI redressing) is a malicious technique where attackers trick users into clicking on hidden or disguised elements on a website. The term combines "click" and "hijacking" — literally meaning the hijacking of user clicks.

In a clickjacking attack, the attacker embeds a legitimate website in an invisible iframe on their malicious site. They overlay this hidden iframe with deceptive content that entices users to click. When users think they are clicking on visible elements, they are actually interacting with the hidden website.

Why Clickjacking is Dangerous

Clickjacking attacks exploit the trust users have in legitimate websites. Victims believe they are interacting with a familiar service, when in reality they are being manipulated by attackers. This can lead to financial loss, identity theft, and complete account compromise.

How Clickjacking Attacks Work

1

Attacker Creates Malicious Website

The attacker sets up a website that appears legitimate — offering free downloads, games, or other enticing content. This site serves as the foundation for the attack.

2

Target Website is Embedded

Using HTML iframes, the attacker loads the target website invisibly on their page. The iframe is styled with CSS to be completely transparent.

<iframe src="https://bank.com" style="opacity:0; position:absolute;"></iframe>
3

Deceptive Overlay is Created

The attacker positions visible elements (buttons, links, images) precisely over sensitive areas of the hidden website. These overlays are designed to look legitimate.

4

User Interaction and Exploitation

When users click on what they believe are legitimate buttons, they are actually clicking on hidden elements in the iframe — triggering unintended actions.

Types of Clickjacking Attacks

Classic Clickjacking

The traditional method using invisible iframes to trick users into clicking hidden elements. Relies on precise positioning and transparency.

Target: Banking sites, payment forms, admin panels

Likejacking

A specialized form focused on social media platforms. Attackers trick users into &apos;liking&apos; pages or sharing content without consent.

Target: Facebook, Twitter, Instagram, social platforms

Cursorjacking

Advanced technique manipulating cursor position, making users believe they are clicking in one location when clicking elsewhere.

Target: Any website with sensitive clickable elements

Filejacking

Attackers trick users into downloading malicious files by overlaying download buttons over legitimate file links.

Target: File sharing sites, software download pages

Real-World Examples

🏦

Banking Transfer Fraud

Attackers create fake &apos;Get Rich Quick&apos; websites promising investment opportunities. When users click &apos;Invest Now,&apos; they are actually clicking on their bank&apos;s transfer button.

Impact: Direct financial loss, often thousands of dollars

📱

Social Media Account Takeover

Malicious browser extensions or websites overlay &apos;Enable Premium Features&apos; buttons over social media security settings.

Impact: Account compromise, privacy invasion, spam distribution

🛒

E-commerce Cart Manipulation

Shopping sites are targeted where attackers overlay &apos;Claim Your Prize&apos; buttons over checkout buttons.

Impact: Unauthorized purchases, subscription fraud

Technical Implementation

CSS Manipulation Techniques

Attackers use various CSS properties to hide and position iframes:

.hidden-iframe {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 200px;
  opacity: 0;
  z-index: -1;
}

.overlay-button {
  position: absolute;
  top: 50px;
  left: 50px;
  z-index: 100;
}

JavaScript Enhancement

Advanced attacks use JavaScript to dynamically adjust positioning:

document.addEventListener(&apos;mousemove&apos;, (e) => {
  const iframe = document.getElementById(&apos;target-iframe&apos;);
  const button = document.getElementById(&apos;overlay-button&apos;);
  
  // Position overlay button over sensitive iframe element
  button.style.left = (e.clientX - 50) + &apos;px&apos;;
  button.style.top = (e.clientY - 25) + &apos;px&apos;;
});

Impact & Consequences

Financial Loss

  • Unauthorized bank transfers
  • Fraudulent purchases
  • Subscription scams
  • Investment fraud

Security Breach

  • Account takeover
  • Password changes
  • Privilege escalation
  • Data exfiltration

Reputational Damage

  • Loss of customer trust
  • Brand damage
  • Legal liability
  • Regulatory penalties

Test Your Website

Use our free scanner to check if your website is vulnerable to clickjacking attacks.