History Sniffing
   HOME

TheInfoList



OR:

History sniffing is a class of web vulnerabilities and attacks that allow a website to track a user's
web browsing history Web browsing history refers to the list of web pages a user has visited, as well as associated metadata Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the ...
activities by recording which websites a user has visited and which the user has not. This is done by leveraging long-standing
information leakage Information leakage happens whenever a system that is designed to be closed to an eavesdropper reveals some information to unauthorized parties nonetheless. In other words: Information leakage occurs when secret information correlates with, or ca ...
issues inherent to the design of the web platform, one of the most well-known of which includes detecting CSS attribute changes in links that the user has already visited. Despite being known about since 2002, history sniffing is still considered an unsolved problem. In 2010, researchers revealed that multiple high-profile websites had used history sniffing to identify and track users. Shortly afterwards,
Mozilla Mozilla is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, publishes and supports Mozilla products, thereby promoting free software and open standards. The community is supported institution ...
and all other major web browsers implemented defences against history sniffing. However, recent research has shown that these mitigations are ineffective against specific variants of the attack and history sniffing can still occur via visited links and newer browser features.


Background

Early
browsers Browse, browser, or browsing may refer to: Computing *Browser service, a feature of Microsoft Windows to browse shared network resources *Code browser, a program for navigating source code *File browser or file manager, a program used to manage f ...
such as
Mosaic A mosaic () is a pattern or image made of small regular or irregular pieces of colored stone, glass or ceramic, held in place by plaster/Mortar (masonry), mortar, and covering a surface. Mosaics are often used as floor and wall decoration, and ...
and
Netscape Navigator The 1990s releases of the Netscape (web browser), Netscape line referred to as Netscape Navigator were a series of now discontinued web browsers. from versions 1 to 4.08. It was the Core product, flagship product of the Netscape, Netscape Comm ...
were built on the model of the web being a set of statically linked documents known as pages. In this model, it made sense for the user to know which documents they had previously visited and which they hadn't, regardless of which document was referring to them. Mosaic, one of the earliest graphical web browsers, used purple links to show that a page had been visited and blue links to show pages that had not been visited. This paradigm stuck around and was subsequently adopted by all modern web browsers. Over the years, the web evolved from its original model of static content towards more dynamic content. In 1995, employees at
Netscape Netscape Communications Corporation (originally Mosaic Communications Corporation) was an American independent computer services company with headquarters in Mountain View, California, and then Dulles, Virginia. Its Netscape web browser was o ...
added a scripting language,
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 ...
, to its flagship web browser, Netscape Navigator. This addition allowed users to add interactivity to the web page via executing Javascript programs as part of the rendering process. However, this addition came with a new security problem, that of these Javascript programs being able to access each other's
execution context Execution in computer and software engineering is the process by which a computer or virtual machine interprets and acts on the instructions of a computer program. Each instruction of a program is a description of a particular action which must b ...
and sensitive information about the user. As a result, shortly afterwards, Netscape Navigator introduced the
same-origin policy In computing, the same-origin policy (SOP) is a concept in the web application security model. Under the policy, a web browser permits scripts contained in a first web page to access data in a second web page, but only if both web pages have the sa ...
. This security measure prevented Javascript from being able to arbitrarily access data in a different web page's execution context. However, while the same-origin policy was subsequently extended to cover a large variety of features introduced before its existence, it was never extended to cover hyperlinks since it was perceived to hurt the user's ability to browse the web. This innocuous omission would manifest into one of the well known and earliest forms of history sniffing known on the web.


History

One of the first publicly disclosed reports of a history sniffing exploit was made by Andrew Clover from
Purdue University Purdue University is a Public university#United States, public Land-grant university, land-grant research university in West Lafayette, Indiana, United States, and the flagship campus of the Purdue University system. The university was founded ...
in a mailing list post on
BUGTRAQ Bugtraq was an electronic mailing list dedicated to issues about computer security. On-topic issues are new discussions about vulnerabilities, vendor security-related announcements, methods of exploitation, and how to fix them. It was a high-volume ...
in 2002. The post detailed how a malicious website could use Javascript to determine if a given link was of a specific colour, thus revealing if the link had been previously visited. While this was initially thought of to be a theoretical exploit with little real-world value, later research by ''Jang et al.'' in 2010 revealed that high-profile websites were using this technique in the wild to reveal user browsing data. As a result multiple lawsuits were filed against the websites that were found to have used history sniffing alleging a violation of the Computer Fraud and Abuse Act of 1986. In the same year, L. David Baron from
Mozilla Corporation The Mozilla Corporation is a wholly owned subsidiary of the Mozilla Foundation that coordinates and integrates the development of Internet-related applications such as the Firefox web browser, by a global community of open-source developers, s ...
developed a defence against the attack that all major browsers would later adopt. The defence included restrictions against what kinds of CSS attributes could be used to style visited links. The ability to add background images and CSS transitions to links was disallowed. Additionally, visited links would be treated identically to standard links, with Javascript
application programming interfaces An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build su ...
(APIs) that allow the website to query the color of specific elements returning the same attributes for a visited link as those for non-visited links. This ensured malicious websites could not simply infer a person's browsing history by querying the colour changes. In 2011, research by then-
Stanford Leland Stanford Junior University, commonly referred to as Stanford University, is a private research university in Stanford, California, United States. It was founded in 1885 by railroad magnate Leland Stanford (the eighth governor of and th ...
graduate student
Jonathan Mayer Jonathan Mayer (born February 5, 1987) is an American computer scientist and lawyer. He is an Associate Professor of Computer Science and Public Affairs at Princeton University affiliated with the Center for Information Technology Policy, and was ...
found that advertising company Epic Marketplace Inc. had used history sniffing to collect information about the browsing history of users across the web. A subsequent investigation by the
Federal Trade Commission The Federal Trade Commission (FTC) is an independent agency of the United States government whose principal mission is the enforcement of civil (non-criminal) United States antitrust law, antitrust law and the promotion of consumer protection. It ...
(FTC) revealed that Epic Marketplace had used history sniffing code as a part of advertisements in over 24,000 web domains, including
ESPN ESPN (an initialism of their original name, which was the Entertainment and Sports Programming Network) is an American international basic cable sports channel owned by the Walt Disney Company (80% and operational control) and Hearst Commu ...
and
Papa Johns Papa John's International, Inc., trade name, trading as Papa Johns, is an American pizza restaurant chain. , it is the fourth largest pizza delivery restaurant chain in the United States, with headquarters in the Louisville, Kentucky and Atlant ...
. The Javascript code allowed Epic Marketplace to track if a user has visited any of over 54,000 domains. The resulting data was subsequently used by Epic Marketplace to categorize users into specific groups and serve advertisements based on the websites the user had visited. As a result of this investigation, the FTC banned Epic Marketplace Inc. from conducting any form of online advertising and marketing for twenty years and was ordered to permanently delete the data it had collected.


Threat model

The
threat model Threat modeling is a process by which potential threats, such as structural vulnerabilities or the absence of appropriate safeguards, can be identified and enumerated, and countermeasures prioritized. The purpose of threat modeling is to provide d ...
of history sniffing relies on the adversary being able to direct the victim to a malicious website entirely or partially under the adversary's control. The adversary can accomplish this by compromising a previously good web page, by
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 ...
the user to a web page allowing the adversary to load arbitrary code, or by using a malicious advertisement on an otherwise safe web page. While most history sniffing attacks do not require user interactions, specific variants of the attacks need users to interact with particular elements which can often be disguised as buttons, browser games, CAPTCHAs, and other such elements.


Modern variants

Despite being partially mitigated in 2010, history sniffing is still considered an unsolved problem. In 2011, researchers at
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 ...
showed that while the defences proposed by Mozilla were sufficient to prevent most non-interactive attacks, such as those found by ''Jang et al.'', they were ineffective against interactive attacks. By showing users overlaid letters, numbers and patterns, which would only reveal themselves if a user had visited a specific website, the researchers were able to trick 307 participants into potentially revealing their browsing history via history sniffing. This was done by presenting the activities in the form of pattern solving problems, chess games and CAPTCHAs. In 2018, researchers at the
University of California, San Diego The University of California, San Diego (UC San Diego in communications material, formerly and colloquially UCSD) is a public university, public Land-grant university, land-grant research university in San Diego, California, United States. Es ...
demonstrated timing attacks that could bypass the mitigations introduced by Mozilla. By abusing the CSS paint API (which allows developers to draw a background image programmatically) and targeting the
bytecode Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normal ...
cache Cache, caching, or caché may refer to: Science and technology * Cache (computing), a technique used in computer storage for easier data access * Cache (biology) or hoarding, a food storing behavior of animals * Cache (archaeology), artifacts p ...
of the browser, the researchers were able to time the amount of time it took to paint specific links. Thus, they were able to provide probabilistic techniques for identifying visited websites. Since 2019, multiple history sniffing attacks have been found targeting various newer features browsers provide. In 2020, ''Sanchez-Rola et al.'' demonstrated that by measuring the time a server takes to respond to a request with
HTTP cookies 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 br ...
and then comparing it to how long it took for a server to respond without cookies, a website could perform history sniffing. In 2023, ''Ali et al.'' demonstrated that newly introduced browser features could be abused also to perform history sniffing. One particularly notable example highlighted was the fact that a recently introduced feature, the Private Tokens API, introduced under Google's
Privacy Sandbox The Privacy Sandbox is an initiative led by Google to create web standards for websites to access user information without compromising privacy. Its core purpose is to facilitate online advertising by sharing a subset of user private information ...
initiative with an intention to prevent user tracking, could allow malicious actors to exfiltrate users browsing data by using techniques similar to those used for cross-site leak attacks.


References

{{Information security Web security exploits Internet privacy Client-side web security exploits