What is clickjacking and how to protect yourself from it

Man

Professional
Messages
3,222
Reaction score
810
Points
113
The Internet takes up a large part of our lives. We shop online, sit on social networks and messengers, order services and food, watch movies and TV series. But how safe is it?

Botfaqtor, for example, fights against clickjacking of ads - this is one of the forms of digital fraud. Antiviruses protect users' devices from malware. But what is clickjacking and how to fight it?

Contents
1. What is clickjacking
2. Types of clickjacking
2.1. With the imposition of transparent layers
2.2. Without overlays
3. Examples of Clickjacking Attacks
3.1. Classic
3.2. Like-jacking
3.3. Cookiejacking
3.4. ‍Cursorjacking
3.5. Filejacking
4. Contextual advertising and click interception
5. How to protect yourself from clickjacking

What is clickjacking​

Clickjacking (from the English click - click, pressing, jacking (short for hijacking) - hacking, stealing) is a fraud technique in which an attacker uses a fake interface to deceive a user, intercept his click and obtain from him certain actions or data that he himself would not have transmitted or performed. Cloning entire original sites and layering them on the attacker's resource is exactly that.

For example, you went to a website and performed some action (clicked on the "Download" button, "Send" button, etc.). But a pop-up window appeared asking you to confirm the action. You clicked "Ok", and another tab opened in the browser with some third-party resource or a promo page with advertising.

When a site visitor clicks on a link, they are actually clicking through a hidden element. Typically, this element is embedded in an iFrame with a transparent layer that hides the link or button underneath.

This is one of the clickjacking variants. In fact, there are several types with different functionality.

With its help, fraudsters can:
  • generate clicks on ads,
  • launch a stealth download of malware,
  • activate the crypto mining program,
  • generate likes on social networks,
  • steal credentials,
  • grant a third party access rights to the device or to perform actions remotely (send commands and control),
  • force you to make unintentional purchases and even transfer funds.

Clickjacking is often used in malicious applications, but it can also be found on websites, browser extensions, and other online platforms.

Types of Clickjacking​

As with all forms of digital fraud, there are several ways attackers can clickjack their website or app.

With transparent layers overlay​

Methods that are considered the simplest and most common and are used to intercept a click. The site contains an iframe (an HTML frame within which elements can be placed), often with a call to action.

An invisible block is placed on top of the content, which collects clicks and performs a malicious action (for example, clicking on an external advertisement, downloading software, etc.).

- Hidden pixelation

The oldest and first discovered clickjacking method, the stealth overlay technique involves creating a 1x1 pixel iframe containing a malicious element and placing it directly under the victim's cursor.

The chances of him seeing the pixel are low. Users click on the page content, in any case, they hit this pixel, which triggers further malicious action.

— Trimming content

In this type of overlay, the attacker blocks only part of the original content by cutting it out, blocking some buttons, and using malicious links to trigger actions.

For example, there is a pop-up window with the question "Allow access to this" and the buttons "Ok" and "Cancel". The attacker leaves only the buttons, but cuts off the question itself and adds a window with his own question. In such cases, the end user does not see the substitution.

Instead, he will see part of the original iframe, but will not be able to access it visually because it has been cut off and replaced with another one. Simply reloading the page a few times or blocking javascript will likely fix this problem.

- Fully transparent overlay

A method where an exact malicious copy is overlaid onto the original iframe, but with a different effect. Used with Adobe Flash elements.

For example , a user clicks on the "Mute microphone" option, but instead a third-party action is performed, such as turning on the camera.

This is one of the most dangerous clickjacking techniques that can hijack accounts with banking data.

— Click event

The attackers deploy a malicious page directly behind the original page, but change the click event. This is done by using a floating div that completely covers the target UI element. By setting the pointer-events CSS property at the top of the page to none, all click events will be logged on the malicious page, not the original one.

Since in this case the attackers receive data about the user's clicks, keyboard capture (keylogging) can be launched. With its help, they can steal personal data, such as logins and passwords.

No overlays​

These types of clickjacking do not hide behind the original iframe - instead, they completely change it. Below are some of the techniques used in non-overlay attacks.

— Quick content replacement

In this case, the user's behavior on the site is tracked and the click is predicted. Just before the click, the content on the page quickly changes to malicious.

It is impossible to visually detect such click-decking. The visitor sees the entire original site, without hidden elements.

Drag and drop

Changes the target of the action from click to drag and drop. For example, to upload a file to a site, you need to click the "Upload" button (or click on the container area with drag-and-drop). However, the " click " parameter will not work in this case - only drag and drop. After adding a file in this way, an attacker will be able to gain full access to it.

— Phantom mouse cursors

Using a floating div, an attacker can create an additional mouse cursor and set it at a fixed distance from the victim's real mouse pointer. The attacker then adjusts the site page so that the phantom cursor is more visible, and then places an element on it that the user must click on.

— Repositioning

Repositioning clickjacking is an additional step to the quick content replacement method. In this case, the attacker moves the user interface element directly under the mouse and immediately detects when the user is about to click.

— Scrolling

Fraudsters partially scroll some key parts of the main content of the page. In this case, the user sees only those parts that are beneficial to the attackers.

Examples of Clickjacking Attacks​

Classical​

A classic click hijacking attack is when malicious codes are embedded into an invisible iframe of the original site to manipulate the content that the user hovers over or clicks.

Example: You are watching a YouTube video embedded on a website. Below it is an invisible iframe button called “Buy” that when clicked, initiates a purchase from the Amazon store. Once you click the “Play” button, you are immediately redirected to Amazon to make the purchase.

Like-jacking​

It is a clickjacking attack that tricks its victims into liking posts on social media.

Example: A user visits a website. To go to the next page, he needs to click on the "Next" (or "Previous"/"Next") button. But instead of a link to the next page, an invisible iframe with code is embedded.

Cookiejacking​

The attacker modifies the user interface of the site to hack, i.e. steal, the user's cookie file in the browser. The trick is a drag-and-drop method. Once the visitor performs the action the fraudster needs, the latter can then pass off bot visits as human, using the stolen cookies.

‍Cursorjacking​

Cursorjacking is an attack that changes the location of the user's cursor. In this case, when a visitor hovers over one element of the site and clicks on it, the click actually occurs on an element located elsewhere .

Filejacking​

To gain access to files on a user's device, attackers use the capabilities of the browser. In this case, they most often attack sites that allow you to download files, and malicious code is embedded in the "Open file" button. As soon as the user clicks on it, the hacker immediately gains access to all files on the computer.

Contextual advertising and click interception​

In terms of modern ad and click fraud, clickjacking is a common problem. And it is something that continues to be supported by the fraudulent community.

Unlike bots and click farms, clickjacking allows fraudsters to generate clicks from real users and monetize them in various ways. This technique is especially popular for hidden advertising on pornographic sites or resources with fake news that will not pass moderation on major advertising platforms, etc.

Clickjacking in click fraud is mostly done through apps or mobile pages to make it easier for fraudsters to generate fake organic traffic. They can make it so that a single click or tap creates a large number of actions at once.

The difference between click interception and injection is that it does not use automation. The source of traffic is real users.

How to protect yourself from clickjacking​

— What should regular users do?

As with other cyber threats that lurk online, there are ways you can protect yourself:
  1. Update your browser. This is not so much to get a new interface or design, but to update the built-in security systems and fix errors in a timely manner. Most browsers have built-in protection against clickjacking. They can also report that the user is visiting a malicious resource. Timely browser updates provide constant protection against the latest threats.
  2. Pay attention to any browser warnings that appear for the resources you visit. If a warning about malicious content appears on the screen, it is advisable to leave the site and not interact with it.
  3. Always enable two-factor authentication to access authenticated platforms. Clickjackers will not be able to reproduce it.
  4. As with many cyber threats, be wary of emails that offer to help you solve an urgent issue. Attackers will do anything to get the user to click on a link to their site. This can result in the loss of not only personal data, but also the theft of funds, as well as infection of a computer or smartphone.
  5. Consider using a password manager in your browser. They help identify fake resources. If you are redirected to a phishing resource whose URL does not match the address in your password vault, the manager simply will not show autofill.
  6. Attackers may try to trick you into downloading a malicious app. Don't download apps from untrusted sources. Always use official stores for this: here is a link to Google Play and App Store.
  7. Don't click on ads that promise the unbelievable. Sometimes, by clicking on them, you can go to the site that the clickjacker wants.
  8. Avoid clicking on pop-ups, especially on sites you don't visit often. They may be malicious and used for clickjacking.

— What should webmasters do?

Yandex and Google are taking steps to combat clickjacking. For example, Google Ads makes it difficult for sites that place ads in iframes to pass moderation. However, this does not mean that it is impossible (and it does happen).

Clickjacking can occur on both mobile devices and computers. It is the webmasters of the genuine site who are responsible for security measures. They are advised to use X Frame settings to ensure that there are no fraudulent methods on the site.

Also, website owners can install Antibot for the website, which protects resources from invalid traffic and bot attacks.

— What should advertisers do?

As with other advertising fraud methods, telltale signs of clickjacking include factors such as:
  • High bounce rate
  • Unusual source or location
  • IP address mismatches

The methods used for ad and click fraud continue to evolve at lightning speed. Botfaqtor anti-fraud service is the best way to get ahead of invalid ad traffic. The algorithm blocks bots and other fraudulent clicks on ads. Each visit is checked against 100 technical and behavioral parameters.
 
Top