
Clickjacking (classified as a user interface redress attack or UI redressing) is a
malicious technique of tricking a
user
Ancient Egyptian roles
* User (ancient Egyptian official), an ancient Egyptian nomarch (governor) of the Eighth Dynasty
* Useramen, an ancient Egyptian vizier also called "User"
Other uses
* User (computing), a person (or software) using an ...
into clicking on something different from what the user perceives, thus potentially revealing
confidential information or allowing others to take control of their computer while clicking on seemingly innocuous objects, including
web page
A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
s.
Clickjacking is an instance of the
confused deputy problem
In information security, a confused deputy is a computer program that is tricked by another program (with fewer privileges or less rights) into misusing its authority on the system. It is a specific type of privilege escalation. The confused deputy ...
, wherein a computer is tricked into misusing its authority.
History
In 2002, it had been noted that it was possible to load a transparent layer over a
web page
A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
and have the user's input affect the transparent layer without the user noticing.
However, fixes only started to trickle in around 2004,
and the general problem was mostly ignored as a major issue until 2008.
In 2008, Jeremiah Grossman and Robert Hansen (of SecTheory) had discovered that
Adobe Flash Player
Adobe Flash Player (known in Internet Explorer, Firefox, and Google Chrome as Shockwave Flash) is a discontinuedExcept in China, where it continues to be used, as well as Harman for enterprise users. computer program for viewing multimedia ...
was able to be clickjacked, allowing an
attacker
{{For, the term "attacker" in computer security, Hacker (computer security), Adversary (cryptography), Adversary (online algorithm)
In some team sports, an attacker is a specific type of player, usually involved in aggressive play. Heavy attacker ...
to gain access to a user's computer without the user's knowledge.
Grossman and Hansen coined the term "clickjacking", a
portmanteau
In linguistics, a blend—also known as a blend word, lexical blend, or portmanteau—is a word formed by combining the meanings, and parts of the sounds, of two or more words together. of the words "click" and "hijacking".
As more attacks of a similar nature were discovered, the focus of the term "UI redressing" was changed to describe the category of these attacks, rather than just clickjacking itself.
Description
One form of clickjacking takes advantage of vulnerabilities that are present in applications or web pages to allow the attacker to manipulate the user's computer for their own advantage.
For example, a clickjacked page tricks a user into performing undesired actions by clicking on concealed links. On a clickjacked page, the attackers load another page over the original page in a transparent layer to trick the user into taking actions, the outcomes of which will not be the same as the user expects. The unsuspecting users think that they are clicking visible buttons, while they are actually performing actions on the invisible page, clicking buttons of the page below the layer. The hidden page may be an authentication page; therefore, the attackers can trick users into performing actions which the users never intended. There is no way of tracing such actions to the attackers later, as the users would have been genuinely authenticated on the hidden page.
Clickjacking categories
* ''Classic:'' works mostly through a
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
* ''Likejacking:'' utilizes
Facebook's social media capabilities
* ''Nested:'' clickjacking tailored to affect
Google+
Google+ (sometimes written as Google Plus, stylized as G+ or g+) was a Social networking service, social network owned and operated by Google until it ceased operations in 2019. The network was launched on June 28, 2011, in an attempt to challe ...
* ''Cursorjacking:'' manipulates the cursor's appearance and location
* ''MouseJacking'': inject keyboard or mouse input via remote RF link
* ''Browserless:'' does not use a browser
* ''
Cookiejacking
HTTP cookie (also called web cookie, Internet cookie, browser cookie, or simply cookie) is a small block of data created by a web server while a user is browsing a website and placed on the user's computer or other device by the user's web bro ...
:'' acquires cookies from browsers
* ''Filejacking:'' capable of setting up the affected device as a file server
* ''Password manager attack:'' clickjacking that utilizes a vulnerability in the autofill capability of browsers''
''
Classic
Classic clickjacking refers to a situation when an
attacker
{{For, the term "attacker" in computer security, Hacker (computer security), Adversary (cryptography), Adversary (online algorithm)
In some team sports, an attacker is a specific type of player, usually involved in aggressive play. Heavy attacker ...
uses hidden layers on
web page
A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
s to manipulate the actions a user's cursor does, resulting in misleading the user about what truly is being clicked on.
A user might receive an email with a link to a video about a news item, but another webpage, say a product page on
Amazon
Amazon most often refers to:
* Amazon River, in South America
* Amazon rainforest, a rainforest covering most of the Amazon basin
* Amazon (company), an American multinational technology company
* Amazons, a tribe of female warriors in Greek myth ...
, can be "hidden" on top or underneath the "PLAY" button of the news video. The user tries to "play" the video but actually "buys" the product from Amazon. The hacker can only send a single click, so they rely on the fact that the visitor is both logged into
Amazon
Amazon most often refers to:
* Amazon River, in South America
* Amazon rainforest, a rainforest covering most of the Amazon basin
* Amazon (company), an American multinational technology company
* Amazons, a tribe of female warriors in Greek myth ...
and has 1-click ordering enabled.
While technical implementation of these attacks may be challenging due to cross-browser incompatibilities, a number of tools such as BeEF or
Metasploit Project
The Metasploit Project is a computer security project that provides information about security vulnerabilities and aids in penetration testing and IDS signature development. It is owned by Boston, Massachusetts-based security company, Rapid7.
...
offer almost fully automated exploitation of clients on vulnerable websites. Clickjacking may be facilitated by – or may facilitate – other web attacks, such as
XSS.
Likejacking
Likejacking is a
malicious technique of tricking users viewing a website into "
liking" a
Facebook
Facebook is a social media and social networking service owned by the American technology conglomerate Meta Platforms, Meta. Created in 2004 by Mark Zuckerberg with four other Harvard College students and roommates, Eduardo Saverin, Andre ...
page or other
social media
Social media are interactive technologies that facilitate the Content creation, creation, information exchange, sharing and news aggregator, aggregation of Content (media), content (such as ideas, interests, and other forms of expression) amongs ...
posts/accounts that they did not intentionally mean to "like". The term "likejacking" came from a comment posted by Corey Ballou in the article ''How to "Like" Anything on the Web (Safely)'',
which is one of the first documented postings explaining the possibility of malicious activity regarding Facebook's "like" button.
According to an article in ''
IEEE Spectrum
''IEEE Spectrum'' is a magazine edited and published by the Institute of Electrical and Electronics Engineers.
The first issue of ''IEEE Spectrum'' was published in January 1964 as a successor to ''Electrical Engineering''.
In 2010, ''IEEE Spe ...
'', a solution to likejacking was developed at one of Facebook's
hackathon
A hackathon (also known as a hack day, hackfest, datathon or codefest; a portmanteau of '' hacking'' and ''marathon'') is an event where people engage in rapid and collaborative engineering over a relatively short period of time such as 24 or 48 h ...
s. A "Like"
bookmarklet
A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands that add new features to the browser. They are stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. Bookmarklets are usually small ...
is available that avoids the possibility of likejacking present in the
Facebook like button.
Nested
Nested clickjacking, compared to classic clickjacking, works by embedding a malicious web frame between two frames of the original, harmless
web page
A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
: that from the framed page and that which is displayed on the top window. This works due to a vulnerability in the HTTP header
X-Frame-Options
, in which, when this element has the value
SAMEORIGIN
, the
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
only checks the two aforementioned layers. The fact that additional frames can be added in between these two while remaining undetected means that
attackers can use this for their benefit.
In the past, with
Google+
Google+ (sometimes written as Google Plus, stylized as G+ or g+) was a Social networking service, social network owned and operated by Google until it ceased operations in 2019. The network was launched on June 28, 2011, in an attempt to challe ...
and the faulty version of
X-Frame-Options
,
attackers were able to insert frames of their choice by using the vulnerability present in
Google's Image Search engine. In between the image display frames, which were present in Google+ as well, these attacker-controlled frames were able to load and not be restricted, allowing for the
attackers to mislead whomever came upon the image display page.
Cursorjacking
CursorJacking is a UI redressing technique to change the cursor from the location the user perceives, discovered in 2010 by Eddy Bordi, a researcher at vulnerability.fr. Marcus Niemietz demonstrated this with a custom cursor icon, and in 2012 Mario Heiderich did so by hiding the cursor.
Jordi Chancel, a researcher at Alternativ-Testing.fr, discovered a CursorJacking vulnerability using Flash, HTML and JavaScript code in Mozilla Firefox on Mac OS X systems (fixed in Firefox 30.0) which can lead to arbitrary code execution and webcam spying.
A second CursorJacking vulnerability was again discovered by Jordi Chancel in
Mozilla Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curren ...
on
Mac OS X
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
systems (fixed in Firefox 37.0) using once again
Flash
Flash, flashes, or FLASH may refer to:
Arts, entertainment, and media
Fictional aliases
* The Flash, several DC Comics superheroes with super speed:
** Flash (Jay Garrick)
** Barry Allen
** Wally West, the first Kid Flash and third adult Flash ...
,
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
and
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
code which can also lead to spying via a webcam and the execution of a malicious addon, allowing the execution of malware on the affected user's computer.
MouseJack
Different from other clickjacking techniques that redress a UI, MouseJack is a wireless hardware-based UI vulnerability first reported by Marc Newlin of Bastille.net in 2016 which allows external keyboard input to be injected into vulnerable dongles.
Logitech supplied firmware patches but other manufacturers failed to respond to this vulnerability.
Browserless
In Browserless clickjacking,
attackers utilize vulnerabilities in programs to replicate classic clickjacking in them, without being required to use the presence of a web browser.
This method of clickjacking is mainly prevalent among mobile devices, usually on
Android devices
Android is an operating system based on a modified version of the Linux kernel and other open-source software, designed primarily for touchscreen-based mobile devices such as smartphones and tablets. Android has historically been developed by ...
, especially due to the way in which
toast notifications work. Because
toast notifications have a small delay in between the moment the notification is requested and the moment the notification actually displays on-screen,
attackers are capable of using that gap to create a dummy button that lies hidden underneath the notification and can still be clicked on.
CookieJacking
CookieJacking is a form of clickjacking in which cookies are stolen from the victim's
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
s. This is done by tricking the user into dragging an object which seemingly appears harmless but is in fact making the user select the entire content of the cookie being targeted. From there, the attacker can acquire the cookie and all of the data that it possesses.
FileJacking
In fileJacking, attackers use the web browser's capability to navigate through the computer and access computer files in order to acquire personal data. It does so by tricking the user into establishing an active file server (through the file and folder selection window that browsers use). With this, attackers can now access and take files from their victims' computers.
Password manager attack
A 2014 paper from researcher at the
Carnegie Mellon University
Carnegie Mellon University (CMU) is a private research university in Pittsburgh, Pennsylvania, United States. The institution was established in 1900 by Andrew Carnegie as the Carnegie Technical Schools. In 1912, it became the Carnegie Institu ...
found that while browsers refuse to autofill if the protocol on the current login page is different from the protocol at the time the password was saved, some
password manager
A password manager is a software program to prevent password fatigue by Random password generator, automatically generating, Autofill, autofilling and storing Password, passwords. It can do this for Application software, local applications or web ...
s would insecurely fill in passwords for the http version of https-saved passwords. Most managers did not protect against
iFrame- and
redirection-based
attacks and exposed additional passwords where
password synchronization had been used between multiple devices.
Prevention
Client-side
NoScript
Protection against clickjacking (including likejacking) can be added to
Mozilla Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curren ...
desktop and mobile versions by installing the
NoScript
NoScript (or NoScript Security Suite) is a free and open-source extension for Firefox- and Chromium-based web browsers, written and maintained by Giorgio Maone, a software developer and member of the Mozilla Security Group.
Features
Active ...
add-on: its ClearClick feature, released on 8 October 2008, prevents users from clicking on invisible or "redressed" page elements of embedded documents or applets. According to Google's "Browser Security Handbook" from 2008, NoScript's ClearClick is a "freely available product that offers a reasonable degree of protection" against Clickjacking.
Protection from the newer cursorjacking attack was added to NoScript 2.2.8 RC1.
NoClickjack
The "NoClickjack" web browser add-on (
browser extension
A browser extension is a software module for customizing a web browser. Browsers typically allow users to install a variety of extensions, including user interface modifications, cookie management, ad blocking, and the custom scripting and st ...
) adds client-side clickjack protection for users of
Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
,
Mozilla Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curren ...
,
Opera
Opera is a form of History of theatre#European theatre, Western theatre in which music is a fundamental component and dramatic roles are taken by Singing, singers. Such a "work" (the literal translation of the Italian word "opera") is typically ...
and
Microsoft Edge
Microsoft Edge is a Proprietary Software, proprietary cross-platform software, cross-platform web browser created by Microsoft and based on the Chromium (web browser), Chromium open-source project, superseding Edge Legacy. In Windows 11, Edge ...
without interfering with the operation of legitimate iFrames. NoClickjack is based on technology developed for GuardedID. The NoClickjack add-on is free of charge.
GuardedID
GuardedID (a commercial product) includes client-side clickjack protection for users of Internet Explorer without interfering with the operation of legitimate iFrames. GuardedID clickjack protection forces all frames to become visible. GuardedID teams with the add-on NoClickjack to add protection for
Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
,
Mozilla Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curren ...
,
Opera
Opera is a form of History of theatre#European theatre, Western theatre in which music is a fundamental component and dramatic roles are taken by Singing, singers. Such a "work" (the literal translation of the Italian word "opera") is typically ...
and
Microsoft Edge
Microsoft Edge is a Proprietary Software, proprietary cross-platform software, cross-platform web browser created by Microsoft and based on the Chromium (web browser), Chromium open-source project, superseding Edge Legacy. In Windows 11, Edge ...
.
Gazelle
Gazelle
A gazelle is one of many antelope species in the genus ''Gazella'' . There are also seven species included in two further genera; '' Eudorcas'' and '' Nanger'', which were formerly considered subgenera of ''Gazella''. A third former subgenus, ' ...
is a
Microsoft Research
Microsoft Research (MSR) is the research subsidiary of Microsoft. It was created in 1991 by Richard Rashid, Bill Gates and Nathan Myhrvold with the intent to advance state-of-the-art computing and solve difficult world problems through technologi ...
project secure web browser based on IE, that uses an
OS-like security model and has its own limited defenses against clickjacking. In Gazelle, a window of different origin may only draw dynamic content over another window's screen space if the content it draws is opaque.
Intersection Observer v2
The Intersection Observer v2 API introduces the concept of tracking the actual "visibility" of a target element as a human being would define it. This allows a framed widget to detect when it's being covered. The feature is enabled by default since
Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
74, released in April 2019. The API is also implemented by other
Chromium-based browsers, such as Microsoft Edge and Opera.
Server-side
Framekiller
Web site owners can protect their users against UI redressing (frame based clickjacking) on the server side by including a
framekiller JavaScript snippet in those pages they do not want to be included inside frames from different sources.
Such JavaScript-based protection is not always reliable. This is especially true on Internet Explorer,
where this kind of countermeasure can be circumvented "by design" by including the targeted page inside an
element.
X-Frame-Options
Introduced in 2009 in
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
8 was a new HTTP header
X-Frame-Options
which offered a partial protection against clickjacking and was adopted by other browsers (
Safari
A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
,
Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curr ...
,
Chrome, and
Opera
Opera is a form of History of theatre#European theatre, Western theatre in which music is a fundamental component and dramatic roles are taken by Singing, singers. Such a "work" (the literal translation of the Italian word "opera") is typically ...
) shortly afterwards. The header, when set by website owner, declares its preferred framing policy: values of
DENY
,
ALLOW-FROM ''origin''
, or
SAMEORIGIN
will prevent any framing, framing by external sites, or allow framing only by the specified site, respectively. In addition to that, some advertising sites return a non-standard
ALLOWALL
value with the intention to allow framing their content on any page (equivalent of not setting X-Frame-Options at all).
In 2013 the X-Frame-Options header has been officially published as RFC 7034, but is not an Internet standard. The document is provided for informational purposes only. The W3C's Content Security Policy Level 2 Recommendation provides an alternative security directive, frame-ancestors, which is intended to obsolete the X-Frame-Options header.
A security header like X-Frame-Options will not protect users against clickjacking attacks that are not using a frame.
Content Security Policy
The
frame-ancestors
directive of
Content Security Policy (introduced in version 1.1) can
allow or disallow embedding of content by potentially hostile pages using iframe, object, etc. This directive obsoletes the X-Frame-Options directive. If a page is served with both headers, the frame-ancestors policy should be preferred by the browser.
—although some popular browsers disobey this requirement.
Example frame-ancestors policies:
# Disallow embedding. All iframes etc. will be blank, or contain a browser specific error page.
Content-Security-Policy: frame-ancestors 'none'
# Allow embedding of
own content only.
Content-Security-Policy: frame-ancestors 'self'
# Allow specific origins to embed this content
Content-Security-Policy: frame-ancestors www.example.com www.wikipedia.org
See also
*
Mousetrapping
*
Browser security
Browser security is the application of Internet security to web browsers in order to protect networked data and computer systems from breaches of privacy or malware. Security exploits of browsers often use JavaScript, sometimes with cross-site s ...
*
Click fraud
Click fraud is a type of ad fraud that occurs on the Internet in pay per click (PPC) online advertising. In this type of advertising, the owners of websites that post the ads are paid based on how many site visitors click on the ads. Fraud occurs ...
*
Cross-site scripting
Cross-site scripting (XSS) is a type of security vulnerability that can be found in some web applications. XSS attacks enable attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be ...
*
Internet safety
Internet safety, also known as online safety, cyber safety, and digital safety, is the science and practice of reducing harms that occur through the (mis)use of technology. It is a multidisciplinary, multi-stakeholder field that encompasses the des ...
*
Internet security
Internet security is a branch of computer security. It encompasses the Internet, browser security, web site security, and network security as it applies to other applications or operating systems as a whole. Its objective is to establish rules ...
*
Malvertising
Malvertising (a portmanteau of "malicious software (malware) advertising") is the use of online advertising to spread malware. It typically involves injecting malicious or malware-laden advertisements into legitimate online advertising networks ...
*
Phishing
Phishing is a form of social engineering and a scam where attackers deceive people into revealing sensitive information or installing malware such as viruses, worms, adware, or ransomware. Phishing attacks have become increasingly sophisticate ...
*
Security hacker
A security hacker or security researcher is someone who explores methods for breaching or bypassing defenses and exploiting weaknesses in a computer system or network. Hackers may be motivated by a multitude of reasons, such as profit, pro ...
*
Social jacking
References
{{Malware
Hacking (computer security)
Computing culture
Web security exploits
Social engineering (security)
Client-side web security exploits