top of page


Clickjacking: Risks and Mitigation
Clickjacking: Risks and Mitigation

Clickjacking, also known as a "UI redress attack" or "user interface manipulation attack," is a malicious technique in which an attacker tricks a user into clicking on something different from what the user perceives. This is done by overlaying or embedding transparent frames or layers over legitimate content, making the user believe they are interacting with one element when, in fact, they are interacting with another.

Here's a basic overview of how a clickjacking attack might work:

1. Creating a Trapped UI:

- The attacker creates a malicious website or modifies an existing one.

- Transparent iframes or layers are positioned over legitimate buttons, links, or interactive elements of a target website.

2. User Interaction:

- The user visits the malicious website, where the attacker's crafted UI is presented.

- The attacker entices the user to click on something seemingly harmless, like a button, video play button, or a game.

3. Hidden Actions:

- Unbeknownst to the user, the click event is actually triggered on the hidden, legitimate website beneath the transparent layer.

4. Consequences:

- The user unintentionally interacts with the hidden elements, potentially performing actions they did not intend to, such as making purchases, changing settings, or revealing sensitive information.

5. Exploitation:

- Clickjacking can be exploited for various purposes, including stealing sensitive information, spreading malware, or performing unauthorized actions on behalf of the user.

To mitigate clickjacking attacks, websites can implement several security measures:

- Frame Busting Script: Websites can use frame-busting scripts to prevent their content from being displayed within iframes. This script detects if the page is being loaded inside a frame and breaks out of it.

- X-Frame-Options Header: Setting the X-Frame-Options HTTP header to DENY or SAMEORIGIN can prevent a page from being embedded in a frame on another site.

- Content Security Policy (CSP): Implementing CSP headers can help control which domains are allowed to load a website's resources, reducing the risk of clickjacking.

It's important for both website developers and users to be aware of the potential risks associated with clickjacking and take appropriate measures to prevent or mitigate such attacks.

Recent Posts

See All


bottom of page