DEV Community

Cover image for What Is Clickjacking? Real Attack Examples, Risks & How to Prevent It in WordPress
Meghna Meghwani for ServerAvatar

Posted on • Originally published at serveravatar.com

What Is Clickjacking? Real Attack Examples, Risks & How to Prevent It in WordPress

Imagine clicking a harmless “Play” button on a video… but instead, you unknowingly approve a payment or give access to your account. Sounds scary, right? That’s exactly how clickjacking works. If you’re wondering what is clickjacking, it’s a deceptive technique where users are tricked into clicking something different from what they see. Clickjacking is like a digital trap where what you see isn’t what you actually click. It manipulates users into taking actions they never intended. And if you run a WordPress website, this is something you simply can’t ignore.

In this guide, we’ll break down what clickjacking is, show real-world examples, explain the risks, and most importantly, show you how to protect your site from it.

What Is Clickjacking?

Clickjacking, also known as “UI redressing”, is a cyberattack where users are tricked into clicking something different from what they perceive. Think of it like placing an invisible button on top of a visible one. You think you clicked on “Watch Video” button, however, you actually clicked on “Allow Access” or “Transfer Money” button.

What is Clickjacking

Key Point:
It manipulates user trust by hiding malicious actions behind legitimate-looking elements.

How Clickjacking Works

Clickjacking works by visually tricking users into clicking something different from what they think they’re interacting with. Attackers carefully design a fake page that hides the real action underneath, making it almost impossible for users to notice the deception.

Clickjacking works

Here’s a simple breakdown:

  • A hacker creates a malicious webpage that looks normal or attractive to users
  • Hacker loads your website in invisible or transparent iframe
  • Fake buttons, videos, or links are placed on top of the hidden content
  • When a user clicks, they unknowingly perform a hidden action on the actual site

Key Features:

  • Uses invisible layers (iframes) to hide real actions
  • Relies heavily on user trust and visual deception
  • Requires no malware installation to work
  • Can trigger actions like login approvals, payments, or permissions
  • Often goes unnoticed until damage is done

Analogy:
It’s like someone placing a glass door in front of a real door, you think you’re opening the right one, but you hit something invisible instead.

Types of Clickjacking Attacks

1. Likejacking

Likejacking is a social media-based attack where users are unknowingly forced to “like” or share content. The action happens in the background while the user thinks they are clicking something harmless.

Likejacking - Clickjacking

Key Features:

  • Hidden social media buttons layered under visible content
  • Boosts fake engagement and page popularity
  • Often spreads quickly through viral content
  • Targets platforms like Facebook or Instagram

Read Full Article: https://serveravatar.com/what-is-clickjacking/

Top comments (2)

Collapse
 
bhavin-allinonetools profile image
Bhavin Sheth

Clean explanation 👍
I actually ran into this once on a client site — no visible issue, but users were unknowingly triggering actions through an iframe. Adding X-Frame-Options + CSP fixed it instantly. Most WordPress sites ignore this, but it’s a real risk.

Collapse
 
meghna_meghwani_ profile image
Meghna Meghwani ServerAvatar

Thank You! That’s a perfect real-world example of how subtle (and dangerous) clickjacking can be.

What makes it tricky is exactly what you mentioned, there’s often no visible sign something’s wrong, yet users are interacting with a hidden layer. Glad to hear X-Frame-Options + CSP solved it quickly.

Appreciate you sharing your experience, it adds a lot of value to the discussion!