scieee AI-readable full text Open interactive document viewer

A novel approach to web tracking detection and removal with minimal functionality loss

Castell Uroz, Ismael

Abstract

(English) echnologies are extensively used to collect huge amounts of personal information from our online activity, including the things we search for, the sites we visit, the people we contact, or the products we buy. Although it is commonly believed that such big data sets are mainly used for targeted advertising, some recent works have revealed that they are actually exploited for many other purposes, including price discrimination, financial assessment, determination of insurance coverage, background scanning, and even identity theft. Contrary to popular belief, such information is not only collected by big Internet players, such as Google and Facebook, but also by more shady and unknown companies called data brokers. Data brokers are pervasive on the current Internet, and their only purpose is to silently collect and aggregate large amounts of personal information. This information is then used to build individual profiles (often of low quality) about us, which are sold to the highest bidder without our explicit knowledge or the option to revise their correctness. The main objective of this thesis is to research new countermeasures that can decrease or completely block web tracking systems running in the background. For this purpose, the thesis has three objectives: (i) develop a new measurement system that can collect information in a bigdata environment such as the Internet; (ii) research new methodologies to automatically detect unknown web tracking technologies while minimizing website functionality loss; and (iii) apply the research results obtained in order to create actual tools that can be useful for the different actors concerned about privacy. This manuscript presents a compendium of publications that address all the objectives presented. In order to handle the first objective, we developed a new framework called Online Resource Mapper, which is able to collect complete online data sets, including millions of websites with al their internal URLs and online resources. In addition, we also study the impact in performance and quality of experience of content blockers, the most popular current privacy-protection technology. The second objective is tackled by means of three different publications presenting new ways to discover unknown web tracking systems. The first work presents an alternative to content blockers that potentially fixes their biggest vulnerability: the lack of adaptation to detect new web tracking URLs not present in the pattern lists. Our solution uses a deep neural network to discover with a 97% accuracy patterns that can be used to detect new tracking URLs. Going one step further, instead of looking at the URL, we decide to inspect the actual code of the website to discover not only tracking based on URL similarity, but completely new web tracking methods. Our first proposal, called TrackSign, uses the combination of a heuristic code partition model with a novel three-layer network graph in order to discover new web tracking systems. Our method achieves 92% detection accuracy, and it is one of the first approaches to do it in an automatic and generic fashion. Our last publication on the topic presents an evolution of TrackSign, called ASTrack, that addresses its main vulnerability, the false negatives obtained when websites obfuscate their internal resources with code renaming techniques. ASTrack uses the structure of the code instead of the code itself to identify web tracking systems shared by multiple websites. Moreover, ASTrack can exclusively remove the web tracking code while maintaining the rest of it intact, which minimizes functionality loss problems as a result of blocking complete resources. Lastly, in order to address the third objective, we shared publicly the results obtained during our experiments first in the form of a web tracking data set including about 75 million URLs and 45 million labeled online resources, and secondly in a new ePrivacy observatory called ePrivo.

Full text

A Novel Approach to Web Tracking Detection and Removal with Minimal Functionality Loss By Ismael Castell Uroz Departament d’Arquitectura de Computadors Universitat Polit` ecnica de Catalunya Advisor: Pere Barlet Ros Thesis by Compendium of Publications submitted for the degree of Doctor of Philosophy in Computer Architecture Barcelona, April 2023 This thesis is submitted to the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya in fulfilment of the requirements for the degree in Doctor of Philosophy in Computer Architecture. This thesis is entirely my own work, and except where otherwise stated, describes my own research. Ismael Castell Uroz, May 2023 Copyright © 2023 Ismael Castell Uroz Acknowledgements During the last four years, I have devoted most of my time to investigating one of the, from my point of view, most important problems of today’s Internet: the privacy on the Internet and its implications in our everyday lives. During this journey, I have met and collaborated with many people whose opinions and suggestions have influenced the work presented in this dissertation. Unfortunately, the COVID pandemic hit us just after my first year of research, forcing everyone to work remotely in order to minimize the contagion. This fact directly impacted my research, as it is very hard to meet new colleagues on the topic without physically interacting with them in conferences and other common places. Nevertheless, I would like to show my deep gratitude to some of the people who deserve a special mention and made this dissertation possible, for advising me, supporting me, working with me, or just being there when I needed them most. First and foremost, I would like to express my sincere gratitude to my advisor, Prof. Pere Barlet, whose vast expertise and clever advice guided me in the right direction to fulfill our expectations. Without his support and tireless perseverance, I would not have been able to achieve the same comprehension on the topic and to develop relevant research publications. Our conversations and discussions about the research, as well as about many other unrelated things, helped me grow both intellectually and personally. I would also like to express my gratitude to Prof. Josep Sol´ e Pareta, who co-advised my master’s thesis and was also my Ph.D. co-advisor during the first year. Thank you for all the support and for inviting me to do the master, the first of the chain of elections that brought me here. Second, I would like to thank the support of the National Institute of Informatics, and in particular Prof. Kensuke Fukuda, for allowing me to do a research stay in Japan, which gave me the opportunity to interact and share opinions in a different environment. His great advice and accurate suggestions helped me develop my research even further and obtain better results. I would also like to thank our research group members Jos´ e Su´ arez, Paul Almasan, Jordi Pailliss´ e, Hamidreza Taghvaee, and Faezeh Zarrinkhat, who contributed with interesting conversations and bad jokes to the great atmosphere in the office while it was possible. In particular, I would especially like to thank Albert L´ opez, whose support was key to allowing me to perform the research experiments remotely. Finally, my sincere appreciation to the members of my PhD defense committee (Dr. Valent´ ın Carela, Dr. Jens Myrup, and Dr. Hammed Haddadi) for taking the time to evaluate the thesis. Also to the external reviewers ( Dr. Jens Myrup, and Dr. Hammed Haddadi), and the pre-defense committee (Dr. Albert Cabellos, Dr. Eva Rodr´ ıguez, and Dr. Valent´ ın Carela) for reading the manuscript and providing useful feedback. A nivel personal, me gustar´ ıa agradecer a mi familia por todo el apoyo incondicional que me han dado durante toda mi vida, aunque ello supusiese tomar decisiones que nos alejasen durante varios a˜ nos. A mi hermano Bezalel por estar ah´ ı y ser no s´ olo mi hermano, sino tambi´ en mi mejor amigo, y compartir muchos de los mejores momentos de mi vida. Gracias a vuestros consejos y apoyo he podido dedicarme a lo que m´ as me gusta y llevar una vida plena. Por ´ ultimo, a mi mujer Miyuki, sin cuyo apoyo y ´ animo no me hubiera decidido a realizar este doctorado. Gracias por estar ah´ ı tanto en los buenos como en los malos momentos. ¡Muchas gracias a todos! Abstract Web tracking technologies are extensively used to collect huge amounts of personal information from our online activity, including the things we search for, the sites we visit, the people we contact, or the products we buy. Although it is commonly believed that such big data sets are mainly used for targeted advertising, some recent works have revealed that they are actually exploited for many other purposes, including price discrimination, financial assessment, determination of insurance coverage, government surveillance, background scanning, and even identity theft. Contrary to popular belief, such information is not only collected by big Internet players, such as Google and Facebook, but also by more shady and unknown companies called data brokers. Data brokers are pervasive on the current Internet, and their only purpose is to silently collect and aggregate large amounts of personal information. This information is then used to build individual profiles (often of low quality) about us, which are sold to the highest bidder without our explicit knowledge or the option to revise their correctness, despite the impact this practice may have on our lives. The main objective of this thesis is to improve the current situation by researching new countermeasures that can decrease or completely block web tracking systems running in the background. For this purpose, the thesis has three well-defined objectives: (i)develop a new measurement system that can collect information in a big-data environment, such as the Internet, and bring to light the current status of web tracking in the wild; (ii)research new methodologies to automatically detect new and unknown web tracking technologies while minimizing website functionality loss; and (iii)apply the research results obtained in order to create actual tools that can be useful for the different actors concerned about privacy, such as privacy regulators, website developers, or the end user. This manuscript presents a compendium of publications that address all the objectives presented. In order to handle the first objective, we developed a new framework called Online Resource Mapper, which is able to collect complete online data sets, including millions of websites with all their internal URLs and online resources. The tool is then used to explore the current imprint of web tracking on the Internet, and reveal that more than 80 percent of websites include web tracking algorithms. In addition, we also study content blockers, the most popular current privacy-protection technology, which block URLs using manually curated pattern lists. We found that, contrary to popular belief, the performance and quality of experience of most websites decrease when using them. The second objective is tackled by means of three different publications presenting new ways to discover unknown web tracking systems. The first work presents an alternative to content blockers that is also based on detecting tracking URLs. However, it potentially fixes content blockers’ biggest vulnerability: the lack of adaptation to detect new web tracking URLs not present in the pattern lists. Our solution uses a deep neural network, in combination with a preprocessing phase, in order to discover patterns that can be used to detect new tracking URLs. Our new methodology presents about a 97 percent of detection accuracy, detecting hundreds of tracking URLs not detected by current content blockers. Going one step further, instead of looking at the URL, we decide to inspect the actual code of the website to discover not only tracking based on URL similarity, but completely new web tracking methods. Our first proposal, called TrackSign, uses the combination of a heuristic code partition model with a novel three-layer network graph in order to discover websites sharing pieces of code with a high probability of being used for tracking purposes. Our method achieves 92 percent detection accuracy, and it is one of the first approaches to do it in an automatic and generic fashion. Thanks to TrackSign we estimate that about 95% of websites use some kind of user identification method. Our last publication on the topic presents an evolution of TrackSign, called ASTrack, that addresses its main vulnerability, the false negatives obtained when websites obfuscate their internal resources with code renaming techniques. ASTrack uses the structure of the code instead of the code itself to identify web tracking systems shared by multiple websites. However, working with the structure also allows ASTrack to clearly delimit the portions of code used for tracking purposes. Thus, ASTrack can exclusively remove the web tracking code while maintaining the rest of it intact, which minimizes functionality loss problems as a result of blocking complete resources. Lastly, in order to address the third objective, we shared publicly the results obtained during our new web tracking detection methodologies, first in the form of a web tracking data set including about 75 million URLs and 45 million labeled online resources, and secondly in a new ePrivacy observatory called ePrivo. ePrivo permits users to inspect any given website in order to reveal the web tracking systems running in the background. II Compendium of Publications 43 Paper I: Network Measurements for Web Tracking Analysis and Detection:ATutorial ............................... 45 Paper II: Demystifying Content-blockers: Measuring their Impact on Performance and Quality of Experience . . . . . . . . . . . . . . . . . . . 53 Paper III: URL-based Web Tracking Detection Using Deep Learning . . . . 65 Paper IV: TrackSign: Guided Web Tracking Discovery . . . . . . . . . . . . 71 Paper V: ASTrack: Automatic Detection and Removal of Web Tracking Code with Minimal Functionality Loss . . . . . . . . . . . . . . . . . . 81 Paper VI: TrackSign-labeled web tracking dataset . . . . . . . . . . . . . . . 91 Paper VII: ePrivo: An Online Service for Automatic Web Tracking Discovery .................................... 97 A Other privacy-related publications 107 A.1 A first look into Alexa’s interaction security . . . . . . . . . . . . . . . 109 A.2 Amazon Alexa traffic traces . . . . . . . . . . . . . . . . . . . . . . . . 111 Bibliography 117 ii List of Figures 2.1 Web tracking classification . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Third-party trackers included in the newspaper El Pais (943 companies). ..................................... 22 List of Tables 2.1 Fingerprinting features . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2 Top browsing history trackers . . . . . . . . . . . . . . . . . . . . . . . 23 2.3 Privacy policies comparison . . . . . . . . . . . . . . . . . . . . . . . . 25 iii iv Part I Thesis body 1 Chapter 1 Introduction Although the adoption of the Internet is relatively recent in human history, nowadays, the Internet is usually seen as something natural. The abundance of handheld devices with Internet capabilities, such as smartphones, is so great that almost everybody can carry this “infinite” source of knowledge in their pockets. Young people grow up using them in several aspects of their everyday lives. Thus, advances such as high-resolution cameras, touch panels, or the myriad of sensors included inside most smartphones are natural for them. However, the current Internet is far from being a secure place from the users’ point of view. Recent advances changed the Internet from a set of static websites with linking capabilities, to a dynamic and ever-changing environment where the content is specifically created for every user. This evolution has been so fast that social aspects, such as the loss of privacy and its consequences, are still unknown at many levels. New online technologies and the exploitation of information leaks are extensively used to collect large amounts of personal information from our online activity, including the things we search for, the sites we visit, the people we contact, or the products we buy. Although it is commonly believed that such data is mainly used for targeted advertising, it has been demonstrated that it is being used for other purposes that can affect people’s lives far beyond the customization of content. Some recent works ([1,2,3,4,5]) revealed that it is actually exploited for price discrimination, financial assessment, determination of insurance coverage, government surveillance, background scanning, or identity theft between others. For instance, most people do not know that social networks collect personal information from every website that contains one of their social interaction buttons, even for people without an account. Those websites include blogs, video platforms, online newspapers, or other online services that, by looking at the content, 3 can be directly related to sensible information. In 2016 a company called Cambridge Analytica [6], currently the subject of ongoing criminal investigations, used the information of millions of Facebook users, collected without their consent, for political purposes. Specifically, they aimed for support for Donald Trump in the USA president election and for Leave.EU, an organization in favor of leaving the European Union, in the United Kingdom’s referendum on European Union membership. Both of the elections were won by a very narrow margin (1 to 2 percent), with one of the key factors being the marketing campaigns in social networks created by Cambridge Analytica. Those marketing campaigns were addressed to a very specific set of users that could be persuaded to vote for them, selected by means of data-mining algorithms over personal information such as race, gender, age, hobbies, or political ideologies. This is the perfect example of how working with personal data can have such a dramatic influence that it can even change a country’s history. Unfortunately, this is not exclusive to social networks. Nowadays, most websites (more than 95 percent [7]) collect personal information for their own processes or for selling it. The existence of so-called ”data brokers”, companies whose objective is to collect as much personal information as possible to resell it to other companies, is mostly unknown by the vast majority of Internet users. However, those selling processes are common in the industry, even if in many cases they can contain incomplete or wrong information as they group data by means of identifiers that can be non-unique (e.g., name and a surname, nickname). Nevertheless, the real people targeted by the services using these data can be personally affected, even though the data itself is incorrect. The collection of techniques used to obtain user personal information is called Web Tracking. The infamous cookies are the most popular method. However, tracking methods have become more and more sophisticated, even using obfuscation techniques [8]. As a result, finding them has lately become a matter of luck, involving a lot of manual work trying to discover methods that can be illegitimately used for tracking within all the resources and functions available in the very different web programming languages. To make matters worse, analyzing Internet traffic has become one of the biggest Big Data problems ever. Currently, there are more than 20 billion devices connected to the Internet, while every day around 2.300 exabytes (1 billion gigabytes) of new content are created [9]. Every second, more than 50.000 GB of network data is moved by the Internet core [10]. Thus, it is 4 very challenging to collect, process, and analyze the Internet traffic to detect new tracking methods and other security and privacy threats. Currently available technologies developed to mitigate these threats, such as content filtering plugins (e.g., adblockers), are a first approach to alleviating the problem and represent a big step forward in regaining the Internet from a privacy point of view. But how much benefit can the user get from using block list methods, such as adblockers, when new methods are constantly emerging? This thesis aims to answer those questions by developing new web tracking detection methodologies that will permit better blocking technologies to improve the current state of things on the Internet. In particular, we developed a new methodology to automatically detect and remove both known and unknown web trackers while keeping the website functionality loss to a minimum. The rest of this chapter discusses the challenges behind this dissertation and provides an overview of the thesis main contributions. Finally, it also describes the structure of this manuscript. 1.1 Challenges and Contributions This thesis aims to solve some of the privacy problems inherent to the actual Internet. However, obtaining data about the web tracking systems running in the wild in a large-scale environment such as the Internet is very difficult. Previous works such as [11] and [12] presented their respective systems to explore a subset of websites and collect web tracking information. However, both of them explore the web from the URL perspective. In other words, they collect information about the URLs loaded by a domain but not about the files loaded by those URLs. As nowadays most web tracking systems are included inside JavaScript files that can be loaded by many different URLs, in order to detect and measure properties, such as those of the most common web tracking systems, we need information aggregated by the actual online resource loaded by the URL instead of the URL itself. Moreover, this information can also be used to extract patterns useful for detecting web tracking. Thus, at the beginning of this thesis, none of the systems were appropriate for our experiments. In Paper I we address this problem and present a new data collection tool called Online Resource Mapper (ORM) that explores the web from the point of view of online resources. Regarding the available privacy protection measures, the community has proposed multiple options (e.g., [13,14,15,16,17,18]). However, due to their difficulty 5 of deployment, the most popular are the so-called content blockers (e.g., Adblock Plus [19], uBlock Origin [20]), small browser plugins that compare in real time each opened URL to a predefined set of pattern lists with information about the alreadyknown web tracking systems. Many content blockers affirm that, as they block online resources before downloading them by directly blocking the URL, browsing performance is increased. However, in Paper II we discover that, in terms of performance, rather than an improvement, content-blockers introduce a small penalty in most websites because of the overhead of checking all the resources in real-time, refuting the original statement. Similarly, in terms of quality of experience, two of the three content blockers studied introduced a small decrease. On the other hand, content blockers present obvious limitations. First, there is no easy way to create and maintain pattern lists. Usually, the workload falls to an online community that manually curates the list. Thus, as new web tracking systems emerge constantly, the pattern lists used to detect the tracking URLs become obsolete very quickly. Moreover, it is very easy to evade them just by changing the hosting domain or by periodically changing the URL containing the tracking file. In Paper III we develop Deep Tracker Detector (DTD), a new URL web tracking detection method applying a URL preprocessing phase and a deep learning algorithm (Deep Neural Network) to potentially detect new tracking URLs under different domains. To this end, the algorithm looks at the characteristics of the URL instead of the URL itself. The resultant system presents more than 97 percent detection accuracy while performing the detection exclusively from the URL. Despite the good accuracy of the DTD algorithm, it only detects web tracking URLs that are similar to other already-known web tracking URLs, but not unknown methods. In order to discover new identification algorithms, we need to inspect and study the actual file underneath the URL. There are numerous works that explore the website code in the literature (e.g., [13,14,17,18,21,22]). Many of them apply machine learning techniques in order to extract features that can identify specific web tracking systems. However, these solutions are usually overspecialized, only detecting the methods that they were trained to detect and not new web tracking systems. In Paper IV, we address this lack of a generic detection methodology with a new algorithm called TrackSign. TrackSign works combining website code signatures, extracted with a deterministic partition algorithm based on Rabin fingerprinting [23], and a novel network graph representation containing online resources and their corresponding code signatures. The combination permits TrackSign to find common code shared 6 by many different files with a high probability of being used for web tracking purposes. According to our results, it is able to automatically find new web tracking systems not previously known with more than 92 percent accuracy, making it one of the first truly generic web tracking detection systems proposed in the literature. Unfortunately, web code signatures are extracted using a static analysis of the code, which makes TrackSign vulnerable to obfuscation [8] and other similar code renaming techniques, a common problem to most of the proposed solutions. Moreover, the deterministic partition algorithm used by TrackSign has room for improvement, as it permits to detect web tracking code inside a file but not to determine which part of the code is being used for actual tracking purposes. In Paper V we propose and validate a new algorithm called ASTrack that solves those problems. ASTrack looks at the abstract syntax tree (AST) structure of the JavaScript code instead of the code itself. By doing so, the algorithm stands robust against most code renaming and obfuscation techniques, as the structure will remain the same. Moreover, thanks to the AST node structure identification, ASTrack can determine which subtrees are being used for web tracking purposes and consequently remove only the code portions pertaining to those subtrees. Thanks to this characteristic, the algorithm not only detects unknown web tracking but can also automatically remove the found web tracking code, keeping the rest of the code intact. This approach minimizes the website functionality loss in comparison with the traditional methods, that block complete resources instead of only code portions. Previous approaches have tried to dynamically monkey patch some APIs commonly used for tracking [18] but, to the best of our knowledge, ASTrack is the first one that allows to dynamically remove all kinds of tracking code minimizing the functionality loss. Our results show that the algorithm is able to detect thousands of new tracking URLs and pieces of code, and remove them maintaining full functionality in about 98% of websites. To check website breakage we also propose and validate a novel methodology that uses computer vision techniques to look for differences between the original and the modified websites. The new methodology allows us to automatically find websites suspicious of being broken between thousands of them when, until now, the only alternative was manual inspection, greatly limiting the number of measures possible. Finally, in order to apply the research results obtained with TrackSign and AS- Track new methodologies, Paper VI presents a publication containing a TrackSignlabeled web tracking data set with information from the most popular 1.5 million 7 websites to ask for user consent in order to collect personal information by any means, including cookies. Since then, many other countries have instated similar policies (see Section 2.4), and nowadays most websites use consent banners to ask for the user’s consent. At first, cookies were mainly used for beneficial purposes such as saving the online shopping basket information or website aspect preferences. However, companies soon realized that cookies could be abused by setting very long expiration periods in order to precisely identify the user through many different sessions. Moreover, the browser also allows third-party scripts embedded inside a website to setup their own cookie. Thus, those third-party companies can also obtain information about the users’ visits to the website. This is the so-called cross-site tracking. As we will see in Section 2.2.3, third-party trackers are considered a serious privacy threat, as they can not only collect personal information but also infer it from the list of websites visited by the user. A technique called cookie synchronization (cookie syncing) permits different third-party trackers to share the cookie identifiers of their own users. In other words, it permits web trackers not embedded in one website to obtain information about the users visiting it. Cookie syncing uses an HTTP redirection, generated by one of the original third-party trackers embedded in the website, to open an element from an external web tracker not present in it. This redirection forces the browser to issue a new GET request using an especially crafted URL that includes the user identifier from the original embedded tracker. Thus, the external tracker obtains information about the user visiting the website and about the identifier inside the original tracker. In consequence, the external tracker can then generate a new redirection request to the original tracker, including its own identifier for the user. In this way, both web trackers synchronize the information about the user, and from that point on, both can identify the user in different places. The study presented in [29] shows that about 97 percent of users suffer this kind of track synchronization during a browsing session. Some techniques try to respawn the cookies after their deletion, resulting in the so-called supercookies. This technique saves the user’s personal identifier in different storage places and caches on the device, and whenever the website finds that one of the storage places has been cleaned, it restores the identifier from one of the other storage places. The first methods found in the literature [30] used the Flash programming language to store the identifier and respawn the original cookie file from it. Nowadays, Flash has become deprecated because of security 14 and privacy flaws, and current browsers do not accept it. However, alternative and sophisticated methods such as those presented below can be used for the same purpose. HTML5 storage: This kind of stateful technology also saves an identifier on the device browsing the website. However, instead of using the cookie space to save it, it uses the internal storage introduced alongside version 5 of the HTML protocol. In particular, it usually uses the storage named as “Local Storage” [31], as it does not require any plugin or special setting to use it, and its internal data persists until the user or the website actively removes it. HTML5 storage is automatically emptied when the user asks to clear the browser’s cookies. However, as the storage process is different, using HTML5 storage bypasses some of the protection measures, such as, for instance, browser plugins that actively block cookies in real time. Moreover, HTML5 storage allows up to five megabytes of information to be saved and does not require a living period, both of which are advantages over the traditional HTTP cookies. The research presented in [30] found that 17 of the top popular websites at the time used the Local Storage to store identifiers. It also found that the stored data was also used to respawn other stateful web tracking methodologies, such as Flash cookies, an old technology now blocked by most browsers because of its privacy and security issues. HTML5 IndexedDB: IndexedDB is another storage option available within the version 5 specification of the HTML [32]. In comparison to the HTML5 storage seen above, it uses a database file instead of a simple folder and file structure. However, its characteristics are equivalent to those of HTML storage, being also able to store up to five megabytes of data and resistant over multiple browsing sessions. The first report of using HTML5 IndexedDB to rebuild other cookies is from 2014 [33], one year before the final API recommendation was approved. 2.2.2 Cache-based stateful technologies A subset of stateful technologies abuses the different caches used by browsers to save the user identifier. Needless to say, these web tracking techniques do not ask 15 for the consent of the users and are completely transparent to them. This section includes information about the most common ones: Web Cache: Browsers maintain a special cache that contains all the files (e.g., libraries, thumbnails, images) accessed by the opened websites. This cache is mainly used to improve the loading times of already-visited websites or new websites that share very common libraries. Some web tracking systems abuse this cache to save identifiers inside the cached files using, for instance, an invisible div where they can easily access the cached file by means of the div id property [34]. Moreover, as browsers try to optimize the cache as much as possible, its files are shared by multiple websites. Thus, different online services can use the same cached files and share a common user identifier [35]. Favicons, the small icons visible in the tab of each website, are also cached by the browser. Although this cache space cannot be directly used to save an identifier, a more complex technique to abuse it uses a unique combination of favicons as the identifier [36]. To force the initial load on cache, the method uses a chain of redirects the first time the user opens the website. DNS Cache: The browser’s DNS cache maintains information about the naming resolution in order to speed up the website loading process. The technique studied at [37] saves inside the cache a statistically unique combination of DNS data used to tag the device for as long as it remains in the DNS cache. This combination is obtained by executing a series of DNS resolutions to tracker-owned servers, which will return a set of IP addresses in random order. As the order is randomized, each user will achieve statistical uniqueness, which will be used as the user’s tracking identification. Operational Caches: Operational caches are components used internally by the browser to store information used during the website loading process. Such stored information includes, for instance, permanent redirects or authentication credentials. The permanent redirect cache saves information about resources that are permanently available at other URLs. Some web tracking methods [38] redirect an 16 internal element to exactly the same URL but including an identifier. This new redirect is automatically saved inside the operational cache, and, the next time the user visits the same website, the online service obtains the identification by looking at the URL loaded by the browser. In case there is no identification number during the loading phase, the website determines that it is the first visit and dynamically redirects the element to trigger caching. The authentication credential cache is used to store the user credentials temporarily so they can be submitted automatically in the HTTP headers throughout the session. However, by means of JavaScript [39], systems can force a false authentication in the background that will be saved inside the cache even if the authentication process fails. From that point on, the browser will send the authentication credentials in each subsequent HTTP request done to the same domain. 2.2.3 Stateless technologies Contrary to stateful tracking technologies, stateless tracking technologies do not save an identifier inside the device while browsing the web but instead create a profile on the server based on the device’s characteristics. The features used are very diverse, but, as a rule of thumb, the more there are, the higher the precision that can be achieved to identify the user. The main stateless technologies are: Network and location: The network address and the location are two of the easiest pieces of personal information to obtain about a user. The IP global network address of the Internet connection used to browse the website is usually included in the HTTP headers. Many Internet service providers (ISP) recycle their IP addresses through dynamic IP address assignment services. Thus, the IP address itself is not necessarily an identifier for the user. However, this address reassignment process is usually done when the connection is reinitialized, but nowadays network devices tend to stay online for days, weeks, or even months. Moreover, certain ISPs permit the rental of a static IP address, which is commonly used by companies or users that want to provide some kind of professional or personal online service. Consequently, at some extent IP addresses continue to be a valid identifier in many cases and, as such, websites use them as one of the features to identify the user behind. On the other hand, the user location can be inferred directly from the IP address by means of any of the geolocation databases available online (e.g., [40,41]). Although not 17 as precise as the IP address itself, the location history can be used as extra data to infer other personal information. Fingerprinting: Fingerprinting algorithms match as many features as possible in order to create user profiles that can precisely identify them. They can include a huge amount of different features in order to identify not directly the user, but for instance the device being used to browse the web, the operating system installed, or the browser itself. Table 2.1 presents a collection of the most common features for each of those three kinds of fingerprinting. Most simple techniques look at numerous of those properties, such as the screen resolution [42], the version of the browser [43], or the fonts installed in the system [44], to combine them and create the corresponding identifier. All of them can easily be obtained through API calls, and, although many of them cannot be used as a unique identifier, their combination serves that purpose. For instance, the fonts installed on the device depend mostly on the software of the device, as many programs automatically add their required fonts during installation. Thus, the complete list of fonts will be different for each user, or, at least, it will reduce the number of people to be compared by means of other features. Another example would be the list of plugins installed in the browser. According to [45], the modifications in the DOM (see Section 2.1) introduced by most of the plugins available on the marketplace can be used to identify the plugin among the rest. Taking into account the high number of popular plugins and the fact that most users use a combination that matches their own preferences, this combination can be used as an identifier for the user, or at least to delimit a small population with the same plugins installed. Using this technique in combination with some other fingerprints can greatly simplify their identification. However, new browser features also contain very powerful API calls [46] that permit stateless web tracking algorithms to collect much more precise information. This API’s results vary depending on the hardware and software combinations that are installed in the device. Thus, those differences can be directly used as an identifier for the device itself. For instance, Canvas Fingerprinting [47] works by exploiting the HTML5 canvas element. When the user accesses the website, the tracking system automatically creates a canvas element containing a selected font and a background color and immediately calls the function toDataUrl to compute 18 Table 2.1: Fingerprinting features Device Fingerprinting OS Fingerprinting Browser Fingerprinting IP Address ✓ Geolocation ✓ OS version ✓ ✓ Screen resolution ✓ ✓ Timezone ✓ Fonts ✓ ✓ Browser version ✓ ✓ ✓ Browser language ✓ ✓ Multitouch capabilities ✓ Pointer capabilities ✓ Keyboard layout ✓ Microphone ✓ Camera ✓ TCP timestamp ✓ OS architecture ✓ System language ✓ Color depth ✓ Audio capabilities ✓ CPU brand ✓ GPU brand ✓ System drivers ✓ Browser instance ✓ Browser plugins ✓ Accepted media formats ✓ Cookies enabled ✓ Supercookies limitations ✓ its base64-encoded value. The canvas rendering process is different for every computer, and so is the resulting base64 value. Thus, the tracking system can use the hash of the value as a fingerprint to identify the device. Similarly, through the API calls AudioContext and OscillatorNode [11], the tracking website can create an audio signal to fingerprint the device, as audio signals present differences depending on the hardware and browser combination. Once more, the tracker will compute the hash value of the results and use it as a fingerprint for the device. GPU’s 3D capabilities can also be abused [48] to render images that will be used as part of the fingerprint. Moreover, in many cases this implementation permits to identify the device even when using different browsers to explore the web. 19 Browsing history: The list of websites browsed by any user can also be used as another stateless web tracking method. The research in [49] reveals that about 42 percent of the more than 368k users included in the study can be accurately identified by inspecting only which websites out of 50 predefined ones were visited. Moreover, if this number increases to 500 websites, the percentage of users that can be fingerprinted increases to 70 percent. The websites used were not exotic ones. All of them were included inside the top 500 most popular websites of Amazon’s Alexa [50] list or on the top 4,000 from QuantCast [51], an online marketing platform. In 2020, the same study was replicated in [52] with 51,000 Firefox users and 100 top sites, identifying almost 49,000 distinct browsing profiles, of which 99 percent were unique. However, the online browsing history is a powerful tool not only to use it as a user identifier but also to discover personal information not usually available through other methods. For instance, by looking at the blogs or online magazines a user visits, companies can collect information about the hobbies and interests of the user. Another example would be collecting information about the articles read on online newspapers, which can reveal sensible information such as political ideologies. Cambridge Analytica [6], a company focused on data mining for electoral purposes, used this kind of information to collect psychological profiles of millions of users and influence the results of the USA president election as well as the withdrawal of the United Kingdom from the European Union. The browsing history can be collected in multiple ways. Old versions of many browsers modified the color of the internal links of a web page if the user had already visited the website pointed at by that link. Thus, websites could include hidden links to a list of predefined websites and consult their color by means of CSS and JavaScript [26,53]. Nowadays, web browsers do not reveal previously visited links through this mechanism. However, the history can be obtained in more indirect ways. For instance, another technique to discover visited websites consists of measuring the loading time of a given website by indirectly generating a DNS lookup [35] through JavaScript. If the website has already been visited, and consequently cached by the browser, the loading time is faster than for non-visited websites. This technique can also be used with individual elements of any website, such as loading logos or favicons from other domains. Nevertheless, the most common way of obtaining users’ browsing histories is through a third-party service embedded in multiple domains. Nowadays, web- 20 sites often include common third-party services to increase the functionality of the site and attract more users. This functionality may include, between others, embedded video services [54,55], online maps [56,57] or marketing and analytic engines [58,59]. These are the so-called third-party services, and, in many popular browsers, the default settings allow them to identify the user. Aggregating information about the same users from multiple websites lets them know their browsing history. This web tracking technique is called cross-site tracking, and is the easiest way of collecting it. Third-party trackers are considered a serious privacy threat, as they can collect in the background, without the explicit knowledge of the user, huge amounts of personal information from users’ browsing activity. Thanks to the new privacy policies enforced by many countries (see Section 2.4), now users have the chance to inspect the list of third-party domains obtaining information from the visited website. Figure 2.2 shows a small subset of the list of third-party trackers included in “El Pa´ıs”, one of the most popular newspapers in Spain. The list contains a total of 943 third-party trackers, all of which obtain information about the news visited by all its website users. These third-party trackers are not exclusively present on this specific website. Usually they are shared by many other websites of very different categories. Thus, they can compute user profiles that include information as diverse as interests, hobbies, purchases, ideologies, and many other pieces of sensible information. However, the best example of third-party trackers are the social networks. Many websites include interaction buttons from the most popular social networks in order to engage their users and attract them. Social networks can obtain information about the original URL every time a website includes or loads one of their buttons. Moreover, as a third-party service, they can obtain their own cookie identifying the user on all of those websites. Thus, they can easily link the origin URL to the specific user, and obtain a very accurate profile of their activities online. Moreover, social networks can create user profiles even for people that are not logged into their services, as the website loads the social interaction buttons every time, whether or not the user has an account. Through other web tracking features, such as the network IP address or the fingerprinting features mentioned above, social networks can temporarily aggregate information that will remain precise until the identification features change. Table 2.2 includes a list extracted from the data set obtained in Paper VI containing the top browsing history trackers and their online presence. Between them, we can find many of the most popular social networks and online marketing analytics tools, with presence on several thousand websites. 21 Figure 2.2: Third-party trackers included in the newspaper El Pais (943 companies). 22 The population explored was the top 1.38 million most popular websites according to the Tranco list [60]. Table 2.2: Top browsing history trackers Company #Websites Google LLC. 1085993 Amazon Technologies Inc. 311151 Meta Platforms, Inc. 262467 Fastly Inc. 223826 YANDEX LLC. 76748 Adobe Inc. 75867 Twitter, Inc. 67379 Microsoft Corporation 65230 New Relic, Inc. 35199 Hotjar Ltd. 29989 Pinterest Inc. 25776 Alibaba Holdings Ltd. 24894 HUBSPOT INC. 22989 LinkedIn Corporation 20484 Quantcast Corporation 14127 Finally, Google requires special mention as, apart from being present in about 80% of websites, it also almost monopolizes the Internet browsers in both the PC and mobile markets. Their Chrome browser represents more than 65 percent [61] of global usage. Apple is also found in a dominant position, especially in the mobile market with about 25 percent [62], thanks to the Safari browser included by default in its iPhone terminals. Both companies have full access to the browsing histories of their users as a first-party, as they can obtain information about every website opened inside their browsers. Moreover, this companies force users to log in with their personal accounts in order to access the full range of their services and can track logged-in users non-anonymously as they have real information from their accounts, such as their names, phone numbers, and even geolocation by means of the GPS included in mobile phones. 2.3 Data brockers The literature [63] defines data brokers as companies or business units whose primary source of revenue is selling user personal information often not directly obtained from the user. Thus, although Google,Apple, or Facebook maintain a huge 23 Until 2012, user identification was mostly done by means of cookies or caused by some sort of information leakage. However, with the appearance of the first methodologies to fingerprint the browser [42,47], many companies started to use fingerprinting as their main identification process. In [72], Nikiforakis et al. study the fingerprinting methods included inside the libraries of three popular commercial companies. They discover multiple new features that can be used for fingerprinting purposes and are easily available through Flash and JavaScript APIs. Similarly, Acar et al. [33] perform the first large-scale study of one of the first complex fingerprinting methods, the canvas fingerprinting (Section 2.2.3). The results of a longitudinal study on a population of 100,000 websites show that about 5 percent of the websites already included this kind of web tracking. They also study the prevalence of cookie-syncing and supercookies (2.2.1) and find that about 22 percent of web trackers can obtain a sizable fraction of users’ browsing histories through this technique. In [73], Englehardt et al. also study the cookie syncinc prevalence and its implications for user surveillance, relating information from many users and websites. Falahrastegar et al. in [74] and [75] study the regionality of third-party trackers by inspecting the most popular websites from a list of countries from different continents. They found that, independently of the country, a small number of international companies are heavily dominant in terms of third-party tracking (e.g., social networks, marketing analytics companies). In [76] we show that this trend continues to the present, with approximately the same principal actors. In [77] they also show that many different organizations share personal identifiers, passed as parameters in linking URLs between them — a fact that allows them to explicitly identify users using different and allegedly independent services. The expansion of tracking is discussed by Lerner et al. in [78] using the Wayback Machine [79], a repository containing backups of millions of websites over a span of more than 20 years. Their results show that web tracking has been constantly increasing in both size and complexity, as recent tracking systems share more information than older ones. In [80], Metwalley et al. inspect the web tracking status by means of passive traces with data from about 10,000 different users. They identify the top third-party trackers and estimate that about 70 percent of websites include tracking systems. They also found that the top 100 trackers regularly collect information from 40 percent of users, with some of them tracking up to 98 percent. 30 In [8] Le et al. explore the top 10,000 Alexa rankings looking for obfuscated canvas-based fingerprinting. Their results show that more than 10 percent of the websites in the inspected population used canvas-fingerprinting to identify the user. Moreover, more than 2 percent of them use obfuscated versions of the algorithm, making them more difficult to detect by means of code inspection. Finally, in [81] Bujlow et al. conduct an exhaustive survey on web tracking, including details of all the mechanisms discovered to track the user, their implications, and defenses available to stop some of them. 3.2 Web Tracking Detection This section presents the previous work done on the detection of web tracking. The publications are grouped by the methodology followed to detect it. 3.2.1 Cookies Roesner et al. [82] developed a Firefox browser extension that measures the prevalence of web trackers using cookies. They group the different cookie tracking and cookie syncinc scenarios into five possible groups, such as analytics, advertising, or social widgets, and present the main characteristics of each one. The study includes the normal cookies as well as cookies saved inside the browser’s HTML local storage and flash storage. Their results show that the top trackers are either analytics engines or social networks. They also present ShareMeNot, a plugin that removes cookies by default from third-party social widgets and allows them only when the user presses the button. In [83] Li et al. present TrackAdvisor, a machine-learning algorithm trained to detect third-party cookies inside HTTP requests. The system presents almost perfect accuracy in detecting them, but it does not explore other alternatives working with cookies, such as using JavaScript APIs. They explore the top 10,000 most popular websites to find that almost half of them include third-party cookies, and that Google contains tracking cookies in about 25 percent of them. 3.2.2 Network properties Some works use network properties associated with web tracking systems in order to detect their presence. Yamada et al. [84] were one of the first to take this approach by means of temporal link analysis. They aggregate the network traffic 31 and construct a graph with the relations between the URLs and the visited times. Then they apply machine learning to characterize properties that can differentiate each site. Their approach presents high precision and detects some new trackers not present in the pattern lists used to label the data. However, it has a high false-negative ratio, with between 27 and 38 percent of already-known tracking not detected. In [85] Gugelmann et al. propose a machine-learning approach that uses as features network measurements like the number of bytes, requests, or third-party accesses to detect new web tracking domains. This information is used to detect new tracking domains not included in the current pattern lists and improve them. Unfortunately, the method only aggregates results at the domain level, not permitting the fine-grained detection necessary to differentiate between tracking and safe URLs from the same main domain. Other approaches, such as [16] from Kalavri et al., explore the network as a bipartite graph with information about the relationship between a domain and its loaded URLs. Using a projection of the graph, they find that subsets of web trackers form well-defined communities that can be detected with a high degree of accuracy. However, the method is unable to find trackers outside the communities (e.g., tracking systems using quickly changing domains to serve the content). 3.2.3 URL properties The URL characteristics can also be used to detect web tracking. In [86] Metwalley et al. present a tracking detection system based on the detection of unique identifiers inside the URL. In order to find them, they compare the URLs of multiple users accessing the same domain to discover differences between them. These differences are usually due to the long, randomized alphanumeric strings used as the identifier. In [15] Yu et al. present a similar method but apply the k-Anonimity algorithm to detect the identifier within the URL. Both implementations present very high accuracy in detecting this kind of tracking. However, they do not detect other techniques such as simple cookies or fingerprinting algorithms. Moreover, this detection approach can be easily evaded by introducing some complexity to the identification algorithms, such as, for instance, using multiple common identifiers in the URL whose particular combination can form a unique identifier. 32 3.2.4 JavaScript and DOM properties Many publications work with JavaScript and DOM properties to detect web tracking systems. In [87] Bau et al. show a preliminary study of a new methodology to detect trackers based on them. They inspect the JavaScript APIs and other DOM elements that can be used to load new elements on the website and generate an interconnection graph with information about the first-party and its included thirdparty URLs. They also collect information about the particular elements that form the content of the website and combine it with the information from the graph to train a machine learning algorithm that can detect web tracking domains. Their results show that this approach can be used to identify some web tracking systems and may be useful to differentiate between them and other similar actors, such as the Content Delivery Networks (CDN). However, the algorithm introduces a high volume of false positives (about 30 percent). Wu et al. [13] present a new system called TrackerDetector to automatically generate pattern lists containing tracking information. The system applies a BFtree, an incremental machine learning classifier, over a set of features extracted from JavaScript code used for tracking purposes. They improve the system in [21] by means of support vector machines trained to differentiate between tracking and nontracking JavaScript. However, both solutions base their classification on static analysis, classifying APIs used inside the code of the website, and making them vulnerable to obfuscation techniques. Other works, such as the one proposed by Kaizer et al. [14] also use a machine learning algorithm trained with a combination of elements extracted from the DOM. In particular, they inspect properties from the navigator and screen elements and complement those features with others easily accessible such as the length of the URL or the HTTP cookies set. The resultant data set is used to train a set of machine learning algorithms and select the best performer, a Na¨ıve Bayes model. The simplistic set of features used is not valid anymore, as many fingerprinting algorithms use much more complex ways to identify the user. Yet another work applying machine learning to features of the code is presented by Ikram et al. in [22]. They apply support vector machines over two sets of JavaScript files, one containing only functional code and the other with only tracking code. The approach is able to differentiate between them in many cases. However, their accuracy only reaches about 80 and 75 percent, respectively. 33 Iqbal et al. in [17] propose a method based on the instrumentation of Google Chromium called AdGraph. It is based on a complex combination of JavaScript code attribution, DOM code inspection, and network request annotation to characterize changes being executed in the document. With the obtained output they train a random forest with high accuracy replicating the labels of human-generated filter lists. However, in those cases where there is a dispute between them (the classification does not match), the rate of false positives and false negatives is higher than the tracking lists themselves. They present in [18] another system that combines two independent machine learning algorithms, one trained with features extracted from a static analysis of the JavaScript code and the other from a dynamic analysis. The second ML complements the first one in cases where obfuscation or minimization techniques have been used in the code, which is the main problem with static analysis approaches. The system presents high accuracy in detecting browser fingerprinting. However, the system is overspecialized and only detects this kind of tracking. They also try to reduce the website functionality loss introduced by blocking the found tracking systems, replacing the tracking code of the API calls used with mock versions of it. The functionality loss is reduced by about 20 percent whenever the mock functions can be used. However, their functionality loss evaluation contains only 50 webpages that have been manually revised, and the functionality breakage improvement system does not work on webpackaged files [88], which contain multiple independent scripts and all their dependencies inside only one file. Webpack is used to decrease the loading time of websites and is a common practice on today’s Internet [89]. 3.3 Protection measures Unfortunately, most of the works discussed in the previous section use complex approaches by means of machine learning algorithms or other systems that are difficult for the common user to deploy. Consequently, they suffer from limited success, advancing the state-of-the-art but not being used in reality. On the other hand, many browsers have introduced privacy-protection measures. In particular, most of them now block or restrict third-party cookies from many well-known web tracking systems. They also allow you to completely block third-party cookies, but as such an approach will cause many websites to break, it is disabled by default. Some of them, such as Firefox, by means of an experimental feature [90], and TOR 34 browser [91], block some of the APIs commonly used for tracking purposes. However, this approach introduces breakage whenever the APIs are used for legitimate purposes. Overall, the most common privacy-protection tools are content-filtering browser plugins, which are lightweight and easy to install through the plugin webmarket of each browser. Commonly known as adblockers, they usually directly block URLs that match a list of predefined domains or patterns of already-known web tracking sources. The number of available adblockers has greatly increased in the last few years, as has the number of studies comparing them. In 2012, Leon et al. [92] studied the interactions of a group of 45 non-experts users with four different adblockers. Their objective was to find the main characteristics that a privacy-protection tool has to accomplish in order to be easily adopted. They found that, although most people are interested in protecting their privacy, the difficulty of configuration and inappropriate default settings discourage many users. However, once again, the most important problem is the usability flaws introduced in some websites where the respective tool blocks necessary website elements. They conclude that users want protection that does not break websites. Wills et al [93]. in 2016 carried out a comparison of the blocking performance of six browser extensions over a population of about 1000 websites. All of them were based on manually curated pattern lists. They found that, although useful to diminish the tracking on the Internet, they were only able to block at most one third of third-party trackers. One year later, Merzdovnik et al. [94] compare 8 browser plugins over a much bigger website population of 100,000 websites and 10,000 Android applications. One of them uses machine learning algorithmic blockage instead of pattern lists. Their results show an important protection improvement, especially over the most common stateful third-party trackers, but still a low block rate for stateless methods such as fingerprinting. They also highlight the difficulty of blocking tracking in the mobile environment, where the common user does not have root rights on the terminal and blocking can only be performed at the network level. According to their study, the few applications available for the mobile market do not significantly impact third-party trackers. In the same 2017, Traverso et al. [95] compare both the blocking performance and, for the first time, the quality of experience (QoE) of 7 different adblockers over a population of only 500 websites. They also study the effect of the emerging GDPR, the European privacy policy (section 2.4), on the inspected websites. 35 Although the population studied was limited, their conclusions show that most websites ignored the new privacy policies as they were not yet enforced by law. They also confirm that adblockers are effective at blocking third-party trackers and stateful tracking technologies and affirm an improvement in terms of QoE, with some of them reducing the amount of data by one third and the page loading time by 40 percent. Our results [96] over a population of 10,000 websites refuse their QoE findings, though. In 2018, Mathur et al. [97] run a series of surveys about the perception of online tracking with 1,000 users through Amazon Turk [98]. They also asked about their reason for using content blockers and the expectations they had. They found that most users use them to improve the user experience and reduce the number of distracting elements online. Only a small fraction use them to block web tracking. This emphasizes the perception difference between advertisements, clearly visible inside the website, and tracking systems, transparent to the user. Moreover, their conclusions point out that when extensions break websites, users disable them based on how important the content they are accessing is to them. Lastly, in 2019, Mazel et al. [99] perform a blocking performance comparison of 15 different protection methods. They include the most common URL-based adblockers already studied, but also other approaches such as JavaScript blocking tools or heuristic approaches. They confirm that blocking JavaScript introduces the highest privacy enhancement, but at the cost of website breakage on many domains. Regarding the best overall performing tool, they find that Ghostery [100] and uBlock Origin [20], a very popular open source tool, provide the best tradeoff between protection and webpage quality. They conclude that research efforts should focus on approaches that do not rely on blocking lists, indeed, the main goal of this thesis. 3.4 Research Frameworks Given the high volume of publications in the literature about web tracking, through the years a few different frameworks have been presented to facilitate the experimentation. Nevertheless, we decided to develop our new framework as none of them met our requirements. This section comments on all of them, explaining the main reasons why they were discarded. Mayer et al. [101] developed FourthParty, a framework to perform web measurements. It was the first attempt to create a generic framework that could be 36 used for many different website experiments. However, they implemented it as an instrumentation of Mozilla Firefox. Given the high pace at which Internet browsers update their source code, the framework rapidly became obsolete, and nowadays it is not possible to use it anymore. Nevertheless, their experience helped us decide to avoid frameworks based on browser instrumentation, as they are very difficult to maintain. Acar et al. present in [102]FPDetective, a framework that uses a combination of two instrumented browsers, a file intercepting proxy and an HTTP request parser, to collect information about events that can be related to web tracking. The system presents flexibility by means of custom scripts to search for patterns in the properties to be studied. However, it suffers from the same design conception as FourthParty, using instrumented browsers to collect the data. Moreover, it adds an extra layer to the process of obtaining file information, increasing its complexity. In [12] L´ ecuyer et al. share XRay, a framework to audit DOM objects and find a connection between output values and input results by means of differential correlation. The purpose of the framework is to study the relationship between the data sent by the browser and the advertisements received as a result. Their implementation is based on the combination of three independent components, of which two are service-specific. This specialization and the fact that the framework is centered around advertisements instead of generic web tracking made us consider other options for web tracking experiments. Li et al. present in [103]JSgraph, an instrumented version of Google Chromium designed for forensic studies that records the website loading process in a way that it can be reconstructed. The system was designed for “post-mortem reconstruction of ephemeral JS-based web attacks” and is performant and lightweight. However, it suffers the same disadvantage as FourthParty, with a highly specialized instrumentation of Blink and V8 engines of the Chromium browser, complicating excessively its maintenance over time. Timothy Libert [104] maintains WebXRay and PolicyXRay, both tools developed for privacy studies. WebXRay is a platform that measures data leakage to third parties. PolicyXRay automatically reads the policies of the website and explores the correlation between the third-party tracking present inside the web and the third parties present within the policy terms. Its main drawback was the lack of possibility to execute extensive longitudinal experiments using real browsers, due to instability and high requirements. Only by means of PhantomJS, a headless browser easily detectable by tracking systems, was the system able to explore 37 a high volume of websites. As our objective is to explore the web exactly as a real user would, in experiments containing millions of websites, we discarded this option. Finally, Englehardt et al. present in [11]OpenWPM, a framework to explore a large number of websites and execute longitudinal studies searching for API calls or JavaScript parameters of special interest to the user. This tool was the closest to our requirements, as it allows to inspect a large volume of websites and perform different experiments using Google Chrome, a real browser. However, two factors made us reconsider it. First, we aimed to detect web tracking in a generic way, not looking specifically for any API calls or parameters. And second, the tool was developed to aggregate information at the URL level. The Internet is usually seen as a complex mesh of URL interconnections. However, many of the files under that URLs are shared between different URLs (e.g., libraries). Thus, if we find a tracking system inside a file, it directly means that all URLs pointing to that resource also contain tracking, regardless of the server where it is hosted. Consequently, as we wanted to aggregate the information by resource instead of URL, we decided to develop our own framework giving as a result the tool presented in [105] and [7]. 38 Chapter 4 Conclusions and Future Work This thesis addresses some of the most important challenges in the research of effective countermeasures to protect users’ privacy on the Internet. We focused on three different objectives crucial to advancing in the development of real tools that can improve the state-of-the-art: (i)propose a solution to collect full and exhaustive online web tracking data sets, and with the proposed solution study the current situation, (ii)investigate new ways of improving the current protection measures, and (iii)share and use the obtained results to develop tools that can help users improve their privacy. To compensate for the lack of complete data sets of the Internet information, including the resources under each loaded URL, we have: 1. developed a new open-source collection framework that can collect full information about all the network requests, URLs, and online resources from millions of websites, and save them and their relations so that we can obtain a complete picture of the Internet at a given time. 2. analyzed the current status of web tracking on the current Internet, showing that more than 95 percent of websites run user identification algorithms in the background. 3. analyzed content blockers, the most popular solutions being used nowadays to block web tracking systems and improve privacy, as well as their impact on performance and quality of experience. Thanks to our solution, other research teams may collect complete snapshots of the Internet for a list of websites and explore other characteristics that may be useful for all kinds of Internet studies. As the developed framework uses Firefox 39 millions of users to resell it to other companies) is mostly unknown to regular users but they are becoming more frequent on the Internet and present multiple security and privacy concerns. Usually, the power reached by those companies, due to the amount of data they collect, and how this power can alter everyday life, is not noticed. A practical example would be a political situation where a party has access to the personal information of a widely used social network, where political opinions and personal perspectives of millions of people are easily reachable. All of that information can be used to catalog people into different groups, depending on their ideological positions, and create specific online marketing political campaigns to influence users doubting their vote, and potentially favoring the election of a political party. This perverse use of the data already happened in the past [2] and had consequences not only for the people being tracked, but also for all the people living in the same country. Besides, having all of this information gathered silently by an unknown company in a remote computer, where the user has neither knowledge nor access at all, represents a privacy problem by itself. Security breaches have been present in the Internet since its foundation, and even big companies that dedicate a lot of resources to secure their data have suffered from security flaws that allowed information theft. On the other hand, there is no guarantee that the collected information (and the conclusions drawn from it) are correct, as the user cannot access nor review it. However, this information is already being used for multiple purposes that affect our lives, such as financial assessment, determination of insurance coverage, price discrimination or background scanning. Bujlow et al. presents in [1] a survey that includes a comprehensive description of the existing web tracking methods as well as references to the literature explaining the facts contained in this section. In this paper, we focus instead on the methods that have been proposed to analyze and detect web tracking using network measurements. III. MEASUREMENTS FOR THE DETECTION AND ANALYSIS OF WEB TRACKING Web tracking is a transparent and pervasive data collection method that operates in the background, mainly at the application layer. As such, the only possibility to effectively detect and analyze it is by using network measurements to observe the information transmitted by the browser in the wild, either at the network or the application layer. Among the different network measurement techniques that can be applied, we can differentiate three main categories: passive, active and clientside measurements. •Passive measurements: These kinds of measurements base their methodology on collecting all of the traffic seen inside a network (e.g., IP packets). The captured data is explored, looking for patterns and characteristics that could be useful for the experiment. The limited visibility of the traffic content at the application level and the privacy concerns introduced by capturing all the personal data being transmitted over the network are factors to consider. •Active measurements: This methodology is based on performing measurements acting as the user. In web tracking experiments, this is done by executing a longitudinal study over a selected website population, opening the website as a user would do. This method allows a high number of very precise measurements to be obtained without the intervention of real users. However, this type of measurement presents some ethical considerations. By simulating a user, false visits are generated to the examined websites, a fact that if done in excess can affect their functionality. •Client-side measurements: Client-side measurements are based on performing the measurements directly on the clients and sending back the results to a centralized place to explore them. In web tracking experiments, it is done mainly by using browser plugins installable by the user. This approximation avoids the privacy concerns introduced in passive measurements, as the user is previously informed of the purpose of the experiment and the overall process. It also gives precise measurement results that are only dependent on the client settings and specifications. The main drawback is a potential lack of support by the user, usually representing a big challenge to get enough participation to obtain a representative number of measurements. Each presented methodology has its pros and cons and has been used in the past for web tracking measurements, as discussed in the next section. IV. NETWORK MEASUREMENTS FOR WEB TRACKING ANALYSIS AND DETECTION Web tracking presents multiple security and privacy concerns, and as such, it is a hot topic in the network measurement community at the time of this writing. Therefore, there have been many relevant publications related to web tracking in different ways. In Table 1, we present a summary, divided by categories, of the most important related work in the field of network measurements. We mainly focus on research that used network measurements as a methodology to detect or analyze web tracking on the Internet.1 A. Detection/classification T. Li et al. present a third-party tracker detection method using machine learning techniques to inspect cookies that achieves high accuracy [3]. The work also includes a measurement-based study of the third-party ecosystem within the top 10.000 most popular websites as per the Amazon Alexa’s list [15]. They found third-party tracking to be very frequent, with almost 50% of websites having some third-party tracker embedded, and 25% including a tracker from Google. In [4], Metwalley et al. use passive network measurements in a network with about 10,000 users to study the penetration and intrusiveness of web tracking systems in the Internet. They 46 Category Reference and title Type [3] TrackAdvisor: Taking Back Browsing Privacy from Third-Party Trackers Active [4] Using Passive Measurements to Demystify Online Trackers Passive [5] Detecting and Defending Against Third-Party Tracking on the Web Active [6] Tracking the Trackers Client-side [7] Online Tracking: A 1-million-site Measurement and Analysis Active Detection/Classification [8] Towards accurate detection of obfuscated web tracking Client-side Regionality/Location [9] Tracing Cross Border Web Tracking Client-side [10] Annoyed Users: Ads and Ad-Block Usage in the Wild Passive [11] The AdWars: Retrospective Measurement and Analysis of Anti-Adblock Filter Lists Active Targeted Advertising/ Price Discrimination [12] Crowd-assisted Search for Price Discrimination in e-commerce: First Results Client-side [13] Measuring Privacy Loss and the Impact of Privacy Protection in Web Browsing Active Privacy/Security [14] The Chain of Implicit Trust: An Analysis of the Web Third-party Resources Loading Active TABLE I MOST RELEVANT RELATED WORK found embedded trackers in more than 70% of the websites, and some of them collected data from 98% of the users. Roesner et al. present a new Firefox addon called Share- MeNot, the first tool to block third-party tracking social buttons by maintaining their functionality [5]. It also makes an extensive study of the state of third-party tracking in a population of 1,000 websites, finding Google as the top tracker with one third of occurrences. Yu et al. present a new collaborative way of detecting trackers by computing the number of users that reach the same URL resources on a website [6]. The idea behind it is that if a specific URL is only used by one or a few users between all the population loading the same website, that resource probably includes a tracking identifier. They also observed a high percentage of tracking penetration, being more than 95% for the studied German population. In [7], Englehardt et al. design a new web tracking measurement system called OpenWPM that uses a combination of a browser plugin, an HTTP proxy and the raw files created by the browser (e.g., cookies, temp files) to detect web tracking from active web measurements. The research also includes the study of the state of web tracking from one million websites in 2016. Lastly, in [8], Le et al. study the presence of obfuscation within web tracking, and specifically in the canvas fingerprinting method. They found obfuscation to be present, although still not very widely used. B. Regionality/Location In [9], Iordanou et al. confront the problem of defining the geolocation borders within web tracking traffic. They measure the relation between the location of the user and the location of the company performing web tracking by means of a browser plugin to find if the current regulations (e.g., GDPR) allow to investigate how the collected data was used. They found that most tracking flows are well confined within the GDPR jurisdiction, but also that the most sensitive data (e.g., health, sexual orientation, political opinions) is being tracked at some extent inside as well as outside of the GDPR effective area. C. Targeted advertisement/Price discrimination Pujol et al. characterize the advertisement traffic using passive measurements and Adblock Plus, the most famous advertisement content-blocker plugin (also called adblocker) [10]. Starting from there, they explore the usage of adblockers in the wild, taking measurements from a national ISP. They found that about 22% of users browse the Internet with a content-blocker plugin enabled and extract some possible implications of this finding. To be able to counteract those implications, companies started using some anti-adblocker systems, mechanisms that detect when a user is using an adblocker and correspondingly block the service for that specific user. In [11], Iqbal et al. explore the prevalence of such systems and the performance of anti-adblocker filter lists created by the community to avoid being blocked while using an adblocker. Another way of improving sales profit is not directly with targeted advertisements but with price discrimination. The underlying idea is that, depending on the user profile collected by the tracking mechanisms (living location, wealth, relatives, friends and other related characteristics), the price that people are willing to pay for the same object is different. In [12], Mikians et al. perform a study on how to detect the price and search discrimination on the Internet using a collaborative approach by means of a browser plugin. D. Privacy/Security Krishnamurthy et al. was one of the first works that tried to measure the impact of web tracking in privacy and explore some measures to regain it [13]. The research also includes a study about the quality and usability modifications introduced by the tools used to improve privacy. On the other hand, Ikram et al. focus their research on exploring the concept of implicit chain of trust within thirdparties [14]. The idea is that when a website imports a resource from a third-party, the imported resource can also embed resources from other different third-parties that the original website does not necessarily know about. They found that although most of the websites’ chain of trust is relatively small, a high percentage of them end up loading resources from a suspicious website or, in other words, a website that has been categorized as a possible thread to privacy or security. E. Protection Measures Currently, the only effective way of protecting the user against web tracking is by means of content-blockers, a type 47 of plugin installable in the browser that examines all of the URLs being accessed by the browser. Those URLs are then compared to a black list or a database containing the known web tracking websites, and if the comparison is positive, the resource is blocked. There are other methods like Javascript or Flash blockers to improve the security even more, but they usually break the website layout, degrading the usability or even making the website inaccessible which is a price too high to pay for the common user. Thus, content-blockers have become the de-facto solution for the privacy problem. Examples of popular content blockers include AdBlock Plus, Ghostery and uBlock Origin. V. CHALLENGES/OPEN ISSUES Using content-blockers as the main countermeasure is a defensive approach which limits the security to the already known websites. In an environment where new web tracking methods constantly emerge, and creating a new website or domain is done in a matter of minutes, it is not the ideal approach. Even so, there are some important challenges and open issues to be able to block web tracking in a more proactive way. The first and foremost challenge we must deal with is the constant evolution of web tracking methods, using more and more complex and intrusive techniques specifically designed to overcome the privacy protection mechanisms available within the browser. Usually, there is very little, or no information at all, about those new web tracking mechanisms. To find them requires experts on the topic who are able to inspect the code and the new functions included in successive updates of the website programming frameworks, looking for parameters and characteristics that could be used to track the users. Once found, to check for empirical verification, an experiment should be executed. This process is very hard and timeconsuming, which impacts on the ability of researchers to detect new methods. Another obstacle is how to deal with minification and obfuscation. The first is a technique that tries to minimize the resource loading times eliminating white spaces, break lines and shortening the variable names of the resource code. The second one is similar but additionally changes the code structure and renames the variables by non-sense strings to make the code almost unreadable by humans. These two techniques render traditional methods based on code inspection unfeasible in a large population of websites, making it even harder to solve the first challenge of finding new web tracking methods. To improve the state-of-the-art on these two aspects, first we need to take network measurements about the resources loaded and shared by first and third-party trackers, to be able to detect patterns and common characteristics between the web tracking code. In addition, we need to take those measurements on a large scale to be able to use other techniques, like machinelearning or data-mining algorithms, to automatically explore the information without requiring human intervention. This presents the third challenge, the lack of public datasets with detailed information and measurements about the resources Fig. 1. ORM Structure loaded and parsed by websites at a large scale, that would permit researchers to detect new web tracking methods in a more automated way than it is currently done. VI. ORM: A LARGE SCALE WEB MEASUREMENT FRAMEWORK In this paper, we introduce Online Resource Mapper (ORM), an open source large-scale web measurement framework specifically designed to address the challenges described in the previous section. ORM is an active measurement framework and as such has been developed to be able to crawl information directly from websites about every resource accessed, either loaded by the main website or embedded within a third-party tracker resource. Moreover, the system automatically tries to unminify/unobfuscate the code of the resources found to ease their study, if necessary. ORM uses a combination of Selenium, Chromium and the Chrome DevTools protocol to get detailed information about all of the resources loaded by the inspected websites. Selenium is a tool for automatized web experiments that acts as a wrapper of real browsers, like Mozilla Firefox, Google Chrome or, in our case, Chromium, the open source alternative version of Chrome. On the other hand, the Chrome DevTools protocol is a protocol developed by Google, and present in both Google Chrome and Chromium browsers, that allows to inspect all of the parameters, functions and information being processed internally by the browser. This combination was selected to allow us to collect all of the resources and information included in the website, even if the code is obfuscated, whether the resource resides in the main site or in the third-party loaded resources. This way of taking the complete dataset of the entire explored population allows us to employ data-mining techniques to find common patterns and characteristics not usually visible. In comparison, most of the current active measurement research focuses only on the already known tracking methods, avoiding obfuscation 48 Fig. 2. Tracking decision diagram and preventing them to be used to find new web tracking algorithms. Fig. 1 shows a diagram of the overall system architecture and its different modules. Each Selenium instance maintains two browsers, one of them with a custom plugin loaded. The Driver Manager is the module in charge of loading one or more instances of Selenium with the needed plugins to perform the experiments, opening the websites and recovering in case Selenium becomes unresponsive. The module interacts with the Data Manager module, in charge of exploring the network events to look for resources to translate to real URLs that the Driver Manager can download. Lastly, all of the data is saved in a common database storing the collected information. VII. PRELIMINARY RESULTS To show the capabilities of ORM, in this section we present the results of a proof-of-concept experiment that analyzes the current state of web tracking on the Internet. For this purpose, we used ORM to collect a large dataset with information of the top 100,000 most popular sites according to the Alexa’s list [15]. ORM took seven days to collect the dataset. The infrastructure used was two Ubuntu 16.04 LTS servers in parallel with a combination of 30 cores, 60 threads and a total of 64 GB of RAM. The resulting dataset occupies more than 250 GB of data, and contains approximately 20 million resources, including the pages that loaded each of them. The information can be used for other multiple purposes, such as studying the geographical interaction between the different domains or third-party trackers or manually inspecting the code of the top most used resources. Moreover, we instructed ORM to download, unminify and store inside the database the script and document files, which are commonly used to execute web tracking methods. The system also compares each resource URL with EasyList and EasyPrivacy, the two most famous and used content-blocking lists, to check if it is an already known tracking/advertisement resource. The resulting dataset has been made publicly available at [16]. Fig. 3. Top trackers by number of websites an tracking resources Fig. 4. Tracking percentage All of the information was taken for four different browser configurations, one with the vanilla browser (no plugins, no settings) and the other three loading each of them a different content-blocker plugin (AdBlock Plus, Ghostery and uBlock Origin). This configuration allowed us to generate a partiallylabeled dataset with the already known web tracking methods by the existing lists and content blockers, which can be useful for training machine-learning algorithms. The labeling process is shown in Fig. 2. Intuitively, if a resource present in the vanilla browser is detected by EasyList/EasyPrivacy lists, or blocked by the content-blockers, that resource can be considered as a tracking system, either for profile creation or for targeted advertisement. Fig. 3 shows the top web tracking domains found using this initial classification and the data collected by ORM. The results match with most of the previous studies, showing Google as the main tracker company, followed by Facebook, Yandex or Bing. Interestingly, comparing our results to some of the previous works (e.g., [3]), there is a clear increase in the domains being tracked by Google in any of its forms (e.g., analytics, ad services, tag services), reaching almost 55% of the entire population. It is worth noting that Doubleclick.com, 49 a subsidiary of Google specialized in targeted advertisements, is present in about 20,000 of the total websites, but that it has been blocked more than 70,000 times. This proves that loading multiples instances of the same third-party resource inside the same website is a common practice, probably to get more revenues from targeted advertising. Fig. 4 presents the cumulative distribution function of the total tracking percentage traffic within the collected population (i.e., the fraction of traffic of the website devoted to tracking). There are approximately 28,000 websites (out of 100,000) that do not include any web tracking methods. On the contrary, almost 72,000 include at least one or more web tracking resources, with about a 10% including more than 90% of resources dedicated to track the user or targeted advertisement. During the experiments we also observed that within the top 100 websites (including www.google.com), third-party tracking resources are usually not present or very rare. This is because most of them perform tracking as first-party trackers, getting data directly introduced by the user. For instance, Google does not need to look for the searches done by its users, as they introduce by themselves the search terms in Google websites, reaching their servers directly. Thus, the percentage of websites that lack tracking methods should be understood as an upper bound, depending on whether the included websites act also as a first party trackers or not, a fact that would make them remain undiscovered. VIII. CONCLUSIONS AND FUTURE WORK In this article, we presented a tutorial on web tracking, its privacy and security implications and how network measurements can be used to detect and analyze it. It also includes a taxonomy of the most relevant publications on the topic categorized by type of measurement. We also present the three challenges we have to face to improve web tracking detection and analysis: the constantly evolving ecosystem, the obfuscation and dynamicity of the environment and the lack of public datasets. We introduced ORM, an open-source measurement framework specifically designed to address those challenges, and a first public dataset with information of 100,000 websites and about 20 million resources. As a future work, we plan to develop an application programming interface to allow automated access to the dataset information to other research groups that may have interest in the included data. Moreover, we are currently exploring the data by means of data-mining algorithms to find characteristics that permit us to detect new web tracking methods in an automated and unsupervised way. IX. ACKNOWLEDGMENTS This work was supported by the Spanish MINECO under contract TEC2017-90034-C2-1-R (ALLIANCE). REFERENCES [1] T. Bujlow, V. Carela-Espa˜ nol, J. Sol´ e-Pareta, and P. Barlet-Ros, “A Survey on Web Tracking: Mechanisms, Implications, and Defenses,” Proceedings of the IEEE, vol. 105, pp. 1476–1510, Aug. 2017. [2] The Guardian, “The Cambridge Analytica Files,” https://www.theguardian.com/news/series/cambridge-analytica-files, 2015. [3] T.-C. Li, H. Hang, M. Faloutsos, and P. Efstathopoulos, “TrackAdvisor: Taking Back Browsing Privacy from Third-Party Trackers,” in Passive and Active Measurement (J. Mirkovic and Y. Liu, eds.), Lecture Notes in Computer Science, (Cham), pp. 277–289, Springer International Publishing, 2015. [4] H. Metwalley, S. Traverso, and M. Mellia, “Using Passive Measurements to Demystify Online Trackers,” Computer, vol. 49, pp. 50–55, Mar. 2016. [5] F. Roesner, T. Kohno, and D. Wetherall, “Detecting and Defending Against Third-Party Tracking on the Web,” in Proceedings of Detecting and Defending Against Third-Party Tracking on the Web, pp. 155–168, 2012. [6] Z. Yu, S. Macbeth, K. Modi, and J. M. Pujol, “Tracking the Trackers,” in Proceedings of the 25th International Conference on World Wide Web, WWW ’16, (Montr´ eal, Qu´ ebec, Canada), pp. 121–132, International World Wide Web Conferences Steering Committee, Apr. 2016. [7] S. Englehardt and A. Narayanan, “Online Tracking: A 1-million-site Measurement and Analysis,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS ’16, (Vienna, Austria), pp. 1388–1401, Association for Computing Machinery, Oct. 2016. [8] H. Le, F. Fallace, and P. Barlet-Ros, “Towards accurate detection of obfuscated web tracking,” in 2017 IEEE International Workshop on Measurement and Networking (M N), pp. 1–6, Sept. 2017. [9] C. Iordanou, G. Smaragdakis, I. Poese, and N. Laoutaris, “Tracing Cross Border Web Tracking,” in Proceedings of the Internet Measurement Conference 2018, IMC ’18, (Boston, MA, USA), pp. 329–342, Association for Computing Machinery, Oct. 2018. [10] E. Pujol, O. Hohlfeld, and A. Feldmann, “Annoyed Users: Ads and Ad- Block Usage in the Wild,” in Proceedings of the 2015 Internet Measurement Conference, IMC ’15, (Tokyo, Japan), pp. 93–106, Association for Computing Machinery, Oct. 2015. [11] U. Iqbal, Z. Shafiq, and Z. Qian, “The ad wars: retrospective measurement and analysis of anti-adblock filter lists,” in Proceedings of the 2017 Internet Measurement Conference, IMC ’17, (London, United Kingdom), pp. 171–183, Association for Computing Machinery, Nov. 2017. [12] J. Mikians, L. Gyarmati, V. Erramilli, and N. Laoutaris, “Crowdassisted search for price discrimination in e-commerce: first results,” in Proceedings of the ninth ACM conference on Emerging networking experiments and technologies, CoNEXT ’13, (Santa Barbara, California, USA), pp. 1–6, Association for Computing Machinery, Dec. 2013. [13] B. Krishnamurthy, D. Malandrino, and C. E. Wills, “Measuring privacy loss and the impact of privacy protection in web browsing,” in Proceedings of the 3rd symposium on Usable privacy and security, SOUPS ’07, (Pittsburgh, Pennsylvania, USA), pp. 52–63, Association for Computing Machinery, July 2007. [14] M. Ikram, R. Masood, G. Tyson, M. A. Kaafar, N. Loizon, and R. Ensafi, “The Chain of Implicit Trust: An Analysis of the Web Third-party Resources Loading,” in The World Wide Web Conference, WWW ’19, (San Francisco, CA, USA), pp. 2851–2857, Association for Computing Machinery, May 2019. [15] K. Cooper, “Alexa: Most popular website list,” http://www.alexa.com. [16] Ismael Castell-Uroz, “Online Resource Mapper (ORM),” https://github.com/ismael-castell/ORM, 2020. X. ABOUT THE AUTHORS Ismael Castell-Uroz is a Ph.D. student at the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), where he received the B.Sc. degree in Computer Science in 2008 and the M.Sc degree in Computer Architecture, Networks and Systems in 2010. He has several years of experience in network and system administration and currently holds a Projects Scholarship at UPC. His expertise and research interest are in computer networks, especially in the field of network monitoring, web tracking and anomaly detection. 50 Josep Sol´ e-Pareta received the M.Sc. degree in telecom engineering and the Ph.D. degree in computer science from the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, in 1984 and 1991, respectively. In 1984, he joined the Computer Architecture Department, UPC, where currently, he is Full Professor. He did Postdoctoral studies (summer 1993 and 1994) at Georgia Institute of Technology, Atlanta, GA, USA. He is cofounder of the UPC-CCABA (http://www.ccaba.upc.edu). His publications include several book chapters and more than 100 papers in relevant research journals (¿25) and refereed international conferences. His current research interests are in nanonetworking communications, traffic monitoring and analysis and high-speed and optical networking, with emphasis on traffic engineering, traffic characterization, MAC protocols, and QoS provisioning. He has participated in many European projects dealing with computer networking topics. Pere Barlet-Ros received the M.Sc. and Ph.D. degrees in Computer Science from the Universitat Polit` ecnica de Catalunya (UPC) in 2003 and 2008, respectively. He is currently an associate professor with the Computer Architecture Department of the UPC and scientific director at the Barcelona Neural Networking Center (BNN-UPC). From 2013 to 2018, he was co-founder and chairman of the machine learning startup Talaia Networks. His research has focused on the development of novel machine learning technologies for network management and optimization, traffic classification and network security, which have been integrated in several open-source and commercial products, including Talaia, Auvik TrafficInsights, Intel CoMo and SMARTxAC. In 2014, he received the 2nd VALORTEC prize for the best business plan awarded by the Catalan Government (ACCIO) and in 2015 the Fiber Entrepreneurs award as the best entrepreneur of the Barcelona School of Informatics (FIB). 51 52 Demystifying Content-blockers: Measuring their Impact on Performance and Quality of Experience Ismael Castell-Uroz, Rub´ en Sanz-Garc´ ıa, Josep Sol´ e-Pareta, and Pere Barlet-Ros Abstract—With the evolution of the online advertisement and tracking ecosystem, content-blockers have become the reference tool for improving the security, privacy and browsing experience when surfing the Internet. It is also commonly believed that using content-blockers to stop unsolicited content decreases the time needed for loading websites. In this work, we perform a large-scale study on the actual improvements of using contentblockers in terms of performance and quality of experience. For measuring it, we analyze the page size and loading times of the 100K most popular websites, as well as the most relevant QoE metrics, such as the Speed Index, Time to Interactive or the Cumulative Layout Shift, for the subset of the top 10K of them. Our experiments show that using content-blockers results in small improvements in terms of performance. However, contrary to popular belief, this has a negligible impact in terms of loading time and quality of experience. Moreover, in the case of small and lightweight websites, the overhead introduced by contentblockers can even result in decreased performance. Finally, we evaluate the improvement in terms of QoE based on the Mean Opinion Score (MOS) and find that two of the three studied content-blockers present an overall decrease between 3% and 5% instead of the expected improvement. Index Terms—Content-filtering, adblock, advertisement, web tracking, performance, page size, loading time, QoE, Speed Index I. INTRODUCTION THE use of content-filtering tools has seen an exponential increase since the initial development of AdBlock Plus [1] in 2005; one of the most popular and widely used adblockers. It was one of the first attempts to improve user’s privacy and browsing performance against the most prevalent problem surfing the web at the time; the increasing amount of intrusive and malicious advertisements spreading over the Internet. With time, the Internet has grown and some alternatives often more specific (e.g. JavaScript, Flash or third-party blockers) appeared to address the same problem. Unfortunately, such tools usually affect the usability of websites, making some of them even inaccessible. For that reason, general content-blockers have become the de facto solution to deal with advertising and user tracking practices. As shown in [2], one of the main motivations to use contentfiltering systems is to improve the browsing experience. Almost one third of the users that install a blocking system do it to increase the browsing performance. Blocking advertisements and tracking systems are believed to significantly reduce the bandwidth used, improving the website loading time and, thus, the overall Quality of Experience (QoE). I. Castell-Uroz, R. Sanz-Garc´ ıa, J. Sol´ e-Pareta and P. Barlet-Ros are with the Broadband Communications Research Center of the Universitat Polit` ecnica de Catalunya, Barcelona, Spain (e-mail: [email protected]). In this paper, we present a comprehensive study of the advertisement and tracking ecosystem with special emphasis on the performance and QoE improvements resulting from using content-blockers when surfing the Internet. Some previous works have analyzed and compared the effectiveness of existing content-blockers in terms of blocking accuracy [3]–[6]. However, very few of them [7], [8] have tried to analyze their impact in terms of browsing performance. To the best of our knowledge, this is the first work to evaluate the actual performance and QoE improvements of different content-blockers with a large and diverse set of websites. In particular, we measure the loading time and page size when visiting the top 100K sites according to the Alexa list [9]. We also revise the most relevant QoE metrics, such as the Speed Index,Cumulative Layout Shift or Time to Interactive for the subset of 10K top most popular websites. We compare three different blocking approaches; advertisement blocking,tracker blocking and generic content blocking. For this purpose, we developed ORM [10], an open-source highly parallel network measurement system that loads every website using one of the most relevant content-blockers and compares their performance. Regarding performance, we found that, although we can observe some improvements in terms of effective page size, the results do not directly translate to gains in loading time. Moreover, in some cases, there could even be a decrease in performance, especially in small and lightweight websites. Similarly, our results show that using content-blockers can slightly increase the overall browsing quality of experience, but for fast loading websites the extra layer introduced to preprocess and clean the website can introduce some delay to visualize the website content. The measurement system and methodology proposed in this paper can also be useful for network and service administrators to evaluate the web performance observed by their users. This paper is an extension of the work presented at [11]. The new contributions of this paper include: •An extensive study of the impact of content-blockers on the perceived Quality of Experience (QoE) according to multiple indicators, such as the Speed Index and the Mean Opinion Score. •A detailed analysis of the actual page size reduction with respect to the number of resources blocked by each content-blocker. •Extended evidence that confirms that improvements on the overall performance when using content-blockers do not always translate to increased Quality of Experience. 53 •The implementation of a new content-blocker plugin (Deep Tracking Blocker) inspired by the findings of this work, and its comparison with the other studied plugins.1 The rest of the paper is organized as follows. Section II provides the necessary background while Section III presents the related work. Sections IV and V present and analyze the results in terms of performance and quality of experience respectively. Section VI discusses the reasons behind the performance variations found in this work and proposes alternatives to improve the results. Lastly, Section VII concludes the paper. II. BACKGROUND Advertisements have been used as a way to pay for online expenses as well as for getting benefits from online resources since the foundation of the Internet. At first, the advertisement ecosystem was very simple and owners tried to add some advertisements to monetize each site. Soon, the difficulty to attract user attention became relevant within advertisers [13]. To be able to stand out in such an environment, companies started to modify their advertisements with sounds and vivid colors, using pop-ups and other intrusive methods to reach their users. Lohtia et al. [14] studied the impact of those methods on advertisement performance and user perception. Such an advertisement environment became a nuisance for some of the users, being the main motivation for the creation of the first adblockers, a browser content-filtering plugin that tries to block all the advertisement being shown in a website. With the evolution of the Internet and the languages used to develop it, companies started to use profiling mechanisms (e.g. HTTP cookies) over their users to perform targeted advertisement campaigns and to support their services. These primal web tracking techniques were more or less harmless and very simple to avoid. Nowadays companies use much more complex techniques (e.g. fingerprints, supercookies), collecting data not only from their own sites but from other apparently non-related websites (third-party trackers). This permits to extremely refine the information collected about the opinions and preferences of their users, and raises serious privacy concerns. Consequently, in the past few years many countries have created new regulations in order to improve the privacy of their citizens. Some of those regulations, such as the European GDPR [15], force websites to obtain the explicit user content to collect their personal data. However, it is extremely difficult to ensure online privacy as many collection systems are hidden and transparent to the user. In [16] Bujlow et al. show a summary of the different mechanisms that can be used to track users and correlate their information. To improve their privacy users started to use the so-called tracking blockers. These plugins try to do the same than adblockers do with advertisements but with the tracking systems included in websites. Usually both of them, adblockers and tracking blockers, use custom databases or filter lists to distinguish between safe and non-safe content. Two of the most important filter lists are EasyList [17] and EasyPrivacy [18], each one of them dedicated to block advertisements and 1The new plugin can be freely downloaded from the Chrome Web Store. The source code is publicly available at [12]. tracking methods respectively. These lists are maintained by the community and used by some of the most popular contentfiltering extensions on the market. Since advertisement blocking and tracking blocking are very similar, adblockers started to introduce at some level the possibility to also block web tracking mechanisms. Note that many online publishers have become part of the acceptable ads program [19], which allows them to avoid being blocked by some of the adblockers if their advertisements follow specific guidelines that ensure them to be less intrusive. Recently, a new type of content-filtering is gaining traction; the generic content blocker. This blocker category tries to intercept not only advertisements and trackers, but other unneeded resources or security threats that could be detected in the website loading process, like for instance Cross-Site Scripting (XSS). III. RELATED WORK Krishnamurthy et al. [3] was one of the first to study the impact of adblockers and other privacy protection mechanisms in web browsing. The study included measurements of the impact on page functionality and quality when using such protection mechanisms. In [5] Wills et al. makes a comparison between a set of adblockers and tracker-blockers, studying the success rate of their methods to block the content of different third-party trackers. Traverso et al. [7] study the behave of seven different content-filtering plugins within a set of 100 specific websites classified in different popular categories. Studies both, the tracker blocking success rate and the performance gains. Mazel et al. [4] compares 14 different tracking protection measures, including content-filtering plugins as well as other approaches like javascript blockers or machine-learning based blockers. The comparison is not only done for blocked content but on the differences between the discovered content and their impact in website usability. In [8], Newman et al. explore the quantity of resources blocked by AdBlock Plus and relate them with an improvement in site loading latency, but at the expense of an increase of the Above-the-Fold (AtF) latency (time to load only the visible elements of the website). To evaluate the consequences of their findings they conduct an experiment on Amazon Turk. They find that users prefer a short AtF instead shorter total loading latency. On the other hand, Zach et al. in [20] demonstrate how the presence of advertisements could not only impact the quality of experience of the browsing session itself, but also the quality of experience of the browsed services such as for instance on-demand video services. Pujol et al. [21] studied the usage of adblockers in a European ISP and found that 22% of the most active users used an adblocker. Malloy et al. [22] measured the percentage of adblockers users in the U.S. and inferred that about 18% was using it. The constantly increasing adoption rate and loss of revenues made online publishers to start using different techniques to try to bypass adblockers. In [23] Iqbal et al. studied the anti-adblocking ecosystem and found it to be continuously increasing. In [24] Lerner et al. studied the prevalence of tracking methods used for both, targeted advertising as well as other 54 purposes, over the Internet. They also studied it’s increase over time using the Wayback Machine. They found that almost 70% of websites use some type of tracker, enforcing the use of privacy protections like trackers blockers. Shiller et al. [25] tried to measure the impact of advertisement blocking on the quality of content created, and revenues of online publishers. Butkiewicz et al. performs in [26] a series of experiments to understand the complexity of the current website ecosystem. Although the research does not have direct relation to content-blockers, they explore several terms very related to this research like resources loaded, number of different origins between them, the page sizes or the website loading times. From the user’s perspective there are different reasons to use a content-filtering plugin. Mathur et al. [2] studied the different content-filtering group adoption (adblocker,tracker blocker or general content blocker) as well as the different and common motivations to use all of them. They found adblockers to be the most prevalent blocker system (51.2%), with general content blocker next (20.5%) and tracker blocker in the last position (8.4%). The primary reason to use an adblocker or a general content blocker (the two most adopted solutions) was to improve the user experience (85-89%), and between the most common given motivations was speedup loading times with a 33.1% of acceptance. Other reasons were to improve privacy (mainly by means of tracker blockers) and only a small percentage used blockers to improve security. In this paper, we analyze whether there is an actual improvement in browsing performance when using content-filtering tools, as one third of the plugin users seem to think. To the best of our knowledge, there are only two previous works that tried to address similar questions [7], [8]. Traverso et al. explored in [7] the protection and performance improvement by means of the Time-to-First-Paint (TTFP) using AdBlock Plus with a population of only 100 websites (most of them belonging to the same country). In [8], Newman et al. used Amazon Mechanical Turk [27] to study the relationship between loading time and quality of experience with a set of 1000 users, who analyzed a sample of 10 pages each from an overall population of 965 web pages. In contrast, our analysis is based on measurements of more than 20 different indicators within a population of 100K websites, using a diverse set of content-blockers focused on different purposes. Moreover, we measure both, the real network performance improvement as well as the quality of experience associated with this improvement. IV. BROWSING PERFORMANCE A. Methodology and evaluation To explore the real browsing performance gain introduced by content-filtering plugins we will explore the principal parameters that can represent an increase in performance; effective page size and page loading time. To be able to generalize our results we have to accomplish several conditions. 1) Test population: The number of websites to browse has to be big enough to be able to extrapolate the results to a bigger population, and the selected websites should be representative enough of an usual browsing session. 2) Browsing experience: The website has to be loaded with each content-filtering plugin exactly as it would be done if accessed by a real user. This will avoid websites to detect automation scripts that would possibly make them not to load all the resources. 3) Loading interval restrictions: The same website loading process using different content-filtering plugins should be performed in a small time window to avoid whenever possible different temporal conditions (e.g. rush hours, periodic maintenance, etc). 4) Experiments repetition: The number of repetitions should allow us to discard possible non-reliable values, especially in loading time experiments, where external conditions can change from one execution to another. 5) Browsing completion: We have to measure all the resources being loaded, even third-party ones or resources loaded dynamically and not included in the website code. 1) Test population: For the test population we decided to use the top 100K most popular websites according to the Alexa list [9]. Scraping the most popular websites give us a good approximation of what a real user would access. Alexa’s list is part of the Amazon ecosystem and has been used in several publications in the past (e.g. [3], [28]). Note that we only examine the homepages of each one of the websites included in the list but none of the links available within them. 2) Browsing Experience: We developed ORM [10], our own highly parallelized system making use of Selenium [29] for the automation process. This allows us to run real browsers such as Mozilla Firefox or Google Chrome that will present identical results to those a user would normally get. This also permits us to customize all the experiments using browser settings and network headers. Selenium has been used in the past for automation of research experiments in several different topics (e.g. [28], [30]). The experiments are done crawling the 100K websites using one plugin from each group presented in Section II; AdBlock Plus (version 3.5.2) as an adblocker,Ghostery (version 8.4) as a tracker blocker and uBlock Origin (version 1.19.6) as a generic content blocker. Each one of them uses their own filtering engine based on JavaScript regular expressions, caching as well as serialization of their filter internal representation to match filters with URLs. Moreover, the three of them use the same filter list format, which is compatible with the most popular filter lists EasyList [17] and EasyPrivacy [18]. All of them have versions available for the most common Internet browsers like Google Chrome or Mozilla Firefox. A summary of the differences between the plugins is shown in Table I. AdBlock Plus [1] is by far the most popular adblocker in the market. It can block both, advertisements and tracking systems, using EasyList and EasyPrivacy, although EasyPrivacy is disabled by default. AdBlock Plus is a supporter of the acceptable ads program [19], allowing advertisements if they follow specific guidelines. Ghostery [31] was initially developed as a tracker blocker, but evolved into a combination of adblocker and tracker blocker. Unlike AdBlock Plus, Ghostery uses its own main- 55 Fig. 10. Lighthouse Speed Index improvement: Each interval value corresponds to the average improvement of the Speed Index for the subset of websites on the vanilla browser with an initial Speed Index inside that interval. The firsts interval presents negligible or negative improvements for all the content-blockers. classified per content-blocker for the 10K inspected websites. The best result for each category is highlighted in grey color. Note that all the metrics are collected by the browser and not directly from the network link. Thus, the browser will only account for the traffic being loaded by itself, and not the real link status. In average, all the performance related metrics show an overall improvement for all the plugins in comparison to the vanilla browser. Moreover, as already seen, Ghostery stays on top on almost all of them. On the other hand, all the contentblockers decrease the number of files loaded by the website, working as expected. Between all of them the tool blocking the highest number of resources is uBlock Origin. This is not unexpected because among all the analyzed plugins it is the most strict one, using numerous black lists in order to detect not only web trackers and advertisements, but also other nuisances between the files (e.g. Cross Site Scripting). C. Quantifying the improvement Our results show that content-blockers can help to increase the performance and quality of experience perceived by the user in many cases, but this improvement is almost always very small and even negative in some cases. However, determining if those small differences are perceptible to the user is very difficult. For very fast loading websites introducing an overhead can be irrelevant if the user does not perceive it. Similarly, slow loading websites may be too slow, even using content-blockers, to avoid user frustration. To better understand the noticeable improvement we computed the Mean Opinion Score (MOS) model over the Speed Index obtained results, following the proposal at [38]. MOS is a standard defined by the ITU (ITU-T G.1030 [39]) to estimate end-to-end performance in IP networks. It defines the quality of experience as a value between 1 and 5, being 1 the worst possible value and 5 the best experience. It is based on the WQL hypothesis (the relation between the waiting time and the QoE follows a logarithmic linear scale), and it was originally applied to the page loading time (PLT). However, recent advances in the area of QoE research have found that correlating it with QoE measures is more appropriate than PLT. In particular, the study performed by Hoßfeld et al. in [38] found that applying it to the Speed Index (SI) leads to Fig. 11. QoE Mean Opinion Score: QoE modeling defined at ITU-T G.1030 [39] applied over the Speed Index. Ghostery presents an slight QoE increase over the vanilla. AdBlock Plus as well as uBlock Origin present both an overall decrease of QoE. a very good approximation of the actual MOS values. The SI-driven QoE MOS is formulated as: SQW QL =−a·ln(SI) + b(1) Fig. 11 shows the CDF distribution for the 10K collected websites. Surprisingly, the MOS values for AdBlock Plus and uBlock Origin present worse results than for the vanilla, letting Ghostery as the only plugin with a noticeable performance increase. This difference between the QoE obtained metrics and the MOS is not directly observable in the previously obtained figures, where the global impression is an overall QoE improvement. Nevertheless, as expected, the difference is small (between 3% to 5% of websites). These results confirm our previous findings that using plugins to improve the browsing performance has only a relatively small impact on the overall experience, and depending on the selected plugin it can even deteriorate the perceived QoE on some websites. VI. DISCUSSION AND POSSIBLE IMPROVEMENTS In this work we found that, under certain circumstances, the overhead introduced by a content-blocker can decrease the overall quality of experience perceived by the user. The main reason of this overhead relies in the number of resources 62 TABLE VII DEEP TRACKING BLOCKER QOE RESULTS Speed Index FCP LCP FMP CLS TTI 0.6383 0.7200 0.5963 0.6738 0.8515 0.9638 loaded by the website. Content-blockers check in real time every resource URL in order to block them if they are present inside a black list, and this extra computation adds a small delay. In fact, paradoxically for completely privacy-friendly websites, where no resource has to be blocked, we will always experience a reduction in performance if we use a contentblocker to protect us against the other websites that use tracking resources. Given that the problem is inherent to the use of pattern matching algorithms, a possible improvement would consist of using machine learning to reduce this overhead. Following this idea, we implemented a new browser plugin called Deep Tracking Blocker (DTB) that is based on a Deep Learning model proposed in [40]. This approach was shown to obtain a detection accuracy similar to traditional blacklists (97% precision), while moving the bulk of the pattern matching cost to an offline training phase. DTB is an open-source project [41] and it is already available in the Firefox [42] and Chrome [43] plugin markets. In order to evaluate the performance of the new plugin, we repeated the QoE measurements in Section V but using now DTB. Table VII shows a summary of the results obtained with the same set of 10K websites. Our results show that DTB results in an increase of performance between 2% and 15% for most of the QoE parameters analyzed in Table VI. We attribute the small performance improvement to the limited support current browsers provide to run neural networks within a browser extension. Nevertheless, even if the improvement is modest, the use of Deep Learning brings also other advantages compared to the use of traditional pattern matching, such as the generalization to other tracking URLs not included in the blacklists. Improving the implementation of DTB as a browser extension is part of our future work. VII. CONCLUSIONS In this work, we presented the results of a comprehensive measurement study that analyzes the actual performance gains of using content-blockers in terms of Page Size,Page Loading Time, and other Quality of Experience metrics, such as Speed Index or Time to Interactive. Contrary to common belief, our results show that the actual improvements in terms of effective page size are small, while speed ups in page loading times and Speed Index are almost negligible. Regarding the relative performance among the analyzed tools, we observed slightly better results in both, page size and loading time, for uBlock Origin compared to AdBlock Plus and Ghostery. However, those results do not directly translate to the QoE parameters, where Ghostery performs slightly better than the other content-blockers. We also quantified the total fraction of websites where a user could expect a noticeable difference in terms of performance and QoE to be only around 3-5% when using a contentblocker. Only Ghostery presented an increase on the QoE perceived by the user, while AdBlock Plus and uBlock Origin introduced a small penalty in a subset of websites. Based on these results, we can conclude that the use of contentblockers for performance reasons can only be beneficial for slow connections with limited bandwidth, where page size gains of about 10% can make a difference. This could be of special importance on itinerant devices where the volume of data downloaded can incur additional charges. On the contrary, for normal connections where the throughput is not a barrier, content-blockers present at best a very small performance and quality of experience improvement, but in many cases may result in a performance overhead. The data set collected for this study has been made publicly available at [10]. VIII. ACKNOWLEDGMENTS This publication is part of the Spanish I+D+i project TRAINER-A (ref. PID2020-118011GB-C21), funded by MCIN/ AEI/10.13039/501100011033. REFERENCES [1] “Adblock Plus,” May 2022. https://adblockplus.org/en/. [2] A. Mathur, J. Vitak, A. Narayanan, and M. Chetty, “Characterizing the Use of Browser-Based Blocking Extensions To Prevent Online Tracking,” in Fourteenth Symposium on Usable Privacy and Security (SOUPS 2018), vol. Fourteenth Symposium on Usable Privacy and Security (SOUPS 2018), pp. 103–116, USENIX Association, 2018. [3] B. Krishnamurthy, D. Malandrino, and C. E. Wills, “Measuring privacy loss and the impact of privacy protection in web browsing,” in Proceedings of the 3rd symposium on Usable privacy and security, SOUPS ’07, (Pittsburgh, Pennsylvania, USA), pp. 52–63, Association for Computing Machinery, July 2007. [4] J. Mazel, R. Garnier, and K. Fukuda, “A comparison of web privacy protection techniques,” Computer Communications, vol. 144, pp. 162– 174, Aug. 2019. [5] C. E. Wills and D. C. Uzunoglu, “What Ad Blockers Are (and Are Not) Doing,” in 2016 Fourth IEEE Workshop on Hot Topics in Web Systems and Technologies (HotWeb), pp. 72–77, Oct. 2016. [6] A. Gervais, A. Filios, V. Lenders, and S. Capkun, “Quantifying Web Adblocker Privacy,” in Computer Security – ESORICS 2017 (S. N. Foley, D. Gollmann, and E. Snekkenes, eds.), Lecture Notes in Computer Science, (Cham), pp. 21–42, Springer International Publishing, 2017. [7] S. Traverso, M. Trevisan, L. Giannantoni, M. Mellia, and H. Metwalley, “Benchmark and comparison of tracker-blockers: Should you trust them?,” in 2017 Network Traffic Measurement and Analysis Conference (TMA), pp. 1–9, June 2017. [8] J. Newman and F. E. Bustamante, “The Value of First Impressions,” in Passive and Active Measurement (D. Choffnes and M. Barcellos, eds.), Lecture Notes in Computer Science, (Cham), pp. 273–285, Springer International Publishing, 2019. [9] K. Cooper, “Alexa: Most popular website list.” https://www.alexa.com/. [10] “CBA-UPC/ORM,” May 2021. https://github.com/CBA-UPC/ORM. [11] I. Castell-Uroz, J. Sol´ e-Pareta, and P. Barlet-Ros, “Demystifying Content-blockers: A Large-scale Study of Actual Performance Gains,” in 2020 16th International Conference on Network and Service Management (CNSM), pp. 1–7, Nov. 2020. [12] R. S.-G. Ismael Castell-Uroz and P. Barlet-Ros, “Deep tracking blocker github,” May 2022. https://github.com/CBA-UPC/DTB. [13] S. Krishnamurthy, “Deciphering the Internet Advertising Puzzle,” SSRN Scholarly Paper ID 651842, Social Science Research Network, Rochester, NY, Jan. 2005. [14] R. Lothia, N. Donthu, and E. K. Hershberger, “The Impact Of Content And Design Elements On Banner Advertising Click-Through Rates,” Journal of Advertising Research, vol. 43, pp. 410–418, Dec. 2003. [15] “General data protection regulation,” Dec. 2021. https://gdpr.eu/. 63 [16] T. Bujlow, V. Carela-Espa˜ nol, J. Sol´ e-Pareta, and P. Barlet-Ros, “A Survey on Web Tracking: Mechanisms, Implications, and Defenses,” Proceedings of the IEEE, vol. 105, pp. 1476–1510, Aug. 2017. [17] “EasyList,” May 2022. https://easylist.to/. [18] “EasyPrivacy,” May 2022. https://easylist.to/easylist/easyprivacy.txt. [19] “Acceptable Ads,” May 2022. https://acceptableads.com/. [20] O. Zach, M. Slanina, and M. Seufert, “Investigating the impact of advertisement banners and clips on video qoe,” in 2018 IEEE 38th International Conference on Distributed Computing Systems (ICDCS), pp. 1618–1623, 2018. [21] E. Pujol, O. Hohlfeld, and A. Feldmann, “Annoyed Users: Ads and Ad- Block Usage in the Wild,” in Proceedings of the 2015 Internet Measurement Conference, IMC ’15, (Tokyo, Japan), pp. 93–106, Association for Computing Machinery, Oct. 2015. [22] M. Malloy, M. McNamara, A. Cahn, and P. Barford, “Ad Blockers: Global Prevalence and Impact,” in Proceedings of the 2016 Internet Measurement Conference, IMC ’16, (Santa Monica, California, USA), pp. 119–125, Association for Computing Machinery, Nov. 2016. [23] U. Iqbal, Z. Shafiq, and Z. Qian, “The ad wars: retrospective measurement and analysis of anti-adblock filter lists,” in Proceedings of the 2017 Internet Measurement Conference, IMC ’17, (London, United Kingdom), pp. 171–183, Association for Computing Machinery, Nov. 2017. [24] A. Lerner, A. K. Simpson, T. Kohno, and F. Roesner, “Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016,” in 25th USENIX Security Symposium (USENIX Security 16), vol. 25th USENIX Security Symposium (USENIX Security 16), USENIX Association, 2016. [25] B. Shiller, J. Waldfogel, and J. Ryan, “The effect of ad blocking on website traffic and quality,” The RAND Journal of Economics, vol. 49, no. 1, pp. 43–63, 2018. [26] M. Butkiewicz, H. V. Madhyastha, and V. Sekar, “Understanding website complexity: measurements, metrics, and implications,” in Proceedings of the 2011 ACM SIGCOMM conference on Internet measurement conference, IMC ’11, (Berlin, Germany), pp. 313–328, Association for Computing Machinery, Nov. 2011. [27] Amazon Turk, “Amazon Mechanical Turk,” May 2022. https://www.mturk.com/. [28] S. Englehardt and A. Narayanan, “Online Tracking: A 1-million-site Measurement and Analysis,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS ’16, (Vienna, Austria), pp. 1388–1401, Association for Computing Machinery, Oct. 2016. [29] Jason Huggins, “SeleniumHQ Browser Automation,” May 2022. https://www.selenium.dev/. [30] M. Ikram, H. J. Asghar, M. A. Kaafar, A. Mahanti, and B. Krishnamurthy, “Towards Seamless Tracking-Free Web: Improved Detection of Trackers via One-class Learning,” Proceedings on Privacy Enhancing Technologies, vol. 2017, pp. 79–99, Jan. 2017. [31] “Ghostery Makes the Web Cleaner, Faster and Safer!,” May 2022. https://www.ghostery.com/. [32] R. Hill, “uBlock Origin,” Feb. 2020. https://github.com/gorhill/uBlock. [33] ORM, “Online resource mapper,” Feb. 2020. https://github.com/CBAUPC/ORM. [34] M. Basart, “Online privacy: Analyzing the use of cookies in web pages,” Dec. 2021. https://github.com/CBAUPC/ORM/blob/codesets/publications/Online privacy - Analyzing the use of cookies in web pages.pdf. [35] W. Aqeel, B. Chandrasekaran, A. Feldmann, and B. M. Maggs, “On landing and internal web pages: The strange case of jekyll and hyde in web performance measurement,” in Proceedings of the ACM Internet Measurement Conference, IMC ’20, (New York, NY, USA), p. 680–695, Association for Computing Machinery, 2020. [36] W3C, “Navigation timing,” May 2022. https://www.w3.org/TR/navigation-timing-2/. [37] “Lighthouse |Tools for Web Developers,” May 2021. [38] T. Hoßfeld, F. Metzger, and D. Rossi, “Speed index: Relating the industrial standard for user perceived web performance to web qoe,” in 2018 Tenth International Conference on Quality of Multimedia Experience (QoMEX), pp. 1–6, 2018. [39] “Itu-t g.1030,” Dec. 2021. https://www.itu.int/rec/T-REC-G.1030- 201402-I/en. [40] I. Castell-Uroz, T. Poissonnier, P. Manneback, and P. Barlet-Ros, “Urlbased web tracking detection using deep learning,” in 2020 16th International Conference on Network and Service Management (CNSM), pp. 1–5, 2020. [41] “CBA-UPC/DTB,” Apr. 2021. https://github.com/CBA-UPC/DTB. [42] “Deep Tracking Blocker (Firefox),” May 2021. https://addons.mozilla.org/en-US/firefox/addon/deep-tracking-blocker/. [43] “Deep Tracking Blocker (Chrome),” May 2021. https://chrome.google.com/webstore/detail/deep-tracking- blocker/jjhinlfobgkmbbplbaaegglolichbfol. Ismael Castell-Uroz ([email protected]) is a Ph.D. student at the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, where he received the B.Sc. degree in Computer Science in 2008 and the M.Sc. degree in Computer Architecture, Networks and Systems in 2010. He has several years of experience in network and system administration and currently holds a Projects Scholarship at UPC. His expertise and research interest are in computer networks, especially in the field of network monitoring, anomaly detection, internet privacy and web tracking. Rub´ en Sanz-Garc´ ıa (ruben.sanz.garcia @estudiantat.upc.edu) received the B.Sc. degree in Computer Science in 2021 at the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain. He did and Erasmus during 2020 at the Faculty of Science and Engineering in the University of Groningen(UG), Groningen, Netherlands. His research and interest are in web tracking, internet privacy and cybersecurity. He is the main developer of the new contentblocker plugin called Deep Tracking Blocker created by the UPC-Advanced Broadband Communication Center. Josep Sol´ e Pareta ([email protected]) joined the Computer Architecture Department of Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, where he is currently Full Professor. He received the M.Sc. degree in telecommunications engineering and the Ph.D. degree in computer science from UPC in 1984 and 1991, respectively. He did Postdoctoral studies at Georgia Institute of Technology, Atlanta, GA, in 1993 and 1994. He is co-founder of the UPC-Advanced Broadband Communication Center, and his research interests are in nanonetworking communications, traffic monitoring and analysis and high-speed and optical networking, with emphasis on traffic engineering, traffic characterization, MAC protocols, and QoS provisioning. Pere Barlet-Ros ([email protected]) is currently an Associate Professor with the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, and Scientific Director at the Barcelona Neural Networking Center (BNN-UPC). He received the M.Sc. and Ph.D. degrees in Computer Science from UPC, in 2003 and 2008, respectively. From 2013 to 2018, he was Co-founder and Chairman of the machine learning startup Talaia Networks. His research has focused on the development of novel machine learning technologies for network management and optimization, traffic classification and network security, which have been integrated in several open-source and commercial products, including Talaia, Auvik TrafficInsights, Intel CoMo and SMARTxAC. 64 URL-based Web Tracking Detection Using Deep Learning Ismael Castell-Uroz∗, Th´ eo Poissonnier†, Pierre Manneback†and Pere Barlet-Ros∗ ∗Department of Computer Architecture, Universitat Polit` ecnica de Catalunya Barcelona, Spain Email: {icastell, pbarlet}@ac.upc.edu †Computer Science Unit, Faculty of Engineering, University of Mons Mons, Belgium Email: [email protected] / [email protected] Abstract—The pervasiveness of online web tracking poses a constant threat to the privacy of Internet users. Millions of users currently employ content-blockers in their web browsers to block tracking resources in real time. Although content-blockers are based on blacklists, which are known to be difficult to maintain and easy to evade, the research community has not succeeded in replacing them with better alternatives yet. Most of the methods recently proposed in the literature obtain good detection accuracy, but at the expense of increasing their complexity and making them more difficult to maintain and configure by the end user. In this paper, we present a new web tracking detection method, called Deep Tracking Detector (DTD), that analyzes the properties of URL strings to detect tracking resources, without using any other external features. Consequently, DTD can easily be implemented in a browser plugin and operate in real time. Our experimental results, with more than 5M HTTP requests from 100K websites, show that DTD achieves a detection accuracy higher than 97% by looking only at the URL of the resources. Index Terms—web tracking, deep learning, URL classification I. INTRODUCTION Several studies (e.g. [1], [2]) have shown that, nowadays, more than 70% of the most popular web services have tracking systems running in the background. Web tracking allow online companies to collect information about their users to improve their services. For instance, web tracking is the basis of many search customization algorithms and targeted advertisement campaigns. However, from the user perspective, this is achieved at the expense of their own privacy. Some studies found the collected data to be used for many other purposes, such as price discrimination [3], assessment of financial credibility [4] or determination of insurance coverage [5]. Moreover, the appearance of the socalled third-party trackers and data-brokers aggravated the situation. The former are services with the ability to centralise personal information from multiple different domains, while the latter are companies willing to collect personal information to sell it to other companies. According to [6], the web analytics market size was $2.63B in 2018 and it is expected to reach $10.73B by 2026. Although the research community has dedicated great efforts to improve the privacy protection measures by means of new complex techniques (e.g. [7]–[9]), the most popular approach to block web tracking systems still relies on traditional content-blockers [10]; browser plugins that block URLs found on manually-curated pattern lists. The reason behind this is that latest methods proposed in the literature are difficult to adopt by common users. For example, recent proposals require users to install instrumented versions of web browsers [7], get measurements from multiple vantage points [11] or share privacy-sensitive information, like cookies [12]. In this work, we present Deep Tracking Detector (DTD), a novel approach that uses deep learning to automatically detect tracking URLs. The classification is done locally and exclusively based on the properties of the URL string, without the necessity of using any external features or communications. This approach has several advantages: (i)it does not require to download the source files, so malicious resources can be blocked in advance, (ii)it is more robust against the use of minification and code obfuscation techniques [13], (iii) it is more difficult to evade than traditional content-blockers, (iv)it can potentially generalize to new tracking domains, which would be missed by traditional content-blockers based on blacklists, and (v)it is lightweight enough to be included in a browser plugin. In order to evaluate the performance of DTD, we collected over 5M HTTP requests from the top 100K most popular websites as per the Alexa’s list [14]. The corresponding URLs were labeled using the most popular pattern lists currently available. Our experimental results show that DTD obtains a detection accuracy over 97% using only the characters of the URL as input. This result indicates that tracking URLs actually have distinguishable properties that can be effectively exploited for web tracking detection. The rest of the paper is organized as follows. Section II revises the most relevant related work in this area. In Section III we present the architecture of our deep learning detector, while the evaluation is presented in Section IV. Lastly, Section V concludes the paper and presents the future work. II. RELATED WORK In recent years, there have been many research studies that focused on improving online privacy. We refer the interested 65 reader to [15] for a comprehensive survey on the existing web tracking mechanisms and the available protection measures. Regarding tracking detection methods, Ikram et al. in [9] and Wu et al. in [8] proposed machine learning algorithms based on the analysis of JavaScript code syntax to detect tracking patterns. Other works, such as Iqbal et al. in [7], proposed complex combinations of JavaScript code attribution, DOM code inspection and network requests annotation to detect tracking pattern signatures. However, most of these approaches are very specialized and complex, and usually require major modifications to the browsers, fact that prevent common users to adopt these solutions. In [12] Metwalley et al. present a system to find unique identifiers embedded in the HTTP headers or HTTP requests. To this end, they compare the requests of different users accessing the same domain to discover parameters that can be used as identifiers. Similarly, Wu et al. present in [16] a system to detect the same identifiers collaboratively by means of a kanonimity machine learning algorithm. Both approaches use only the URLs, similarly to our work. However, they need to compare requests from different users to detect identifiers. The main advantage of this approach is that it is easy to deploy using a browser plugin that communicates to a centralized system responsible for the comparison. The main drawbacks are the privacy implications involved in sending all the HTTP requests done by the user to make the comparison, and the delay introduced by this communication. In [17] Le et al. propose a deep learning method to detect malicious and phishing websites. The system applies a combination of two Convolutional Neural Networks over the characters and words of the URL to find patterns that could identify malicious websites. In contrast, we show that a simpler and more compact architecture can work more effectively in the case of web tracking detection. On the other hand, content-blockers such as AdBlock Plus [18], Ghostery [19] or uBlock Origin [20] compare the URLs to a predefined list of patterns indicating the domains to be blocked. These solutions are simple and easy to deploy, as they only require local access to the URL. EasyList [21] and EasyPrivacy [22] are the most popular and precise lists currently available. Both of them are maintained by the community. The manually-curated and static nature of those lists are their main drawback, preventing them to quickly adapt to an evolving environment like web tracking. Our proposal, like content-blockers, also works at the URL level, presenting all the associated benefits. URLs are very easy to access since it is not necessary to load the whole page or to explore any other exchanged data. Similarly, lexical features like the URL length can be measured fast, while other features such as network properties (e.g. IP Address, HTTP headers) or content properties require explicitly to download the content hosted by the URL to perform the inspection, increasing the risk and slowing down the process. Moreover, given that our method does not use code inspection, it is more robust against code minification and obfuscation, which is used by some JavaScript trackers to avoid detection [13]. Fig. 1. URL structure III. PROPOSED METHOD Our proposal is focused on classifying a given URL as tracking or non-tracking based only on the contents of the URL. To achieve it we have a set of URLs previously labeled, and we need to find a prediction model that minimizes the total number of mistakes in the entire data set. We are facing the problem as a binary classification problem. Considering a set of M URLs : (x1, y1),(x2, y2),...,(xM, yM)where xmrepresents a URL, and ym∈ {0,1}is the label of the URL (1 →tracking, 0 →non-tracking), we need to find a prediction function f:Rn→Rwhose role is to assign a class for any given instance xof type URL. The prediction made by the function is denoted as ˆym=sign(f(xm)). In our case, this function is represented as a Deep Neural Network (DNN). We compared it to other models such as a Recurrent Neural Network (RNN) and a Convolutional Neural Network (CNN). Although the results were similar, RNN had much slower inference time (1.16s vs. 0.04s) and CNN had about 50% more false positives. A. Preprocessing The main benefit of deep learning is that it operates over raw data, making unnecessary to extract features to be used in the classification process. However, the model cannot accept directly string-format inputs like URLs. We need a preprocessing step to find a representation that could be used as input. To this end, we look at the URL as a sequence of characters, splitting it in each individual character. Every character is taken into account to give the model as much information as possible, even the separation characters (e.g. ”/”, ”;”). At this step, each URL is a 1-dimension variable-length array such as u= [c1, c2, . . . , cL]where ci, i = 1, . . . , L is a character (e.g. letters, symbols, numbers) and Lis the length of the URL. The second step transforms each character into an integer using a dictionary preserved over all the process. Our data set contains 90 different characters numbered from 1 to 90. At the end of this step, each URL is a 1-dimension variable-length array such as u= [n1, n2, . . . , nL]where ni, i = 1, . . . , L is an integer ∈[1,90] and Lis the length of the URL. The last step consist of fixing the length of the URL. Based on our expertise we selected a maximum length value of 200 characters, usually longer enough to contain all the URL (only 3.4% of the total and 6.8% of the tracking URLs are longer) but easy to handle by deep learning algorithms. The structure of a typical URL can be seen in Fig. 1. According to our observations, usually the most relevant information is contained in the parameters and query parts of the URL. As 66 Fig. 2. URL preprocessing shown in the figure both are located at the last positions. Consequently, if the URL is longer than 200 characters the system truncates the first elements containing the scheme, domain and path information until only 200 characters remain. On the contrary, if the URL is shorter than 200 characters we pad it filling it with zeros at the beginning of the array until the total length becomes 200. This way the system keeps the most important information always at the end of the array. Finishing this step, each URL is a 1-dimension fixed-length array such as u= [0,...,0, n1, n2, . . . , nL]where L= 200 and ni, i = 1, . . . , L is an integer ∈[1,90]. Fig. 2 shows a diagram of the full preprocessing process. B. Model Architecture Although the model proposed is prepared to receive as input the preprocessed URLs presented in the last subsection, the input still needs some manipulation to be usable by the classification process. Thus, the model itself can be conceptually divided in two parts: the URL representation generation and the classification layers. Fig. 3 shows the model complete with all its layers. The URL representation generation would comprehend the first two layers while the classification would be the last three, all of them integrated into one model. By default deep learning treat the inputs as numerical values, interpreting that 2 close values are similar. In our scenario each character has been substituted with an integer, but there is no special relation between them. Thus, if we train the system with only the preprocessed URLs the model would be biased. To fix it we add a first Embedding Layer, transforming the preprocessed URLs to a low-dimensional continuous representations of them (each character will be represented by a 32-dimensions vector). Furthermore, we set a masking parameter to inform the model to ignore the zeros introduced in the padding process. Lastly, we need to simplify the resulting matrix to a 1-dimension array, the final input that Dense Layers expect. To this end, we add a new Flatten Layer that reduces the embedding output to a 1-dimension array by putting each row of the matrix side by side in one array. The second part of the model correspond to 3 Dense Layers with a decreasing number of units respectively. In order to find the optimal number of layers and units per layer we executed a Grid search with multiple values. The method tries Fig. 3. Deep Neural Network architecture TABLE I CLASSIFICATION RESULTS Subset Precision Recall F1 Score Accuracy DNN + Left Padding Non-tracking 95% 100% 0.97 94.7% Tracking 99% 54% 0.69 DNN + Left Padding + Embedding Non-tracking 98% 100% 0.99 97.1% Tracking 97% 78% 0.86 DNN + Right Padding + Embedding Non-tracking 97% 100% 0.98 97.9% Tracking 96% 83% 0.87 all the possible combinations and select the best one. We found that selecting too many neurons (e.g. 2048) makes the model to overfit. To avoid overfitting on the model a dropout has been added to each layer. The output is composed of a 1-unit layer with a softmax activation function giving a float output ∈[0,1]. The output is then rounded to the closest integer (0 for non-tracking or 1 for tracking). IV. EVALUATION AND VISUALIZATION A. Evaluation To evaluate the system we analyzed the top 100K most popular websites as per Alexa’s list [14]. The exploration was performed on April 2020 using ORM [2], an open source framework we developed to map URL and resources used within online domains. The labeling of the ground-truth was done using uBlock Origin [20] running over a dozen filter-lists including EasyList [21] and EasyPrivacy [22], two of the most popular and precise pattern lists available. The collected data set has more than 5,3M unique URLs where approximately 4,7M have been labeled as non-tracking and 600K as tracking. The evaluation of DTD was made using cross-validation (90% for training and 10% for testing) over the entire data set. Furthermore, we used a subset of the training set to stop the training process when overfitting starts. Table I shows the results of DPD with different configurations for the embeddings and tagging process. The results are splitted differentiating non-tracking and tracking classification. The system has high accuracy with all the configurations, presenting the best results by using an embedding and padding/truncating the URLs by the right side. However, as seen in Fig. 1 and commented before, padding or truncating them by the right would require to truncate requests parameters and query properties, for long URLs. These fields include relevant information, such as the file type (e.g. most tracking systems work on JavaScript files). On the contrary, 67 Fig. 4. t-SNE applied on the output of the penultimate layer of the model the left fields include information about the domain names. Thus, padding the URLs by the right could bias the system towards finding common properties of the domains hosting tracking, instead of focusing on the properties of the resources themselves. Accordingly, we decided our system to pad the URLs by the left, even if the accuracy is a bit lower with our data set (≈0.8%). This way, the resulting model should be more robust and suffer less from temporal obsolescence, for example if the list of tracking domains changes over time. For the selected configuration (DNN + Left Padding + Embedding) the system present a very high accuracy specially for the non-tracking classification. For tracking URLs the precision is very high with a 97%, but the recall decreases until 78%. Blocking non-tracking resources may break website usability or functionality. Thus, from the user perspective it is better to have more false negatives and a bit lower recall, letting pass through some tracking URLs, than having a lower precision and higher false positives. B. Visualization and Observations In order to have a better understanding of the resulting model, we applied some visualization techniques using the output of the penultimate layer of the model. We collected each element, represented by a 128-dimension array, and applied a dimensionality reduction technique called t-SNE. The resulting plot, shown in Fig. 4, presents the classification accuracy in different colors. There are clear clusters for tracking as well as non-tracking URLs. It also presents one cluster with mixed results. We correlated some characteristics of the URLs included in each cluster to discover particularities and, as expected, we found differentiated clusters depending on the type of file being loaded by the URL. This enforces our decision of padding the URLs by the left to maintain file characteristics. The numbers of the figure represent the most common resource for each cluster. The small green clusters are all formed by JavaScript files. To explore the mixed cluster in higher detail, we randomly selected a subset of 50K URLs and loaded the information with the online visualization tool from Tensorflow [23] using the same t-SNE technique. The tool permitted us to explore Fig. 5. Classification results detail the details of each URL. Fig. 5 shows the results given by the visualization tool, differentiating between correctly classified in blue and badly classified in red. The clusters in the center of the figure contain the majority of errors. We zoomed in those clusters and compared the initial labels given by the pattern lists with the predicted values (red→tracking, blue→non-tracking). Most of the incorrectly classified URLs belong to the clusters inside the circles shown in the figure. Inspecting the corresponding URLs we found that most errors pertain to ground-truth misclassified URLs for very common non-tracking libraries like JQuery, or WordPress configuration scripts. This explains why our method also misclassified them and highlights the inaccuracies of current pattern lists. V. CONCLUSIONS In this work we presented Deep Tracking Detector (DTD), a new web tracking detection system based on deep learning. DTD can detect web tracking resources with 97% accuracy using only as input the characters of the URL string. To the best of our knowledge this is the first work to apply deep learning to the detection of web tracking using only the URL. Our solution is simple and much easier to adopt than more complex systems recently proposed in the literature. Compared to current content-blockers, our solution is more difficult to evade and can potentially generalize to new tracking domains that may appear in the future, if they have similar characteristics to current tracking domains. As a future work we plan to develop browser plugins that implement our model for the most popular browsers, which could help Internet users to easily improve their privacy. VI. ACKNOWLEDGMENTS This work was supported by the Spanish MINECO under contract TEC2017-90034-C2-1-R (ALLIANCE). 68 REFERENCES [1] S. Englehardt and A. Narayanan, “Online Tracking: A 1-million-site Measurement and Analysis,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS ’16, (Vienna, Austria), pp. 1388–1401, Association for Computing Machinery, Oct. 2016. [2] I. Castell-Uroz, J. Sol´ e-Pareta, and P. Barlet-Ros, “Network measurements for web tracking analysis and detection: A tutorial,” IEEE Instrumentation & Measurement Magazine, vol. Special Issue ”Measurements for Advanced Networking & Networks for Advanced Measurements”, In press. [3] J. Mikians, L. Gyarmati, V. Erramilli, and N. Laoutaris, “Crowdassisted search for price discrimination in e-commerce: first results,” in Proceedings of the ninth ACM conference on Emerging networking experiments and technologies, CoNEXT ’13, (Santa Barbara, California, USA), pp. 1–6, Association for Computing Machinery, Dec. 2013. [4] K. Lobosco, “Facebook friends could change your credit score,” Aug. 2013. https://money.cnn.com/2013/08/26/technology/social/facebookcredit-score/index.html. [5] The Economist, “Very personal finance.” https://www.economist.com/finance-and-economics/2012/06/02/verypersonal-finance. [6] “Web Analytics Market Size, Share and Industry Analysis |Forecast 2026.” https://www.alliedmarketresearch.com/web-analytics-market- A05971. [7] U. Iqbal, P. Snyder, S. Zhu, B. Livshits, Z. Qian, and Z. Shafiq, “ADGRAPH: A Graph-Based Approach to Ad and Tracker Blocking,” IEEE Symposium on Security and Privacy 2020, p. 14, 2019. [8] Q. Wu, Q. Liu, Y. Zhang, P. Liu, and G. Wen, “A Machine Learning Approach for Detecting Third-Party Trackers on the Web,” in Computer Security – ESORICS 2016 (I. Askoxylakis, S. Ioannidis, S. Katsikas, and C. Meadows, eds.), Lecture Notes in Computer Science, (Cham), pp. 238–258, Springer International Publishing, 2016. [9] M. Ikram, H. J. Asghar, M. A. Kaafar, A. Mahanti, and B. Krishnamurthy, “Towards Seamless Tracking-Free Web: Improved Detection of Trackers via One-class Learning,” Proceedings on Privacy Enhancing Technologies, vol. 2017, pp. 79–99, Jan. 2017. [10] J. Mazel, R. Garnier, and K. Fukuda, “A comparison of web privacy protection techniques,” Computer Communications, vol. 144, pp. 162– 174, Aug. 2019. [11] V. Kalavri, J. Blackburn, M. Varvello, and K. Papagiannaki, “Like a Pack of Wolves: Community Structure of Web Trackers,” in Passive and Active Measurement (T. Karagiannis and X. Dimitropoulos, eds.), Lecture Notes in Computer Science, (Cham), pp. 42–54, Springer International Publishing, 2016. [12] H. Metwalley, S. Traverso, and M. Mellia, “Unsupervised Detection of Web Trackers,” in 2015 IEEE Global Communications Conference (GLOBECOM), pp. 1–6, Dec. 2015. [13] H. Le, F. Fallace, and P. Barlet-Ros, “Towards accurate detection of obfuscated web tracking,” in 2017 IEEE International Workshop on Measurement and Networking (M N), pp. 1–6, Sept. 2017. [14] K. Cooper, “Alexa: Most popular website list,” 2020. https://www.alexa.com/. [15] T. Bujlow, V. Carela-Espa˜ nol, J. Sol´ e-Pareta, and P. Barlet-Ros, “A Survey on Web Tracking: Mechanisms, Implications, and Defenses,” Proceedings of the IEEE, vol. 105, pp. 1476–1510, Aug. 2017. [16] Z. Yu, S. Macbeth, K. Modi, and J. M. Pujol, “Tracking the Trackers,” in Proceedings of the 25th International Conference on World Wide Web, WWW ’16, (Montr´ eal, Qu´ ebec, Canada), pp. 121–132, International World Wide Web Conferences Steering Committee, Apr. 2016. [17] H. Le, Q. Pham, D. Sahoo, and S. C. H. Hoi, “URLNet: Learning a URL Representation with Deep Learning for Malicious URL Detection,” arXiv:1802.03162 [cs], Mar. 2018. [18] AdBlock Plus, “Adblock Plus,” 2020. https://adblockplus.org/en/. [19] Ghostery, “Ghostery Makes the Web Cleaner, Faster and Safer!,” 2020. https://www.ghostery.com/. [20] R. Hill, “uBlock Origin,” 2020. https://github.com/gorhill/uBlock. [21] “EasyList,” Feb. 2020. https://easylist.to/. [22] “EasyPrivacy,” 2020. https://easylist.to/easylist/easyprivacy.txt. [23] N. Thorat, C. Nicholson, Big, and D. Smilkov, “Embedding projector - visualization of high-dimensional data.” http://projector.tensorflow.org. 69 70 TrackSign: Guided Web Tracking Discovery Ismael Castell-Uroz Universitat Polit` ecnica de Catalunya Barcelona, Spain [email protected] Josep Sol´ e-Pareta Universitat Polit` ecnica de Catalunya Barcelona, Spain [email protected] Pere Barlet-Ros Universitat Polit` ecnica de Catalunya Barcelona, Spain [email protected] Abstract—Current web tracking practices pose a constant threat to the privacy of Internet users. As a result, the research community has recently proposed different tools to combat wellknown tracking methods. However, the early detection of new, previously unseen tracking systems is still an open research problem. In this paper, we present TrackSign, a novel approach to discover new web tracking methods. The main idea behind TrackSign is the use of code fingerprinting to identify common pieces of code shared across multiple domains. To detect tracking fingerprints, TrackSign builds a novel 3-mode network graph that captures the relationship between fingerprints, resources and domains. We evaluated TrackSign with the top-100K most popular Internet domains, including almost 1M web resources from more than 5M HTTP requests. Our results show that our method can detect new web tracking resources with high precision (over 92%). TrackSign was able to detect 30K new trackers, more than 10K new tracking resources and 270K new tracking URLs, not yet detected by most popular blacklists. Finally, we also validate the effectiveness of TrackSign with more than 20 years of historical data from the Internet Archive. Index Terms—web tracking, code signature, fingerprinting, network graph, 3-mode graph I. INTRODUCTION Although online privacy has brought much attention in the recent years (e.g. [1], [2]), the fast evolution [3] and inherent complexity of the Internet [4] make it very difficult to develop effective privacy protection methods. Web tracking –a collection of techniques developed to identify users across multiple domains, browsers and devices– is the main tool used by web services to compile large amounts of personal data about their users [5]. Previous works have shown that the collected information is used for many purposes, such as targeted advertisement [6] and search customization [7], but also for more obscure practices, including price discrimination [8], credit scoring [9] or personal financial assessment [10]. Over the last decade, the research community has made great efforts to combat web tracking (e.g., [11]–[20]). Although some of these works have succeeded in the detection of well-known tracking techniques, the early detection of new, previously unseen web tracking methods still remains an open research problem. Nowadays, the only reliable way to discover new tracking systems falls to human experts with the daunting task of analyzing millions of websites. Fortunately, there are ways to narrow down the search to a manageable number under specific circumstances. For instance, experts can study the characteristics introduced by new web standards and programming languages that could potentially be exploited by new tracking methods. Although the community has developed some privacy measurement tools to facilitate this task (e.g. [13], [21]), all the process requires a high degree of expertise and it is both, hard and time consuming. In this work, we seek to transform this blind chase for new web tracking mechanisms into a guided hunt that can lead to results in a much faster and effective way. The intuition behind our proposal is based on the observation that: (i)there are relatively few tracking approaches, but they are shared across many different domains, and (ii)different Internet resources including the same or similar tracking methods share some fragments of code (e.g., JavaScript API calls used to perform the actual tracking). If we could focus our lens on relevant pieces of code with those characteristics from all the resources available on the Internet, there would be a high chance they belong to tracking systems. Based on this observation, we present TrackSign, a new web tracking discovery system that automatically crawls the Internet in the search of small pieces of code that are shared across multiple domains. To this end, we use a file partition method based on Rabin Fingerprinting [22], which allows us to split the Internet resources (e.g., HTML, JavaScript files) in an unambiguous way based on its content. To distinguish between fingerprints with higher probability to belong to tracking systems from other shared code (e.g., JavaScript libraries), TrackSign builds a 3-mode network graph of the Internet, which captures the relationship between the computed fingerprints and the resources and domains that use them. With the 3-mode network graph and the generated code signatures, TrackSign automatically analyzes the most popular code looking for “dirty” fingerprints; signatures with a high probability of pertaining to web tracking algorithms. Once discovered, all the resources using those signatures are automatically classified as new tracking systems as well. We used TrackSign to explore the top 100K most popular domains as per the Alexa’s list [23]. The resulting data set contains about 933K resources and 73M signatures collected from more than 5M HTTP requests. The data set and source code of TrackSign and ORM (described later in this paper) is publicly available on [24]. The resources were also labeled using the most popular URL pattern lists currently available. Our results show that our method can detect new tracking resources with high precision (over 92%). After exploring the 100K most popular domains, TrackSign was able to detect 30.000 new trackers, almost 12.000 new tracking JavaScript 71 Fig. 10. Wayback Machine fingerprint evolution especially in Asia. Another interesting observation from Table I is that the number of unique URLs pointing to tracking resources is only about 16% of the total, but more than 35% of all JavaScript resources contain tracking code. This confirms the relevance of detecting web tracking at the resource level, instead of doing it at the URL level as existing content blockers based on blacklists. The picture at the resource level reveals that currently more than one third of the JavaScript resources present on the Internet include tracking algorithms. Overall, our system detected 73.641 trackers and 86.616 websites using at least one tracking system. According to those numbers more than 95% of websites include some sort of tracking algorithm (86.616 out of 90.637). However, our results show that only 92 trackers are present in more than 1% of websites (549 trackers in more than 0.1%), reinforcing the idea that only a few trackers will be accessed by the regular user on a daily basis. The top chart of Figure 9 presents a heatmap with the most used web tracker combinations. Each cell represents the number of domains including tracking systems pertaining to both, the row and column trackers. Note that the same domain can be in more than one cell if the number of trackers used by the domain is higher than two. The diagonal are the number of domains including only the corresponding tracker. The last column aggregates the total number of domains using the tracker. We can see that Google, present in more than 70.000 websites (77%), continues to be the most pervasive tracker on the Internet. Note also that most websites include more than one tracker (the diagonal is almost empty). Not surprisingly, the most usual combinations include trackers from Google, Doubleclick (also belonging to Google), Facebook,Amazon and Twitter. All of them are present in more than 10% of the websites. The bottom chart of Figure 9 shows the probability distribution of the number of trackers per domain. As already discussed, only 4.000 websites are tracker-free and about 7.000 websites load only one tracker. The average number of trackers per domain is 9.7, with a median of 7 trackers. The distribution also shows the number of websites loading one of the top- 5 trackers. Surprisingly, websites loading only one or two TABLE II MOST POPULAR SERVICES Service Tracking Domains URLs First detection Archive.org custom libraries No 26 127 2000-09 Archive.org analytics Yes 54 276 2001-04 JQuery library No 64 465 2003-02 Flash player detection library Yes 14 14 2007-09 Google analytics (library call) Yes 24 52 2009-06 Google tracking Yes 29 2578 2012-04 Facebook events (library call) Yes 10 10 2015-06 Google Tag Manager (library call) Yes 31 45 2016-08 Google analytics Yes 14 14 2017-01 Youtube tracking Yes 30 403 2017-03 Zoom.us No 21 21 2020-03 tracking systems seem to use other trackers not in the top- 5. Almost every website loading more than 3 trackers include at least one of Google or Doubleclick, highlighting once more their pervasiveness on the Internet. D. Wayback Machine: detecting new tracking over time As discussed in Section III-D, TrackSign can automatically detect new web tracking resources using similar methods to previously known tracking systems. However, the detection of completely new methods often requires some human intervention. This more manual process is based on the popularity level, which experts can tune to detect tracking systems at an early stage, before becoming widely used. As the appearance of completely new tracking methods only happens occasionally, we needed a much larger groundtruth, spanning several months or even years, to evaluate this TrackSign feature. Thus, we decided to use the Wayback Machine [25], which is a digital archive that preserves snapshots of almost the entire World Wide Web over time. We modified ORM to scrape the 500 most popular websites from January 2000 to June 2020 from the Wayback Machine. After some preliminary analysis, we decided to set the popularity threshold in TrackSign to 10 domains, which represented a good tradeoff between the amount of code to verify and our available human resources. Figure 10 shows the evolution of the shared and tracking fingerprints over the last 20 years. We can observe a continuous increase of shared code across multiple websites. More than half of this code corresponds to web tracking, confirming our initial hypothesis that shared code can be indicative of the presence of tracking. The popularity level highlighted 735 “new” (i.e., new at that time) resources containing fingerprints shared by more than 10 domains. Table II presents the list of the most popular “new” services and “when” they were detected using TrackSign. After careful inspection, we discovered that the Wayback Machine dynamically replaces most commonly used libraries (including most tracking libraries, such Google Analytics) with its own version, probably as a space-saving measure. This is why many tracking practices were detected 78 TABLE III TRACKING DETECTED Method Type First detection Last detection Appearances Storage-based Cookies 2003-02-01 2020-06-01 270 Session-only Session identifier 2003-02-01 2020-03-01 144 Cache-based Web cache 2007-01-01 2020-06-01 170 Fingerprinting Browser version 2007-01-01 2020-06-01 425 Fingerprinting Browser plugins 2007-10-01 2020-01-01 51 Fingerprinting Browser (other) 2007-10-01 2020-01-01 53 Fingerprinting Device 2009-01-01 2020-03-01 26 Fingerprinting Browser dimensions 2009-06-01 2020-03-01 108 Fingerprinting Browsing history 2009-12-01 2020-03-01 34 Storage-based Session storage 2009-12-01 2020-06-01 181 Fingerprinting Browser capabilities 2010-07-01 2020-01-01 9 Storage-based Local storage 2012-06-01 2020-06-01 224 Session-only window.name DOM 2012-08-01 2015-12-01 2 Fingerprinting WebGL capabilities 2015-05-01 2020-01-01 9 Fingerprinting Browser language 2015-10-01 2019-10-01 21 Fingerprinting Canvas 2016-09-01 2019-06-01 27 earlier with our system than their actual appearance (first two rows in Table II). For example, in the case of Google Analytics, our system reported new tracking as early as June 2009, but it could not determine it was actually Google Analytics until January 2017, when the Wayback machine decided to stop substituting Google Analytics calls by their own analytics libraries. This is an artifact of the Wayback machine that would not occur in reality when crawling the web directly with ORM. Most detected services in Table II were actually tracking systems, while non-tracking services like JQuery are very easy to discard by an expert. Interestingly, the system was also able to detect an increasing number of websites linking to the videoconference service Zoom.us in March 2020, probably due to the social impact of the COVID-19 pandemic. Table III shows a list of different tracking methods found within the suspicious files. We found more than 20 “new” tracking patterns, some of them very intrusive, such as fingerprinting methods. Most of these methods are still used today. Despite the limitations of the Wayback Machine, our results demonstrate TrackSign’s ability to focus on new code with high probability to belong to new tracking systems, which reduces significantly the time and resources required by experts to detect new web tracking systems. VI. DISCUSSION AND FUTURE WORK In this section, we discuss some limitations and additional possibilities of TrackSign. Some of the points introduced here are part of our future work. 1) Online blocking:Although the system has been designed to discover new web tracking offline, the output of TrackSign can be used to create a content-blocker with information about tracking resources. The plugin would compute the hash value for each downloaded file and compare it to a database with all the known resources performing tracking. In case of a match, the resource would be blocked. The main advantage of this approach is the robustness against web tracking systems constantly changing hosting domains, one of the main vulnerabilities of URL-based content-blockers. The main drawback, however, is that such blocking must be performed once the suspicious file has been downloaded, increasing the time and bandwidth required with respect to URL-based lists. 2) Enhancing blacklists:In comparison to existing blacklists, our results show a clear increase in the number of tracking URLs of about 46% (273K new URLs). This information could be used to improve the lists currently used by contentblockers, including those URLs discovered by TrackSign. This process could be easily automated with our system. 3) Crowd-sourcing:The Popularity level presented in this work introduces a delay between the appearance of a new service and its detection, as it needs to become popular before it can be detected. This delay can be mitigated at some extent by reducing the popularity threshold. However, for very small thresholds the number of popular fingerprints can increase significantly. A possible approach would be to rely on the force behind an active community, as in similar open-source projects, that could contribute to classify larger volumes of suspicious code than those we were able to analyze in Section V-D. This would probably increase even further the already huge (and disheartening) figure of tracking code in the Internet. VII. CONCLUSIONS In this work we presented TrackSign, a novel approach to discover new web tracking methods by means of code signatures. To this end, we propose a combination of a contentbased file partition method, with a 3-mode network graph of the resources hosted online. Our algorithm then computes the popularity and the “dirtiness” of each signature to find web resources with a high probability of including tracking code. To evaluate our method, we developed ORM, a new open source framework specifically designed to explore the web and gather information about the resources therein. Our results after analyzing the 100K most popular websites demonstrate the ability of our system to automatically detect new web tracking methods. The algorithm discovered 30.000 new trackers, some of them already present in more than 100 domains, but not detected by current pattern lists. The system also detected almost 12.000 new tracking resources and 275K new tracking URLs. We also observed an inexorable increase in the use of web tracking methods over the last 20 years using historical data from the Internet Archive. According to our results, at the time of this writing at least 95% of the websites include some sort of web tracking system. Moreover, we discovered that more than one third of all JavaScript resources hosted on the Internet include some sort of tracking code inside. The source code and data set collected for this study is publicly available at [24]. VIII. ACKNOWLEDGMENTS This work was supported by the Spanish MINECO under contract TEC2017-90034-C2-1-R (ALLIANCE). 79 REFERENCES [1] B. Krishnamurthy, K. Naryshkin, and C. E. Wills, “Privacy leakage vs. Protection measures: the growing disconnect,” in Proceedings of the Web 2.0 Security & Privacy 2011, p. 10, 2011. [2] P. Leon, B. Ur, R. Shay, Y. Wang, R. Balebako, and L. Cranor, “Why Johnny can’t opt out: a usability evaluation of tools to limit online behavioral advertising,” in Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, CHI ’12, (Austin, Texas, USA), pp. 589–598, Association for Computing Machinery, May 2012. [3] A. Lerner, A. K. Simpson, T. Kohno, and F. Roesner, “Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016,” in 25th {USENIX}Security Symposium ({USENIX}Security 16), USENIX Association, 2016. [4] M. Butkiewicz, H. V. Madhyastha, and V. Sekar, “Understanding website complexity: measurements, metrics, and implications,” in Proceedings of the 2011 ACM SIGCOMM conference on Internet measurement conference, IMC ’11, (Berlin, Germany), pp. 313–328, Association for Computing Machinery, Nov. 2011. [5] T. Bujlow, V. Carela-Espa˜ nol, J. Sol´ e-Pareta, and P. Barlet-Ros, “A Survey on Web Tracking: Mechanisms, Implications, and Defenses,” Proceedings of the IEEE, vol. 105, pp. 1476–1510, Aug. 2017. [6] J. R. Mayer and J. C. Mitchell, “Third-Party Web Tracking: Policy and Technology,” in 2012 IEEE Symposium on Security and Privacy, pp. 413–427, May 2012. [7] A. Hannak, G. Soeller, D. Lazer, A. Mislove, and C. Wilson, “Measuring Price Discrimination and Steering on E-commerce Web Sites,” in Proceedings of the 2014 Conference on Internet Measurement Conference, IMC ’14, (Vancouver, BC, Canada), pp. 305–318, Association for Computing Machinery, Nov. 2014. [8] J. Mikians, L. Gyarmati, V. Erramilli, and N. Laoutaris, “Crowdassisted search for price discrimination in e-commerce: first results,” in Proceedings of the ninth ACM conference on Emerging networking experiments and technologies, CoNEXT ’13, (Santa Barbara, California, USA), pp. 1–6, Association for Computing Machinery, Dec. 2013. [9] K. Lobosco, “Facebook friends could change your credit score,” Aug. 2013. https://money.cnn.com/2013/08/26/technology/social/facebookcredit-score/index.html. [10] The Economist, “Very personal finance,” 2012. https://www.economist.com/finance-and-economics/2012/06/02/verypersonal-finance. [11] Q. Wu, Q. Liu, Y. Zhang, P. Liu, and G. Wen, “A Machine Learning Approach for Detecting Third-Party Trackers on the Web,” in Computer Security – ESORICS 2016 (I. Askoxylakis, S. Ioannidis, S. Katsikas, and C. Meadows, eds.), Lecture Notes in Computer Science, (Cham), pp. 238–258, Springer International Publishing, 2016. [12] U. Iqbal, P. Snyder, S. Zhu, B. Livshits, Z. Qian, and Z. Shafiq, “ADGRAPH: A Graph-Based Approach to Ad and Tracker Blocking,” IEEE Symposium on Security and Privacy 2020, p. 14, 2019. [13] G. Acar, M. Juarez, N. Nikiforakis, C. Diaz, S. G¨ urses, F. Piessens, and B. Preneel, “FPDetective: dusting the web for fingerprinters,” in Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security, CCS ’13, (Berlin, Germany), pp. 1129–1140, Association for Computing Machinery, Nov. 2013. [14] V. Kalavri, J. Blackburn, M. Varvello, and K. Papagiannaki, “Like a Pack of Wolves: Community Structure of Web Trackers,” in Passive and Active Measurement (T. Karagiannis and X. Dimitropoulos, eds.), Lecture Notes in Computer Science, (Cham), pp. 42–54, Springer International Publishing, 2016. [15] H. Le, F. Fallace, and P. Barlet-Ros, “Towards accurate detection of obfuscated web tracking,” in 2017 IEEE International Workshop on Measurement and Networking (M N), pp. 1–6, Sept. 2017. [16] M. Ikram, H. J. Asghar, M. A. Kaafar, A. Mahanti, and B. Krishnamurthy, “Towards Seamless Tracking-Free Web: Improved Detection of Trackers via One-class Learning,” Proceedings on Privacy Enhancing Technologies, vol. 2017, pp. 79–99, Jan. 2017. [17] T.-C. Li, H. Hang, M. Faloutsos, and P. Efstathopoulos, “TrackAdvisor: Taking Back Browsing Privacy from Third-Party Trackers,” in Passive and Active Measurement (J. Mirkovic and Y. Liu, eds.), Lecture Notes in Computer Science, (Cham), pp. 277–289, Springer International Publishing, 2015. [18] Z. Yu, S. Macbeth, K. Modi, and J. M. Pujol, “Tracking the Trackers,” in Proceedings of the 25th International Conference on World Wide Web, WWW ’16, (Montr´ eal, Qu´ ebec, Canada), pp. 121–132, International World Wide Web Conferences Steering Committee, Apr. 2016. [19] H. Metwalley, S. Traverso, and M. Mellia, “Unsupervised Detection of Web Trackers,” in 2015 IEEE Global Communications Conference (GLOBECOM), pp. 1–6, Dec. 2015. [20] D. Gugelmann, M. Happe, B. Ager, and V. Lenders, “An Automated Approach for Complementing Ad Blockers’ Blacklists,” Proceedings on Privacy Enhancing Technologies, vol. 2015, pp. 282–298, June 2015. [21] S. Englehardt and A. Narayanan, “Online Tracking: A 1-million-site Measurement and Analysis,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS ’16, (Vienna, Austria), pp. 1388–1401, Association for Computing Machinery, Oct. 2016. [22] M. O. Rabin, “Fingerprinting by random polynomials,” Technical Report, vol. Center for Research in Computing Technology, Harvard University, pp. 15–81, 1981. [23] K. Cooper, “Alexa: Most popular website list,” June 2020. https://www.alexa.com/. [24] https://github.com/CBA-UPC/ORM, “Online Resource Mapper (ORM),” June 2020. [25] archive.org, “Wayback Machine,” 2020. https://web.archive.org/. [26] AdBlock Plus, “Adblock Plus,” Feb. 2020. https://adblockplus.org/en/. [27] Ghostery, “Ghostery Makes the Web Cleaner, Faster and Safer!,” Feb. 2020. https://www.ghostery.com/. [28] R. Hill, “uBlock Origin,” Feb. 2020. https://github.com/gorhill/uBlock. [29] Disconnect, “Disconnect |Take back your privacy,” 2020. http://disconnect.me. [30] “EasyList,” June 2020. https://easylist.to/. [31] “EasyPrivacy,” June 2020. https://easylist.to/easylist/easyprivacy.txt. [32] M. L´ ecuyer, G. Ducoffe, F. Lan, A. Papancea, T. Petsios, R. Spahn, A. Chaintreau, and R. Geambasu, “XRay: Enhancing the Web’s Transparency with Differential Correlation,” in 23th USENIX Security Symposium, pp. 49–64, 2014. [33] B. Li, P. Vadrevu, K. H. Lee, and R. Perdisci, “JSgraph: Enabling Reconstruction of Web Attacks via Efficient Tracking of Live In-Browser JavaScript Executions,” in Proceedings 2018 Network and Distributed System Security Symposium, (San Diego, CA), Internet Society, 2018. [34] A. Muthitacharoen, B. Chen, and D. Mazi` eres, “A low-bandwidth network file system,” in Proceedings of the eighteenth ACM symposium on Operating systems principles, SOSP ’01, (Banff, Alberta, Canada), pp. 174–187, Association for Computing Machinery, Oct. 2001. [35] Jason Huggins, “SeleniumHQ Browser Automation,” Feb. 2020. https://www.selenium.dev/. [36] J. Mazel, R. Garnier, and K. Fukuda, “A comparison of web privacy protection techniques,” Computer Communications, vol. 144, pp. 162– 174, Aug. 2019. [37] G. Merzdovnik, M. Huber, D. Buhov, N. Nikiforakis, S. Neuner, M. Schmiedecker, and E. Weippl, “Block Me If You Can: A Large-Scale Study of Tracker-Blocking Tools,” in 2017 IEEE European Symposium on Security and Privacy (EuroS P), pp. 319–333, Apr. 2017. [38] L. N. Lielmanis, Einar, “jsbeautifier: JavaScript unobfuscator and beautifier..” https://beautifier.io. 80 ASTrack: Automatic Detection and Removal of Web Tracking Code with Minimal Functionality Loss Ismael Castell-Uroz Universitat Polit` ecnica de Catalunya Barcelona, Spain [email protected] Kensuke Fukuda National Institute of Informatics Tokyo, Japan kensuk[email protected] Pere Barlet-Ros Universitat Polit` ecnica de Catalunya Barcelona, Spain [email protected] Abstract—Recent advances in web technologies make it more difficult than ever to detect and block web tracking systems. In this work, we propose ASTrack, a novel approach to web tracking detection and removal. ASTrack uses an abstraction of the code structure based on Abstract Syntax Trees to selectively identify web tracking functionality shared across multiple web services. This new methodology allows us to: (i)effectively detect web tracking code even when using evasion techniques (e.g., obfuscation, minification, or webpackaging); and (ii)safely remove those portions of code related to tracking purposes without affecting the legitimate functionality of the website. Our evaluation with the top 10k most popular Internet domains shows that ASTrack can detect web tracking with high precision (98%), while discovering about 50k tracking code pieces and more than 3,400 new tracking URLs not previously recognized by most popular privacy-preserving tools (e.g., uBlock Origin). Moreover, ASTrack achieved a 36% reduction in functionality loss in comparison with the filter lists, one of the safest options available. Using a novel methodology that combines computer vision and manual inspection, we estimate that full functionality is preserved in more than 97% of the websites. Index Terms—AST, web tracking, functionality loss, website breakage I. INTRODUCTION During the last years, the research community has been very active looking for new ways to detect and block web tracking (e.g., [1]–[8]). Experts explored numerous online services, finding all kinds of new and exotic ways of exploiting protocols ([1]–[4]) or abusing programming language APIs ([5]–[7]) for user profiling purposes. Unfortunately, most of the proposed solutions are very complex and hard to deploy in a real browsing session, limiting their application to offline studies. Currently, the most popular solution to protect against web tracking is the use of content-filtering extensions in web browsers (e.g., uBlock Origin [9], Adblock Plus [10]). These tools are based on filter lists, manually curated pattern lists containing known tracking domains that are matched against the URLs visited in a browsing session. However, content-filtering extensions as well as most of the previously proposed approaches suffer from several limitations: (i)They require significant manual work to keep the filter lists up to date (e.g., new methods constantly emerge under different URLs); (ii)URL-based detection and protection methods are easy to evade just by changing the hosting domain or dynamically modifying their URL parameters; (iii)obfuscation, minimization, and webpackaging techniques automatically modify the internal website code, breaking many detection systems (e.g., [11], [12]); and (iv)current URL and resource-based blocking methods result in significant website functionality loss ([13], [14]). Some previous works (e.g., [7], [8], [15], [16]) proposed partial solutions to some of these limitations, usually through the use of machine learning methods. However, these solutions present a trade-off, advancing in some aspects but giving up in others (see Section II). In this paper, we present ASTrack, a new method that addresses all the limitations described above. Unlike previous proposals, ASTrack focuses on the code structure instead of the code itself. For this purpose, ASTrack uses an abstraction of the JavaScript code based on Abstract Syntax Trees (AST). An AST is simply a tree representation of the abstract syntactic structure of the source code, regardless of its particular contents (e.g., variable or function names). An AST can represent the entire code as well as the different functional portions of it (e.g., functions). Our proposal is based on the observation that most websites use common analytics or fingerprinting libraries to collect private information. Thus, when the same code structure (i.e., AST) is used across multiple domains, the AST becomes suspicious for performing tracking, especially if some of the domains were previously known to be tracking domains. By using a syntactic abstraction instead of the code itself, our system is more robust to common evasion techniques, such as minimization or obfuscation. Moreover, this abstraction allows us to selectively prune individual tracking ASTs (e.g., functions) while maintaining the rest of the (legitimate) code unmodified. This increase in blocking granularity compared to previous methods, which usually block URLs or complete resources, can better preserve website functionality and detect tracking code under different URLs or within different files. Our evaluation of the top 10k most popular websites shows that ASTrack maintains a detection precision of more than 98%. During our experiments, ASTrack found more than 3,400 new tracking URLs and automatically classified about 50k tracking code pieces, including obfuscated fragments that could not be easily detected with other techniques. Finally, we estimate that website functionality is preserved in approximately 97.7% of websites. In summary, the key contributions of this paper are: 1) A syntactic approach to the detection of web tracking 81 code that is highly adaptive and robust against minimization and obfuscation. 2) A high grade of detection granularity, permitting selective code removal while maintaining the functionality of the website in most cases. 3) A new methodology to detect website functionality breakage by means of computer vision techniques. 4) An evaluation of the tracking blocking performance as well as the website functionality loss for the top 10k most popular websites in the Tranco List. The rest of the paper is organized as follows: Section II presents an overview of web tracking detection systems and the limitations of existing methodologies. Section III describes ASTrack, our new web tracking detection and removal proposal. Section IV presents the evaluation of the web tracking detection and removal process. Finally, Section V concludes the paper and presents future work. II. BACKGROUND AND RELATED WORK A. Web tracking Traditional web tracking systems are usually stateful technologies. They use different techniques to save an identifier inside the storage of the device browsing the web. The identifier will be read again every time the device accesses the same website service. The most common method are the infamous cookies, but there are more exotic approaches such as embedding identifiers in cached documents [17], in the HTTP redirect cache [18], in the HTTP authentication cache [19], or inside the HTML5 storage [20]. However, new privacy regulations (e.g. [21]–[23]) impose multiple restrictions on most of these systems. Moreover, many mainstream browsers have implemented countermeasures to this kind of web tracking. For instance, Safari now blocks all third-party cookies [24], and Firefox blocks third-party cookies from known trackers by default [25]. Chrome will also ban thirdparty cookies in the near future [26]. Stateless technologies, on the other hand, do not save information inside the device. They directly identify the user based on other measurable properties, such as the IP address or the device configuration exposed by the browser. Stateless technologies are also known as fingerprinting methods. Most simple techniques look at numerous properties, such as the screen resolution [27], the version of the browser [28] or the fonts installed in the system [29], to combine them and create a unique identifier. However, the latest functionalities added to web technologies in the form of new JavaScript APIs [30] permit stateless web tracking algorithms to collect much more precise information. Rendering differences due to specific hardware and software combinations can be abused by means of those APIs to precisely identify the browser being used to explore the web [31]–[35]. This kind of web tracking is far more intrusive than the traditional cookies, as it is completely transparent to the user, and there is no easy way to control when, where, or by whom they are being used. B. Detection Most of the solutions proposed in the literature, such as the works from Wu et al. [11] or Ikram et al. [12], apply machine learning (ML) algorithms over the website code to find specific features identifying tracking methods. However, the underlying static analysis used is prone to fail under techniques such as obfuscation, that can modify those features. Iqbal et al. [7] present a browser fingerprinting detection system using a combination of two independent machine learning algorithms, one trained with features extracted from a static analysis of the JavaScript code and the other from a dynamic analysis. The second ML complements the first one in case obfuscation or minimization techniques have been used in the code. They also present a way to reduce the breakage of website functionality by means of the replacement of the tracking code with mock versions of it. The system presents high accuracy in detecting browser fingerprinting and a functionality loss reduction of about 20% whenever the mock functions can be used. However, the system only detects one kind of tracking, and the functionality breakage improvement system does not work on webpackaged files [36], a common practice on today’s Internet. The breakage system is only evaluated on a population of 50 websites. Our previous work at [8] proposes a web tracking detection system based on a deterministic code partition algorithm and a tripartite network representation that allows us to propagate the probability of containing tracking for each piece of code. The system presents high accuracy in finding unknown web tracking. However, the static analysis nature of the system by using directly the code for identification makes it vulnerable to obfuscation or randomized content renaming techniques. Moreover, the partition algorithm makes it impossible to block tracking code without breaking website functionality. C. Mitigation Many of the detection systems presented above include some kind of solution to block the detected web tracking algorithms. However, those solutions are usually complex and difficult to deploy by the common user. In practice, the most commonly used mitigation systems are filter lists. These lists include a collection of patterns identifying URLs suspicious of performing tracking. There is no easy way to create the lists, and usually they are manually curated by the members of an online community. EasyList [37] and EasyPrivacy [38] are both examples of such lists. Many popular content blockers, such as AdBlock Plus [10] and uBlock Origin [9] use those lists to block URLs during loading. Smith et al. present in [16] an alternative approach: trackingfree resource replacements. Some content blockers allow for resource replacements in real-time. Smith et al. automatically generate clean versions of some of the most popular tracking resources to be used as replacements. Similar to [7], they clean the code using a mock replacement for some of the API functions used to track the user. However, this approximation is not scalable, as the inspected scripts are selected manually, and many tracking systems work with dynamic custom files 82 that are different for each website. Moreover, new tracking resources are created daily. Some browsers also implement partial solutions to stateless tracking. In particular, the TOR browser and Firefox, by means of an experimental feature [39], automatically block some of the API functions commonly used for tracking [40]. Unfortunately, this approach breaks every website where the API is used for legitimate purposes. III. ASTRACK In this section, we introduce ASTrack, a new adaptive method to detect and selectively remove web tracking systems while minimizing the functionality loss associated with them. Our proposal is based on the observation that most websites share code and functionality, usually in the form of popular frameworks and useful libraries. For instance, JQuery libraries or social network interaction buttons are common to many different websites. Web tracking is no different. Most websites use common analytics or fingerprinting libraries (e.g., Google Analytics) to collect user information. It is rare to find websites with completely customized tracking libraries not present on other websites. Thus, web tracking functionality is also shared by many websites. Our proposal is to search for this shared functionality between multiple websites and automatically identify web tracking systems among them. A. Functionality identification As its name implies, ASTrack tracks shared Abstract Syntax Trees (AST) between different websites. An AST represents the code as a tree, whose nodes are its elements, and edges the relation between them. However, ASTrack does not look for the actual elements included in the AST but for the structure of the AST as a whole, looking only at the node types and their relations. The structure of the tree is independent of the names and values of the code, representing the functionality itself. Minimized or obfuscated ASTs share the same structure. Independent trees with exactly the same structure necessarily share the same functionality, despite the different results they may obtain depending on the input values. In summary, looking at AST’s structure, we will find functionality shared by different web services. In order to define a representation of the AST structure, we decided to follow two principles: consistency and simplicity. In our case, consistency means that different codes with the same structure must always be represented equally. On the other hand, simplicity is a key factor in favoring a system that can be deployed in reality, where complex implementations can result in performance constraints. The selected representation corresponds to a simple label chain. The identifier label chain is created by traversing the AST, descending recursively into each branch, and concatenating integer identifiers for each node type found. Fig. 1 shows a simple AST and the process to obtain its identifier for illustration purposes. Each node receives one aperture label (left integer) and one closure label (right integer), except operator nodes, which only have the aperture label. The dotted arrows indicate their concatenation ExpressionStatement BlockStatement Program AssignmentExpressionAssignmentExpression Identifier IdentifierFunctionExpression FunctionExpression Identifier ExpressionStatement ReturnStatement CallExpression ... BlockStatementIdentifier ReturnStatement BinaryExpression ... ...... 070 998 999 071 054 055 010 011 988 989 010 011 058 059 082 083 034 035 ? ? ? ? 070 071 054 055 010 011 988 989 010 011 058 059 082 083 046 047 ? ? ? ? generate_identifier() ... ... ... ... AST ID: 998070054010011988010011058082034...035083059989055071070054010011988010011058082046...047083059989055071999 AST ID AST #1 Sub AST #2 Sub AST #3 Fig. 1. AST identification example: Integer values represent the aperture (left) and closure (right) labels of each node. The dotted arrow indicates the concatenation order to generate the ID. Looking for pairs of aperture and closure labels of function nodes, we find their corresponding identifiers. order. When the algorithm enters a node, it concatenates its aperture label into the AST label chain. If the node has branches, it explores them recursively. Finally, if present, it also concatenates the closure label and finishes. The resultant label chain, composed of an ordered node identification chain, is the simplest representation that allows us to unambiguously identify the AST structure. However, not only the main AST identifies functionality, but each nested function or method also contains partial isolated functionality. Thus, we will generate identifiers for their branches as well. Fig. 1 shows three identifiers in different colors, one corresponding to the entire AST and two for internal nested function declarations. In order to find the identifier of the nested branches, we only need to look for the pair of labels that enclose them (988 and 989 in our example) within the main AST identifier. Finally, to fix the maximum length of the identifiers, a hash function is applied to each of their label chains. For purposes of simplification, during the rest of the paper we will refer to AST identifiers simply as ASTs. B. Web tracking detection ASTrack detects web tracking code by independently classifying the detected ASTs for each inspected URL. To this end, we initially label the URLs as tracking or not based on the most up-to-date filter lists. The classification is done by looking at the overall number of URLs that contain the identified functionality and are already known to perform tracking. The underlying idea is that, if one AST structure is mostly present in tracking URLs, its functionality is most probably used for tracking purposes. Thus, an unknown URL 83 Safe AST Neutral ASTTracking URLSafe URL Safe URL detected with no AST info. Initial safety level: 1 (allowed) New safe URL detected with shared AST. Shared AST safety updates to their sum. New tracking URL detected with shared AST. Shared AST safety value becomes 0 (allowed). -2 -1 -1 -1 12 1 2 -1 -1-1 -1 -2-1 -1 -1 0-1 0 12 1 2 1 2 1 12 1 11 New tracking URL detected with shared AST. Safety level decreases more. -2 -2 -1 -2 12 1 2 -1 -2-1 -1 -2-1 -1 New tracking URL detected with shared AST. Initially safe AST becomes unsafe. -2 -1 New tracking URL with shared ASTs. Safety level surpasses limit. AST classified as tracking AST. -2 -3 -1 -3 12 1 2 -1 -3-1 -1 -2-1 -1 -3 -1 -2 -3 Safe URL reclassifies as tracking URL. Safety level is updated and propagates. -2 -5 -1 -5 -1 0 1 0 -1 -5-1 -1 -2-1 -1 -5 -1 -2 -5 Tracking URL detected. Initial safety level -1 (blocked). 1 2 1 12 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 -1 -2 1 2 3 4 5 6 7 8 Tracking AST EquivalencyUnsafe AST Fig. 2. ASTrack tracking detection and removal conceptual process: By computing safety values for each AST loaded by URLs, ASTrack decides which code to remove or not. The safety is calculated by accounting for the number of already-known tracking URLs that include the AST. When the evidence is enough to consider the AST a tracking one, the URLs containing it are reclassified as tracking, and their safety values propagate. that shares the same functionality (i.e., the same AST) with other tracking URLs will also be a tracking URL, and we can automatically classify it as such. Fig. 2 conceptually shows the process of the ASTrack automatic identification system during a usual browsing session. In the first step, the user opens a domain that loads a safe URL (i.e., not labeled as tracking). ASTrack automatically computes its inner AST identifiers. The circle represents the URL, and its inner hexagons are the ASTs internally loaded. As ASTrack does not have information about this URL, it will consider its inner ASTs as safe (green color and positive value). In the second step, a new safe URL is detected, and shares one AST with the previous URL. Their shared AST safety level becomes the sum of their individual safety levels, increasing it to 2. The third step introduces an already-known tracking URL. Its ASTs are considered unsafe (negative safety value and light red color) and consequently blocked. In the fourth step, a new tracking URL is detected, but this time it shares one AST with an URL that until now was considered safe. This shared AST safety value becomes zero. ASTrack does not have enough evidence to decide if it should be blocked or not. In this case, ASTrack allows its execution to maintain website functionality as much as possible. In the fifth step, a new tracking URL is detected and shares the same AST as the last URL. The safety value for the AST becomes negative. From now on, whenever the first URL is opened, ASTrack will block this specific AST but not the rest of them. In the sixth and seventh steps, new tracking URLs are detected sharing the same AST, thus decreasing its safety value again. The resultant safety value is considered enough evidence to autoclassify the AST as a tracking AST (red color). Consequently, each URL containing this piece of code is also a tracking URL. In the last step, ASTrack classifies the first safe URL as tracking. From now on, whenever it is detected, it will decrease the safety of all its internal ASTs propagating the information. Performance-wise, ASTrack should be implementable inside the browser’s internal JavaScript engine. The AST identifiers are simple enough to be computed during the initial DOM construction time. Once computed, comparing them to the subset of tracking ASTs is a set membership type of problem, whose implementation can be done, for instance, by means of abloom filter. However, for practical reasons, in this research we will compute them and perform the comparison offline. C. Web tracking removal Maintaining the functionality of the website is a key element for the adoption of any privacy protection method, as many users like the idea of improving their privacy but are discouraged by the associated website breakage. The high granularity obtained by ASTrack, which looks at the 84 TABLE I DATA SET & EVALUATION Static evaluation Dynamic evaluation Domains 8,179 URLs 615,780 JavaScript URLs 161,593 Tracking URLs 41,274 Unique ASTs 7,015,542 Shared ASTs 2,683,586 New tracking URLs 3,409 2,183 New tracking JavaScript files 3,109 2,093 Tracking ASTs 49,453 41,114 Precision 98.52% 98.47% inner ASTs instead of the file itself, allows the method to minimize the functionality loss related to privacy protection purposes. In the worst-case scenario, for URLs with no shared ASTs, ASTrack performs equal to the filter lists. It blocks the complete code pertaining to that URL. However, if shared ASTs are present within the code, common as we will see in the next section, ASTrack automatically adapts to distinguish between them, selectively classifying tracking AST branches and URLs. For instance, in step 5 of Fig. 2, ASTrack has one safe URL within whose ASTs one is identified as unsafe. Thus, ASTrack can selectively prune the branch of this AST without compromising the rest of the code. This progressive detection achieves more detail than the traditional alternatives and minimizes the functionality loss usually suffered as a trade-off for privacy protection. IV. EVALUATION To evaluate ASTrack, we collected a labeled snapshot of all the URLs and resources pertaining to the top 10k most popular websites according to the Tranco List [41]. We used Selenium [42] in combination with Mozilla Firefox and a customized version of uBlock Origin [9] to collect it. Our customized uBlock intercepts all the HTTP requests, labels them according to its included lists, but allows them to pass through. To compute the ASTs, we used the JavaScript code parser Esprima [43]. For HTML files containing JavaScript, we automatically extract the code and compute its ASTs. Table I contains information about the obtained data set. From the initial population of 10k websites, 8,179 domains were successfully inspected using a timeout of 60 seconds. The rest were not accessible at the time of the collection or made the timeout expire. The labeling process classified 41,274 JavaScript URLs as tracking. From the collected data, we precomputed the inner ASTs of each URL. More than 38% of them are shared between different websites, validating our observation that many domains share common services. With the collected data set, we feed ASTrack in order to classify the labeled ASTs and detect unknown tracking URLs. The evidence threshold, used to automatically classify an AST as tracking, was manually validated to maximize precision and minimize false positives that would break the functionality. Its value is dynamically computed as the 90% of the total URLs containing the AST. Similarly, to avoid classifying f u n c t i o n a0 0x4172 ( 0x3dcddc , 0 x3 f93 88 ) {r e t u r n a0 0x4172= f u n c t i o n ( 0x5a6727 , 0x4172bc ) {0x5a6727= 0x5a6727 −0x19d ; va r 0x22ac18 =a0 0x5a67 [ 0x5 a6727 ] ; r e t u r n 0x22ac18 ; }, a0 0x4172 ( 0x3dcddc , 0x3f9388 ) ;} f u n c t i o n u ( g , O) {r e t u r n u= f u n c t i o n ( a , y ){a=a −475; v a r b=m[ a ] ; r e t u r n b }, u ( g ,O) } Obfuscated code matching example #1 f u n c t i o n ( 0x210d59 , 0x4d8907 , 0x1f76d2 , 0 x 4 f f f e f ){r e t u r n 0x210d59 ( 0x4d8907 , 0x1f76d2 , 0 x 4 f f f e f ) ;} f u n c t i o n ( ap i , id , key , l o c a t i o n ) {r e t u r n c a l l S t o r a g e F u n c t i o n ( ge tI te m , arg um ents , l o c a t i o n ) } Obfuscated code matching example #2 Fig. 3. Obfuscated code detection: ASTrack was able to match obfuscated functions (top) with their alternative clear code (bottom) in different files by looking at their structure. ASTs without enough evidence, we empirically fixed a minimum of 10 different URLs containing the AST to propagate the tracking information. In order to evaluate ASTrack, we compare two different scenarios: a static evaluation with the complete interconnected graph before propagating the safety values, and a dynamic evaluation with no previous information about the ASTs available, forcing ASTrack to fill the graph. A. Static evaluation This experiment is composed of two phases. In the first phase, we create the complete graph, including all the relations and initial safety values for the shared ASTs. In the second phase, we run the ASTrack algorithm in order to identify tracking ASTs and propagate them to find new tracking URLs. This experiment is used to validate ASTrack’s ability to find false negatives inside the filter lists. URLs not present in the filter lists but sharing a tracking AST (more than 90% of the URLs containing it are known to be tracking) are most probably false negatives. Table I includes the obtained results. ASTrack classified as tracking 49,453 ASTs and found 3,409 new tracking URLs, a 7.62% increase with respect to the initially labeled data set. Inspecting those URLs, most of them pertained to the usual suspects (e.g., Google, Facebook, Twitter), while some others were files hosted in CDNs, which are hard to block without breaking page functionality on many websites. To validate them, we looked at the subset of files loaded by those URLs, composed of 3,109 JavaScript files. None of the files were already known to perform tracking (i.e., loaded by a different tracking URL). To study them, we first automatically checked their content for the inclusion of some frequent keywords used for tracking. The list of keywords is formed by the keywords previously found by Lerner et al. in [6] and by Iqbal et al. in [7] for common stateless web tracking methods. We added some additional keywords for stateful tracking mechanisms (e.g. getCookie,setCookie, localStorage or sessionStorage). From the initial 3,109 files, 2,916 contained some of those keywords, with a median of 4 keywords per file. From the remaining 193 files, 50 were randomly selected and manually inspected. Approximately 76% of them (38 out of 50) were recognized as tracking, while 85 Fig. 4. Webpack and tracking presence: 6% of the JavaScript URLs contain tracking code inside webpackaged files. Traditional privacy-protecting tools suffer from functionality loss when blocked. ASTrack granularity allows us to selectively block only the tracking portions. for the rest there was not enough evidence. Overall, the method presented more than 98% of precision and automatically found about 3,400 false negatives. Three of the manually inspected files presented obfuscation techniques. ASTrack was able to automatically find structure coincidences with already known tracking files and correctly classify them. Fig. 3 shows some examples of obfuscated code and their alternative clear code found by ASTrack in different files. On the other hand, 1,564 (50.32%) of the newly detected tracking files are webpackaged files. Webpack [36] is a framework to easily pack different scripts inside only one file. It automatically looks for the needed dependencies and inserts them inside the file to allow for self-contained dynamic content. However, if the resource includes tracking libraries, privacy-protection tools cannot block it without suffering the functionality loss associated with blocking the rest of the included code. In contrast, ASTrack is able to detect inside them code portions used exclusively for tracking purposes. Listing 1 shows four examples of the first lines of webpackaged files. Although their code seems different, the structure of the code is always the same. Thus, thanks to ASTrack’s ability to find shared AST structures, we can easily discover webpackaged files in the wild. To this end, we compared the initial portions of the AST identifiers of a subset of webpackaged files, and automatically extracted some patterns to identify them. Searching for those patterns in our collected AST data set, we accounted for the total number of webpackaged files and how many of them are classified as tracking. Fig. 4 shows the obtained results. About 39% of files were safe, ( window . webpackJsonp=window . webpackJsonp | | [ ] ) . push ( [ [ 2 6 1 ] , { XygZ : . . . ( s e l f . webpackChunk N E= s e l f . webpackChunk N E | | [ ] ) . push ([[4367] ,{4 3 6 7 : . . . ( s e l f . LOADABLE LOADED CHUNKS = s e l f . LOADABLE LOADED CHUNKS | | [ ] ) . pu sh ( [ [ 7 6 4 2 9 ] , {122954: . . . (window. webpackJsonpwebpackLogReporter=window. webpackJsonpwebpackLogReporter | | [ ] ) . push ( [ [ 5 ] , {9 3 : . . . Listing 1. Webpack files structure Fig. 5. Tracking AST distribution: Distribution of the number of tracking ASTs included in tracking URLs. Most URLs contain only a few of them. Between all the ASTs included in the file (38 by median), ASTrack was able to discover the few ASTs whose code is used for tracking purposes. non-packaged files. On the other hand, approximately 48% of the JavaScript files are webpackaged files, and 32% include tracking. About a 6% of the files are both webpackaged and include tracking. This represents 20% of all the tracking URLs. Unfortunately, filter lists and other methods blocking complete resources will cause websites using those URLs to lose functionality. In contrast, ASTrack permits us to selectively block only the tracking ASTs while maintaining functionality in most cases. To discover if ASTrack is blocking complete files or only portions of them, we accounted for the number of tracking ASTs present in each tracking file. Fig. 5 shows the distribution of the number of tracking ASTs included inside tracking URLs. According to our results, more than 60% of the detected tracking files include only one or two tracking ASTs (the median is 6). In comparison, the median of ASTs per file, including non-tracking ones, is 38 ASTs per file (35 for non-tracking URLs). Thus, ASTrack is selectively classifying only the branches identifying web tracking. B. Dynamic evaluation Our second experiment allows us to evaluate the adaptation properties of ASTrack’s algorithm. We run the system with the AST graph empty. Only the URL tracking information in the filter lists is available. In this case, we can study if, by applying the method to a common browsing session, the system is able to gradually discover new web tracking and correctly identify tracking ASTs. To this end, we consecutively feed ASTrack with data from one URL at a time. This forces the algorithm to progressively compute the connections between the ASTs loaded and their safety values. The URL insertion order is set to match the website rank of the Tranco List. As it is based on domain popularity, it is a good representation of a common browsing session, where pages that are very popular are more likely to be accessed before websites with a lower rank. For each domain, its accessed URLs are introduced arbitrarily, as online resources are mostly loaded asynchronously. Table I includes the obtained results. After the 8,179 domain insertions, ASTrack labeled as tracking 41,114 ASTs. This represents a reduction of about 16% in comparison to the 86 static evaluation process presented in the last section. However, ASTrack found 43,457 tracking URLs, a decrease of less than 3% with respect to the complete model approach. Between them, 2,183 (5%) were not previously included in the initial filter lists. Once more, we studied the 2,093 JavaScript files loaded by those URLs. Interestingly, comparing them with the subset of files found during the static evaluation, about 35% of them were new resources, not previously classified as tracking. This highlights the main weakness of the filter lists: good precision but low recall. Many URLs incorrectly classified as safe can increase the overall safety value of their inner ASTs and not be detected as tracking using the complete graph. In contrast, progressively feeding ASTrack can help find them. Following the same methodology, we automatically checked for the inclusion of frequent tracking keywords inside the files. 1,868 files included at least one of them, with a median of 5 keywords per file. From the subset of files that do not include keywords and were not detected during the complete graph experiment, we randomly selected 50 files and manually inspected them. The inspection discovered only seven of them mistakenly classified as tracking (mainly reddit.com static scripts). Finally, in line with our previous finding, 46.67% of them were webpackaged files. Overall, as in the static evaluation, more than 98% of the detected URLs were correctly classified, validating the adaptation properties of ASTrack to automatically discover web tracking. C. Tracking removal and website breakage To evaluate the tracking removal efficiency of ASTrack we measure the functionality loss associated with it. In this work, for practical reasons, we use file replacements to test and validate our new web tracking removal methodology, similar to the proposal in [16]. To generate the file replacements, we automatically remove all the code pertaining to tracking ASTs from the tracking files detected during the static and dynamic evaluations (25,840 files). Unfortunately, although web technologies have been around for about 30 years, there is not yet a defined method to evaluate website breakage. Proposals such as [44] and [45] were focused on breakage due to JavaScript engine rendering differences, looking at DOM discrepancies. However, cleaning web tracking systems modifies the DOM structure of the website, but may not deteriorate its functionality as they are additional systems that are usually not related to the website content. Until now, subjective manual analysis has been used to detect functionality loss (e.g. [7], [15], [16]). However, this approach does not scale, limiting the number of evaluated websites to the manual labor you can afford (a few dozens in previous works). In this work, we introduce a new alternative methodology, using computer vision techniques in order to discover website breakage suspicious websites prior to the manual inspection. The idea is to compute the similarity between screenshots taken with and without the modifications introduced in our process. Note that, as many websites include animations and other dynamically modified content, we need to take care of the expected variability of a website. If the obtained screen- Fig. 6. Similarity comparison (CDF): Distribution of websites in function of their visual similarity percentage (Normalized Cross Correlation). Five data sets comparing two vanilla browsers and one more comparing a vanilla browser with our file replacements were taken. shots are not similar enough, we consider them suspicious of functionality loss. The proposed process is: 1) Collect multiple independent screenshot data sets from two vanilla browsers in pairs for the desired population. Each pair has to be collected in parallel to minimize the impact of external events between them (e.g., network congestion, periodic maintenance). 2) Collect one more data set by replacing one vanilla browser with our modified approach. In our case, we will use the file replacements created by removing the branches found in the last section. 3) Compare the obtained pairs of screenshot data sets using Normalized Cross Correlation (NCC) [46] or another equivalent technique to detect the percentage of similarity between them. 4) Compute the expected similarity deviation per website by means of the standard deviation and its confidence intervals between the multiple similarity measures obtained from the vanilla browsers. 5) Check if our modified output similarity is within the expected deviation for each website. 6) For websites that are not similar enough, generate a diff file between both screenshots, highlighting the pixels that are different between them. In a posterior phase, an expert can visually inspect the diff file along with the screenshots to better classify the suspicious websites. Applying this methodology, we collected a new data set of the top 10k most popular websites with one vanilla browser alongside another browser using our file replacements. The resulting crawl contains information about 8,050 Internet domains, and our plugin replaced almost 23k elements with their clean versions. Surprisingly, although we are not actively blocking URLs, the vanilla browser loaded about 22k more than our system. Thus, this excess of traffic can be directly attributed to tracking purposes. Approximately 72% of domains (5,751 out of 8,050) benefited from a privacy improvement thanks to our removal system. On average, 4.05 JavaScript files 87 Computer Networks 226 (2023) 109687 Each CSV file contains the data for the DB table named in the file. The following is a summary of the meaning of all the values in the database tables. •domain: Main table containing a list of the domains included in the database. Column Type Description Example id INTEGER Main identifier (primary key) 1 hash VARCHAR (64) Hash identifier of the domain (SHA256 (name)) “d4c9d9...1e664f” name VARCHAR (100) Level 2 domain name “google.com” insert_date DATETIME Date of insertion in the database 2021-07-22 07:04:23 update_timestamp TIMESTAMP Timestamp of the last update 2022-03-04 06:44:31 •url: Table containing the URL list included in the database. Column Type Description Example id INTEGER Main identifier (primary key) 4 hash VARCHAR (64) Hash identifier of the URL (SHA256 (url)) “ccb344...7fda45” url TEXT URL string “http://baidu.com” host_id INTEGER Identifier of the domain hosting the resource pointed by the URL (foreign key: host) 47 mime_type_id INTEGER Identifier of the MIME type of the resource pointed by the URL (foreign key: mime_type) 1 type VARCHAR (45) Type of the resource as given by the URL headers main_frame from_cache TINYINT Boolean. 1 if the resource was already present in cache, 0 otherwise 0 server_ip VARCHAR (45) or NULL IP address of the servers hosting the resource if available “220.181.38.148” is_EU TINYINT Boolean. 1 if the country is within the EU, 0 otherwise 0 country_code VARCHAR (16) The ISO country code (2 or 3 letters) “CN” request_headers JSON The complete request headers in JSON format {Host: baidu.com, User-Agent: Mozilla/ 5.0} response_headers JSON The complete response headers in JSON format {Server: Apache, Content-length: 81} security_info JSON Security info as obtained by the browser in JSON format {state: insecure} ublock TINYINT Boolean. 1 if the URL was blocked by uBlock Origin, 0 otherwise 0 tracksign TINYINT Boolean. 1 if the URL was found to 0 (continued on next column) (continued) Column Type Description Example contain tracking by TrackSign algorithm, 0 otherwise certificate_id INTEGER or NULL Identifier of the certificate obtained from accessing the URL (foreign key: certificate) NULL resource_id INTEGER Identifier of the resource pointed by the URL (foreign key: resource) 1 insert_date DATETIME Date of insertion in the database 2021-02-17 14:27:46 update_timestamp TIMESTAMP Timestamp of the last update 2022-03-21 14:26:40 •domain_url: Table containing the relation between domains and its loaded URLs. Column Type Description Example id INTEGER Main Identifier (primary key) 1 domain_id INTEGER Identifier of the domain (foreign key) 4 url_id INTEGER Identifier of the URL (foreign key) 4 third_party TINYINT Boolean. 1 if the URL is thirdparty, 0 otherwise 0 initiator_frame INTEGER or NULL Identifier of the URL parent<->child relation (which URL loaded the current URL) or NULL if no parents NULL insert_date DATETIME Date of insertion in the database 2021-02-17 14:27:46 update_timestamp TIMESTAMP Timestamp of the last update 2022-03-21 14:26:40 •Host: Table containing a list of the hosts accessed by any obtained URL. Column Type Description Example id INTEGER Main identifier (primary key) 1 hash VARCHAR (64) Hash identifier of the host (SHA256(name)) 311933...31b874 name TEXT Host name facebook.com pointed_by INTEGER Number of domains loading at least one URL hosted by this host 226717 pointed_by_trackers INTEGER Number of domains loading at least one URL classified as web tracking hosted by this host 193217 update_timestamp TIMESTAMP Timestamp of the last update 2022-03-30 18:42:26 •mime_type: Table containing all the MIME types collected in the database. I. Castell-Uroz and P. Barlet-Ros 94 Computer Networks 226 (2023) 109687 Column Type Description Example id INTEGER Main identifier (primary key) 1 hash VARCHAR (64) Hash identifier of the MIME type (SHA256(name)) Bb4770...0fc25a name TEXT MIME type name text/html content_type VARCHAR (45) String identifying the group containing this MIME type (e.g. Image, Media, Script) Frame •certificate: Table containing all the certificates collected in the database. Column Type Description Example id INTEGER Main identifier (primary key) 1 hash VARCHAR (64) Hash identifier of the certificate (SHA256 (json)) 8baff9...b7ee72 json JSON JSON containing the certificate information {“subject”: {“commonName”: *. wikipedia.org”}, ...} file LONGBLOB BLOB containing the gziped file of the certificate 0x789C7D...C8CA62 •resource: Table containing the resources loaded by the URLs. Column Type Description Example id INTEGER Main Identifier (primary key) 1 hash VARCHAR (64) Hash identifier of the resource (SHA256 (file)) 1d2d89...1431fb is_tracking TINYINT Boolean. 1 if the resource does web tracking, 0 otherwise 0 type VARCHAR (16) Resource’s type frame insert_date DATETIME Date of insertion in the database 2021-02-17 14:27:46 update_timestamp TIMESTAMP Timestamp of the last update 2021-05-11 10:13:29 4. Experimental design, materials, and methods The dataset was collected between June and December of 2021 using ORM [1] a tool developed by the Universitat Polit` ecnica de Catalunya to perform online experiments. ORM uses a combination of Selenium [2], a tool for automation of website experiments, and Firefox [3] to open all the websites explored. Firefox runs a customized version of uBlock Origin [4], an adblocker plugin, that allows us to intercept all the URLs being accessed by the website and at the same time label them as web tracking/advertisements or not if they would have been blocked by uBlock Origin. Then, ORM opens once more each of the found URLs, collecting all kinds of information such as the HTTP headers (request and response), cookies, and URL characteristics (e.g. mime-type, encoding, security status). In the case of being transmitted over HTTPS, it also downloads and stores the corresponding certificates. Finally, it downloads the resource to identify it by means of its hash value. Wherever possible, ORM automatically deduplicates the information to optimize the space and identifies the same URLs, hosts, resources, etc. using a hash value as an identifier. A subset of this dataset has been used for several publications. In [5], the data was used to extract a picture of the current status of web tracking on the Internet at the time and was included in the form of a tutorial about web tracking. In [6], the tracking information was used to feed a deep learning algorithm to automatically classify URLs as tracking or not based solely on the URL itself. In [7], the relation between domains, URLs, and files loaded by the URL was used to compute the effective page size of each domain once all the files loaded dynamically were acquired. In [8], the data was used as the initial ground truth for the research of a new web tracking discovery algorithm that we called TrackSign. The obtained label information has been included in the present dataset to allow other researchers to compare it to it or use it to further develop new web tracking detection algorithms. Declaration of Competing Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Data availability I have shared the link to my data at the Attach File step Acknowledgments This publication is part of the Spanish I+D+i project TRAINER-A (ref.~PID2020-118011GB-C21), funded by MCIN/ AEI/10.13039/ 501100011033. This work is also supported by the Catalan Institution for Research and Advanced Studies (ICREA Academia). References [1] Online Resource Mapper (ORM). https://github.com/CBA-UPC/ORM, 2022 (accessed 18 April 2022). [2] Selenium. https://www.selenium.dev/, 2022 (accessed 18 April 2022). [3] Firefox. https://www.mozilla.org/en-US/firefox/, 2022 (accessed 18 April 2022). [4] uBlock Origin. https://ublockorigin.com/, 2022 (accessed 18 April 2022). [5] I. Castell-Uroz, J. Sol´ e-Pareta, P. Barlet-Ros, Network measurements for web tracking analysis and detection: A tutorial, IEEE Instrumentation & Measurement Magazine 23 (9), 50-57. 10.1109/MIM.2020.9289071. [6] I. Castell-Uroz, T. Poissonnier, P. Manneback, P. Barlet-Ros, URL-based Web Tracking Detection Using Deep Learning, in: 2020 16th International Conference on Network and Service Management (CNSM), 2020, pp. 1–5, https://doi.org/ 10.23919/CNSM50824.2020.9269065. [7] I. Castell-Uroz, R. Sanz-García, J. Sol´ e-Pareta, P. Barlet-Ros, Demystifying Contentblockers: Measuring their Impact on Performance and Quality of Experience, IEEE Transactions on Network and Service Management (TNSM) (2022), https://doi. org/10.1109/TNSM.2022.3179267. [8] I. Castell-Uroz, J. Sol´ e-Pareta, P. Barlet-Ros, TrackSign: Guided Web Tracking Discovery, in: IEEE INFOCOM 2021-IEEE Conference on Computer Communications, 2021, pp. 1–10, https://doi.org/10.1109/ INFOCOM42981.2021.9488842. [9] Common Crawl. https://commoncrawl.org/, 2022 (accessed 22 December 2022). [10] S. Schelter, J. Kunegis, Tracking the Trackers: A Large-Scale Analysis of Embedded Web Trackers, in: 10th International AAAI Conference on Web and Social Media, 2016. [11] Z. Thang, C. Yue, A Comparative Measurement Study of Web Tracking on Mobile and Desktop Environments, in: 20th Pribvacy Enhancing Technologies Symposium, PETS, 2020. I. Castell-Uroz and P. Barlet-Ros 95 Computer Networks 226 (2023) 109687 Ismael Castell-Uroz ([email protected]) is a Ph.D. student at the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, where he received the B.Sc. degree in Computer Science in 2008 and the M.Sc. degree in Computer Architecture, Networks and Systems in 2010. He has several years of experience in network and system administration and currently holds a Projects Scholarship at UPC. His expertise and research interest are in computer networks, especially in the field of network monitoring, anomaly detection, internet privacy and web tracking. Pere Barlet-Ros ([email protected]) is a Full Professor with the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, and Scientific Director at the Barcelona Neural Networking Center (BNNUPC). He received the M.Sc. and Ph.D. degrees in Computer Science from UPC, in 2003 and 2008, respectively. From 2013 to 2018, he was Co-founder and Chairman of the machine learning startup Talaia Networks. His research has been integrated in several open-source and commercial products, including Talaia Polygraph, Auvik TrafficInsights, Intel CoMo and SMARTxAC. In 2015, he was awarded as the best entrepreneur of the UPC School of Informatics (FIB). More recently he has been awarded by the ICREA Academia Programme (2023). I. Castell-Uroz and P. Barlet-Ros 96 1 ePrivo.eu: An Online Service for Automatic Web Tracking Discovery Ismael Castell-Uroz, Ismael Douha-Prieto, Meritxell Basart-Dotras, Pol Mesegu´ e-Molina, and Pere Barlet-Ros Abstract—Given the pervasiveness of web tracking practices on the Internet, many countries are developing and enforcing new privacy regulations to ensure the rights of their citizens. However, discovering websites that do not comply with those regulations is becoming very challenging, given the dynamic nature of the web or the use of obfuscation techniques. This work presents ePrivo, a new online service that can help Internet users, website owners, and regulators inspect how privacy-friendly a given website is. The system explores all the content of the website, including traffic from third parties and dynamically modified content. The ePrivo service combines different state-of-the-art tracking detection and classification methods, including TrackSign, to discover both previously known and zero-day tracking methods. After 6 months of service, ePrivo detected the largest browsing history trackers and more than 40k domains including cookies with a lifespan longer than one year, which is forbidden in some countries. Index Terms—Fingerprinting, Privacy, Web Tracking, Web Embedding I. INTRODUCTION In a world where the collection of personal data has a tremendous impact on the revenue of many companies (the size of the online data analytic market is expected to reach $10.73B by 2026 [1]), the Internet has become a place where almost every website (>95% [2]) tries to obtain personal information about their users by means of web tracking methods. The loss of privacy that this practice entails is not always perceived but, when it is known, it is seen as inevitable. However, only the most obvious web tracking systems (e.g., cookies) are commonly known. Most companies use complementary fingerprinting methods hidden in the background to better identify users, which can be used to infer sensible information, such as gender, race, income or even political ideologies. Thus, many users are not aware that their actions on the Internet can (and will most likely) affect other aspects of their lives. The personal information collected using web tracking techniques has been used, for example, to decide whether to give someone a loan depending on the financial status of their Facebook friends, or accepting or denying someone’s insurance coverage based on their lifestyle and hobbies, among many other examples [3]. Fortunately, in the last few years, governments have started to grasp the importance of privacy on the Internet. For example, the EU in 2018 and California in 2020 enforced new mandatory regulations focused on online privacy. China I. Castell-Uroz, I. Douha-Prieto, M. Basart-Dotras, P. Mesegu´ e-Molina and P. Barlet-Ros are with the Broadband Communications Research Center of the Universitat Polit` ecnica de Catalunya, Barcelona, Spain (e-mail: [email protected]). published similar regulations just a few months ago. All those regulations define some useful policies to defend users’ privacy from such questionable usages, or at least to obtain the user’s consent in order to collect their personal information (Section II-B). However, due to the complex web of interconnections that form the Internet ecosystem, determining whether a website complies with those regulations is not an easy task. Thus, regardless of all the previous work done on the topic, there is still a lack of tools that can help users as well as other privacy-concerned actors understand the data collection processes being performed underneath any given website. In this work, we present ePrivo [4], an electronic privacy (e-privacy) observatory that reports privacy-threatening information about millions of online resources. ePrivo works by examining the HTML and JavaScript code of all the elements included in any website, looking for pieces of code used for tracking purposes. The detection system is based on a state- of-the-art algorithm (TrackSign [2]) that looks for common tracking code shared among many websites. ePrivo also automatically classifies the detected tracking code according to the particular method used by the website to collect personal information (e.g., cookie type, fingerprinting method). ePrivo is a web-based public service that can help improve the privacy ecosystem of the Internet by letting regulators easily inspect any website and find common privacy threats against the current regulations. Moreover, ePrivo can be used by any person willing to know more about the privacy threats present in the websites they frequently visit. The rest of the paper is organized as follows: Section II presents the required background and the related work. Section III describes the architecture of the system and the web tracking detection and classification algorithms behind ePrivo. In section IV we present some common use cases of ePrivo to explore privacy aspects of the Internet. Section V includes some illustrative results obtained with ePrivo, while Section VI briefly discusses the future of privacy-preserving methods within the current Internet context. Finally, Section VII concludes the paper and presents future work. II. BACKGROUND AND RELATED WORK A. Web Tracking Web tracking is a collection of techniques to identify and follow users’ activities on the Internet. Although web tracking technologies were initially designed to provide a better browsing experience, nowadays they are extensively used to collect large amounts of personal information from our online activity, including information about our online 97 2 browsing, searches, purchases, or even people with whom we are in contact. Web tracking can be used for beneficial purposes like maintaining an open session or keeping track of the contents of our online shopping basket. However, it has been demonstrated that this information is also used for many purposes, such as credit evaluation, personal assessment and price discrimination [3]. Moreover, the existence of the so-called data-brokers (companies whose goal is to do business exclusively with the collected personal data) is usually unknown by the common user. Data-brokers act as third-parties, acquiring, summarizing, and reselling personal data similarly to any other exchange currency. However, the data is often incomplete, obsolete, or even erroneous, as they can mix information from different people who shares some identifiers (e.g., name and surname) or incorrectly label people based on partial information. As they usually do not interact directly on websites (or their interaction is hidden by several layers of ever-changing domains), in many cases, obtaining clear and easy-to-understand information with respect to the type of personal information collected and the way it is used is extremely complicated or even impossible. Two of the most prevalent methods to collect the data are by means of cookies or user fingerprinting. A cookie is a small piece of code that the server sends to the client, and it remains stored in the browser’s cache. Each time the user opens the same website, the corresponding cookie is sent back to the server. Cookies are the most common web tracking method, as they permit precisely identifying the same user across sessions. Nowadays, most websites use cookies, and their existence is usually known even by non-expert users. On the other hand, fingerprinting techniques are used to precisely identify a person by generating an identifier based on a combination of characteristics present in the computer used to access the Internet (e.g., CPU, OS, Browser). Considering that every piece of software installed in the computer modifies its characteristics in a measurable way, it is very unusual to have two different people with the same exact combination of characteristics, making fingerprinting methods among the most powerful tools to identify users. In fact, some fingerprinting methods are so powerful that they can be used alone, although usually the identification precision increases using a combination of different fingerprinting techniques. Due to the difficulty of implementing such algorithms, it is very uncommon for a website to use a completely custom web tracking system. Usually, websites include generic web tracking services that load their libraries within their code. This is the so-called ”web embedding”, calling third-party resources and code inside the main website. Currently, the most popular solution to fight web tracking are the so-called Adblockers (e.g., [5]–[7]), small browser plugins intercepting in real time every URL being loaded and comparing them to manually curated block lists containing all the known privacy-threatening domains. The research community has been actively looking for ways to improve the scene. Recent advances have tried to block non-requested data collection algorithms by means of machine learning methods that detect specific kinds of tracking algorithms. For instance, in [8] Ikram et al. applied a one-class learning algorithm to the website code to find features that can identify some web tracking methods. Iqbal et al. in [9] apply random forests on a subset of features extracted from both, network requests and website code, to detect a subset of fingerprinting methods. In [10], they present a new system called FP-Inpector, that applies static analysis to the AST representing the JavaScript code, where they look for a subset of API calls commonly used for tracking. Unfortunately, static analysis is usually vulnerable to obfuscation and similar techniques. To solve the problem, they introduce complementary dynamic analysis systems in order to recover the original features, greatly improving the system’s accuracy to find web tracking using those API calls. However, machine learning solutions suffer from overspecialization, detecting only the tracking systems used during the training phase. In contrast, TrackSign [2], the detection method used by ePrivo, computes statistically with a high degree of accuracy (more than 92%) the probability of the website code to include web tracking algorithms, regardless of the web tracking system being used. B. Online Privacy Regulations Given the pervasiveness of web tracking algorithms on the Internet (>95%) [2], many countries are starting to develop and enforce policies and regulations to protect their citizens’ privacy. During the last years, some research works (e.g., [11]–[13]) have focused on the impact of those regulations in the economic and website environment. Others looked at the evolution and characteristics of the new consent systems [14] or presented some privacy-preserving techniques [15] available for website companies to comply with them. However, not many works include information about which data and web tracking collection methods are legally permitted, being mostly unknown by the non-expert audience. As the information obtained by means of ePrivo, the tool presented in this paper, may be useful to detect online services not complying with these regulations, we include a brief introduction to the most relevant legal aspects regarding web tracking methods to allow the reader to detect non-permitted mechanisms. We include information about the three most important privacy regulations by both, volume of users and economic impact: the USA, Europe, and China. We refer the interested reader to the regulations documentation [16]–[19] for a more detailed inspection of other legal aspects not directly related to web tracking methods. Table I summarizes their main differences. 1) USA (CCPA): Currently, there is not yet a regulation that provides federal protection of personal information in the USA. Recently, a new law called the American Data and Privacy Protection Act [20] (ADPPA) aimed at this objective has been presented, but it still needs to pass the House and Senate and get White House support to prosper. However, while there is not yet a federal law, there are several state laws in place. Among the most comprehensive is the California Consumer Privacy Act [16] (CCPA), which took effect on January 1st, 2020, in the state of California. In 2023, a modification of the CCPA called California Privacy Rights Act [21] (CPRA) is expected to come into force. The CCPA specifies the right of California’s citizens to know about the personal information a business collects about 98 3 TABLE I PRIVACY POLICIES COMPARISON CCPA eDP + GDPR PIPL Year 2020 2002 / 2018 2021 Under protection People born in California People born or living in EU People born or living in China Target For-profit companies (with conditions) For-profit and non-profit national or private For-profit and non-profit national or private Area of effect State of California World World Affects cookies Yes Yes Yes Affects fingerprinting Yes Yes Yes Requires active consent (reject by-default) No Yes Yes Forces service without consent No Yes Yes Opt-out available Partially (only data selling processes) Yes Yes Cookie maximum living period Undefined Per country (usually 12 to 24 months) Undefined Policies on automated algorithms (e.g., price discrimination, personalized ads) No Yes Yes Limits data retention No Yes Yes them and how it is used and shared. Personal information is defined as ”information that identifies, relates to, describes, is capable of being associated with, or could reasonably be linked, directly or indirectly, with a particular consumer or household”. Thus, cookies and other web tracking methods are considered personal information. There are exemptions for health and financial information, which have their own specific regulations. Regarding the methods enforced to comply with the regulations, cookie consent is not a mandatory requirement for CCPA compliance. The only requirement is to provide a clear statement on the website and an opt-out for processes that sell personal information, with one year being the shortest opt-out period. Moreover, the CCPA only applies to for-profit entities doing business in California that satisfy some prerequisites about the revenue and quantity of personal information collected. 2) EU (ePD and GDPR): The ePrivacy Directive [17] (ePD) and the General Data Protection Regulation [18] are the European answer to protecting its citizens’ privacy. The ePD is the primary legal source on cookies’ regulation through Article 5(3). It was developed in 2002 and amended in 2009 and stipulates limits to online identification algorithms regardless of whether the information stored or accessed on the user’s terminal equipment is personal data or not. For consent and information requirements, the GDPR, a regulation that came into force on May 25th of 2018, applies. The ePrivacy Regulation [22] (ePR), a new regulation that supersedes the eDP, is currently being prepared to be incorporated in the near future. ePD stipulates that websites can collect personal information as long as the users are provided with clear and comprehensive information about the purposes of the processing and are offered the right to refuse such processing (art. 5.3). The GDPR complements the ePD and delimits the scenarios where these data can be legally collected (art. 6). Moreover, it establishes that the consent must be ”freely given, specific, informed, and unambiguous”, and that requests for consent must be ”clearly distinguishable from other matters” and presented in ”clear and plain language” (art. 7). Generally, users shall have the right not to be subject to a decision based solely on automated processing when it significantly affects them, including profiling generated from collected data (art. 22). GDPR applies to all the data collectors or processors established in the EU, and to those established outside the EU but offering services or monitoring subjects inside the EU (art. 3). Regarding the data, the user has the right to request copies, rectifications, or deletions, executing the so-called right to be forgotten. On those demands, the company has the obligation to review and act within one month of the request. 3) China (PIPL): The Personal Information Protection Law is a new privacy-centered law prepared by China, effective since November 2021. The information presented here is extracted from the English translation done by Stanford University, available at [19]. Although not definitive, the translation is based on the second review draft of the regulations and is a good approximation of the final text. PIPL defines personal information as any kind of information, electronically or otherwise recorded, related to an identified or identifiable natural persona within the borders of the country, even if the collection process is executed abroad. Thus, cookies and other web tracking methods are included in the regulation. For the common scenario, websites must obtain freely, voluntarily, and explicitly the consent of the user on a fully informed basis. PIPL also establishes other scenarios where personal information can be collected, including some controversial ones such as implementing news reporting, public opinion supervision, and other such activities for the public interest within a reasonable scope. Similar to the GDPR, special treatment is given to automated decision-making algorithms, such as personalized advertising and similar systems, that must use the data in a transparent and fair way. Moreover, the user has the right not to be the target of advertisements based on an individual’s characteristics. Finally, the PIPL explicitly mentions the possibility of collecting data from recognition equipment in public venues (e.g., security cameras), although it specifies that it can only be done for public security reasons. C. Related work Detecting online web tracking is a key aspect of discovering websites not following the principles reviewed above. It has 99 4 been a hot topic for many years, and consequently, there are many systems focused on detecting web tracking algorithms. In this section, we compare ePrivo with some other existing systems that inspect and analyze different privacy aspects of websites. We do not cover here Adblockers or other applications used to block web tracking in real-time, as they usually do not focus on discovering web tracking elements, but on blocking already-known tracking URLs. A detailed review of the most common Adblockers can be found in [23]. PrivacyScore [24] is an online service similar to ePrivo that permits you to inspect the privacy of a selected website. It shows information about the cookies and encryption characteristics of the website, as well as some server security settings. It also explores the third parties embedded on the website, looking for already-known tracking domains. However, the system does not inspect the website at the resource or code level, only looking for information directly available from the URLs and HTTP requests loaded by the website. PrivacyMonitor [25] is a small browser plugin that allows to see the privacy-friendliness of the website being accessed. However, its information is based exclusively on the privacy policies of the website. Moreover, this information is obtained manually. Privacy policy changes are sent back to the experts in charge of classifying the website based on their policy statements. PolicyXRay [26] is a tool to automatically read policies of websites and explore the relation between the thirdparty tracking present inside the web and the third-parties present within the policy terms. The system focuses only on the subset of websites that use one of the already known policy content providers included in the system. None of these systems explores website privacy from the resource or website code perspective, but only on the URL or policy level. In contrast, ePrivo automatically inspects the resources included on the website, looking for website code that performs web tracking. Thus, ePrivo can be seen as complementary to current solutions. III. EPRIVO This section introduces the architecture of ePrivo and deepens into the two most important modules: web tracking detection and automatic classification. A. Architecture ePrivo is an open source solution deployed inside three independent servers, currently running over an Ubuntu Server 20.04 LTS. Figure 1 shows the architecture of the system. The main server stays in charge of continuously collecting and updating website information for the list of websites present inside the database. The secondary server remains unoccupied until a user queries a website not present inside the database, in which case it automatically scans the new website and fills the corresponding data. The time needed to explore the website’s content depends on the number and size of its included resources. The larger the number of JavaScript files loaded, the longer it will take for the web tracking detection module to inspect them. For the average website with fewer than 25 JavaScript resources of between 100Kb and 200Kb, the system Interface (LAMP) Main Server Secondary Server Web Server DB Collection Module Detection Module Classification Module Collection Module Detection Module Classification Module ORM ORM TrackSign TrackSign Cookies Fingerprints History Cookies Fingerprints History Fig. 1. ePrivo architecture: The current architecture is based on 3 servers. The main server is in charge of constantly collecting and updating website information, the secondary server dedicated to human generated website searches and the last one to the website interface. All the website and tracking information is stored inside a common database. takes about 2 to 3 minutes to explore all of them. Each one of the servers contains a combination of three different modules: 1) Collection module:This module is in charge of data collection. To this end, it uses ORM [27], an open source web mapping framework that explores the web as a graph containing information about each domain homepage, the URLs loaded by that domain, the online resources contained inside those URLs (e.g., JS or HTML files), and the website code inside those resources. Fig. 2 depicts the typical structure of the graph used by ePrivo. All the URL information (e.g., HTTP request, headers) and the resource information (e.g., file type, size, hash) are stored inside a MySQL database. The SHA1 hash value of the resource is used as its identifier, allowing ePrivo to deduplicate the same resource at different URLs. Moreover, the code of the JavaScript and HTML files is also stored and linked with its corresponding resource. Note that this design differs slightly from the original design proposed in [2] adding a new fourth layer to detect other forms of tracking (e.g., cookies). For security reasons, in order to avoid collapsing the database by means of attacks that automatically explore millions of dynamic or mutable subdomains, ePrivo currently only works on level 2 domains. We plan to include other countermeasures to allow for thirdlevel domain searches. Moreover, the system uses a timeout of 30 seconds to discard slow or non-working websites. 2) Detection module:The web tracking detection is done by means of TrackSign [2], a state-of-the-art unknown web tracking detection system. The algorithm finds code shared by multiple websites with a high probability of being tracking (details in Section III-B). The information about the code pieces labeled as tracking and each resource containing them is also saved inside the database. 3) Classification module:This module is executed over the tracking information found by the detection system in order to automatically classify some web tracking systems included in the suspicious resources. It explores the JavaScript pieces of code found by TrackSign looking for already known tracking patterns. If found, ePrivo automatically categorizes the type 100 5 Fig. 2. ePrivo internet map visualization. Divided in 4 different layers. Domain layer contains information about the homepage of the website. The URL layer saves the details of the URLs loaded by the domain. Resource layer deduplicates files loaded in each URL. Code layer contains information about the code pieces that compose a resource. of tracking detected according to the pattern characteristics explained in Section III-C. Note that many web tracking resources contain tracking systems not included within our initial classification modules. Thus, those resources will appear as other tracking in the website interface. Our future work includes exploring and developing new modules to automatically classify a bigger spectrum of web tracking systems. 4) Interface:The interface runs over a LAMP server (Linux, Apache, MySQL, and PHP), consulting directly the database for website information. Fig. 3 presents the ePrivo website front end. On the left, we can observe a graph of the URL structure of the selected website, including information about their parent-child relationship (edges) and tracking (colors). Isolated nodes are resources loaded directly by means of XMLHTTPRequest calls or server redirects. We can also colorize the nodes based on their file type or if they pertain to the first-party domain or a third-party website. The right column presents information about all the tracking methods detected by ePrivo and their number of appearances within the website resources, as well as some other useful information about the web. Finally, ePrivo also computes an intrusion level for each website, pondering the number of different web tracking methods used to collect personal information and the total number of each of them. The greater the number, the more intrusive the website is. B. Web Tracking Detection ePrivo is based on TrackSign [2], a state-of-the-art web tracking detection system that is able to detect completely unknown tracking. TrackSign works by computing heuristics for the website code in a deterministic way, looking for breaking points that are common within different files. Many tracking systems (e.g., Google Analytics) are shared by TABLE II WEB TRACKING DETECTION COMPARISON: TRACKSIGN VS.UBLOCK ORIGIN Total Tracking Tracking (uBlock Origin) (TrackSign) Domains 1,383,057 984,830 (71.2%) 1,295,433 (93.66%) URLs 76,492,732 6,246,049 (8.16%) 10,775,629 (14.08%) Resources 5,968,622 2,369,814 (39.7%) 3,189,992 (53.44%) numerous web services. Thus, by looking at those code pieces shared by different domains, we can narrow down the web tracking search to the resources with the highest probability of including them. Then, accounting for the number of resources that contain the same code pieces and are already known to include tracking, we can compute the probability of containing tracking for the selected code piece. In other words, if a piece of code is mostly present in files that perform tracking, it is most probably used for web tracking purposes. This probabilistic approach lets TrackSign propagate the tracking information, automatically labeling resources that contain the newly detected web tracking code. Thus, we can detect new resources using already-known web tracking techniques as well as new tracking systems on unknown URLs sharing the tracking code. The initial labeling process is done by means of URL tracking lists containing the most current information available (e.g., [28], [29]). We refer the interested reader to [2] for a more detailed explanation of the algorithm used by TrackSign. According to our findings, TrackSign is able to detect thousands of unknown web tracking resources while preserving a detection accuracy of about 92%. Note that TrackSign works equally to find stateful technologies such as cookies and stateless technologies such as fingerprinting techniques. However, the detection system is not able to directly differentiate between them, as it works by looking only at the probability of the code being used for tracking or not. Consequently, we need a post-processing phase to classify the found web tracking and discover which method is being used. Thus, ePrivo uses TrackSign to find the tracking code pieces and complements it with several modules to discover the underlying web tracking methods. Table II compares the tracking found by TrackSign and uBlock Origin, one of the most popular methods based on the traditional pattern lists, over almost 1.4 million websites. The results show that TrackSign is able to propagate the tracking information and find millions of unknown tracking URLs and resources. C. Web Tracking Automatic Classification In order to discover which tracking methods are being used to obtain user personal information, ePrivo automatically classifies some of the most common web tracking algorithms. It analyzes the JavaScript files detected by TrackSign as well as the HTTP network requests in order to classify three different web tracking methods: (i)cookie-based algorithms, (ii)some common fingerprinting-based methods, and (iii)the browsing history tracking. As already mentioned, we expect 101 6 Fig. 3. ePrivo main interface screenshot: The title states the overall intrusion level. The left graph depicts all the URLs (nodes) loaded by the website. The edges represent the parent URL from which it was called. It can be colored by resource type, resource origin (1st or 3rd party) or tracking resources. The right column shows graphically the detailed information about the web tracking performed by the website, as well as some of its characteristics. to progressively add support for more methods. This section presents each of the automatically classified algorithms as well as the rules and patterns followed to do it. 1) Cookie-based algorithms:Historically, the only way to set up cookies before the creation of client-based languages such as JavaScript was by adding the flag set-cookie inside the network headers of the HTTP request. Nowadays, another common way to create and consult cookies is by means of JavaScript API calls. Thus, to detect cookie usage, we inspect the network headers of all the online resources loaded by a website and the JavaScript file’s code, looking for those API calls. Whenever we find one, we also check the expiration date or maximum age of the cookie and the domain that created it. Based on the information obtained, we divided the cookie tracking by type into 6 groups: •Session cookies: Non-persistent cookies that are automatically deleted when the browser is closed. This category is the more privacy-friendly web tracking method, as the amount of information that can be collected is limited to the current session. •Long-living cookies: Long-living cookies are characterized by having a lifespan longer than three months. Maintaining cookies for a period longer than 3 months is a bad practice, as the website is constantly receiving information about the user, enabling them to create accurate profiles of their users’ habits. •Very long-living cookies: We consider a cookie to be excessively long-living when it is persistent for a period over 1 year. Moreover, as shown in Table I, it goes against some country regulations, like, for instance, France [30], where no analytic cookie can have a living period of 13 or more months. Thus, this kind of cookie can incur fines for the companies utilizing them. •JavaScript cookies: Cookies mainly setup or obtained using JavaScript code. JavaScript permits to not only recover the information already present in the cookie but to regenerate cookies based on other information stored in the computer (the so-called evercookies). •Third-party cookies: All cookies created by a domain different from the one accessed by the user are considered third-party cookies. •Tracking cookie: A tracking cookie corresponds to a long-living or very long-living cookie pertaining to a third-party website. This kind of cookie allows third-party services to track each user on every website where the third party is present, allowing them to acquire a huge amount of personal information. 2) Fingerprinting-based algorithms:ePrivo automatically classifies four intrusive and precise fingerprinting methods: •Font fingerprinting: Font fingerprinting is based, as its name implies, on fonts. This tracking method obtains information about the fonts installed on the target device in order to generate a unique identifier. By default, several fonts come pre-installed inside the operating system. However, it is not uncommon that other software automatically adds its required fonts at the time of installation. Thus, since it is unusual that two different people have exactly the same software and the same versions installed on their devices, the available fonts form a pattern that can be used to differentiate their hosts. To detect font fingerprinting, ePrivo looks for website code that tries to check for available fonts. The most common font fingerprinting method is by means of trial and error, as the browser uses a default font if the requested one is not present in the system. The font fingerprinting code requests a list of different fonts and checks their availability by means of two rendering API calls (.offsetHeight and .offsetWidth). Based on the analysis performed from the results obtained and a manual validation, we determined that if a resource makes thirty or more font checks while executing a call to at least one of the two commented API endpoints, the domain is performing font fingerprinting. •Canvas fingerprinting: Canvas is an HTML element introduced in HTML5 that allows to load images, create drawings, and create charts dynamically in a web browser. Canvas fingerprinting takes advantage of the 102 7 element, abusing its power and generating an identifier that allows to identify the device used. In order to detect it, we look for the API call .toDataURL(). This API call returns a URI containing information about the canvas element (e.g., size of the text, color, distance between characters) and how it was rendered. This information is different for each device, as it greatly varies depending on the hardware and installed software. Even a software update can render changes inside the data. Thanks to this information and how sensitive it is to small changes, it is possible to track client devices. •Mouse fingerprinting: Mouse fingerprinting is a tracking method that abuses the possibilities of the browser to obtain information about the pointer. This information can be used to perform static performance tests or inspect usability problems. However, it can also be used to track the user, as every person has a slightly different way of using the pointer (usually a mouse, although trackpads also fit into this tracking technique). In order to detect it, ePrivo searches functions listening for pointer actions like click,scroll,hold,drag,release and so on. Those functions are called listeners, and they are the common way to collect mouse information. By looking for those listeners, we can detect resources collecting mouse information. To differentiate between legitimate and non-legitimate mouse data collection, ePrivo inspects if the collected mouse information is sent back to a thirdparty domain, a common sign of fingerprinting systems. •WebGL fingerprinting: WebGL fingerprinting is a tracking technique that obtains information about the GPU and CPU present in the device by means of the WebGL API engine and two globally defined WebGL variables. The variables contain information about the exact version of the GPU and the browser, while API functions results differ depending on the GPU present in the device. ePrivo looks for the variable appearance and automatically labels the code accessing it as WebGL fingerprinting. Regarding WebGL API functions, they can be used to legitimately render figures on websites. However, it is uncommon to use a high number of different API calls to render images, as usually with only a few of them you can obtain the desired results. Thus, our hypothesis was that using many of them on the same website was indicative of WebGL fingerprinting. From the top 10k most popular websites, we manually inspected the subset of JavaScript files containing a high number of API calls (27 files) and found that all websites calling more than 60 API calls performed WebGL tracking. Consequently, ePrivo looks to see if at least 60 of the 88 available functions implemented are called by any website and automatically classifies them as WebGL fingerprinting. 3) Browsing History tracking:The browsing history tracking mechanism is based on collecting information about the user on as many websites as possible. To this end, the tracking company usually offers some kind of functionality that is attractive to the user and forces the website interested in integrating this new characteristic to load a resource from the tracking company. From that point on, the third-party tracker has access to all the people that visit the website. When a third-party tracker is present on many important websites, it can collect an extremely accurate browsing history of each user. The most representative examples are social networks. It is mostly unknown by the common user that social networks like Facebook,Twitter or Instagram obtain the URL of each website accessed by the user where there is one of their social interaction buttons. Based on that information, they create profiles, grouping users (even for people that do not have an account on their services) based on their history and website content. Inspecting our visited content in detail can bring to light information such as race, age, hobbies, purchasing patterns, dislikes, or even political ideologies. This type of web tracking can be considered the most intrusive of all of them. To detect third-party trackers, ePrivo aggregates all the tracking resources linked by URLs pertaining to the same domain and counts the number of websites opening any of those resources. IV. APPLICATIONS OF EPRIVO This section introduces some illustrative use cases where ePrivo can help to discover privacy vulnerabilities. Each of the presented use cases focuses on a different actor potentially interested in privacy aspects. A. Internet users As shown in [31], about 93% of Internet users think that it is important to be in control of who can get information about them. Thanks to the new privacy regulations (e.g., Sec. II-B), currently websites usually ask for explicit user consent to collect their data by means of cookies or other web tracking systems. However, it is difficult to know if websites respect the selected privacy settings, as the communications are transparent to the user. For instance, in 2014 the Electronic Frontier Foundation applied the findings obtained by Acar et al. in [32] to discover that the White House website included a canvas fingerprinting web tracking system executed prior to obtaining the user’s consent for data collection [33]. Similarly, by means of ePrivo anyone can explore a website and easily detect the presence of cookies that collect information by default without giving explicit consent. B. Web developers Nowadays, many websites include external online services or load resources hosted in third-party servers to customize the browsing experience. However, these external resources may contain hidden web tracking systems unknown to the web developer. Thus, loading any of them may render the website non-compliant with their own privacy regulations without their knowledge. For instance, in the White House example presented above, the privacy policies stated literally that ”we do not knowingly use third-party tools that place a multi-session cookie prior to the user interacting with the tool”. As explained at [33] the web tracking algorithm was executed by a third-party script, and there was no evidence that the White House knew that it was being run. A web developer 103 Universitat Politècnica de Catalunya, Barcelona, Spain Castell-Uroz, et al. Information url (https://alexa.amazon.es) Name, email, address /api/authentication Additional emails /api/eon/householdaccounts Available devices /api/devices-v2/device Family members /api/household Buying activities history /api/activities-with-range Created lists /api/namedLists Lists elements /api/namedLists/[listId]/items Activity history /api/activities-with-range Reminder creation /api/notifications/createReminder Table 1: Information available inside resources 2.2 Voice interaction security Looking that some IVAs reacted to TV commercials in the past [ 3 ] Amazon engineers implemented an on-the-cloud system to compare device wake voice commands with multiple other devices in real time [ 7 ]. This way they can detect broadcasting events like commercials. Therefore, our research is focused on asynchronous events, like online videos, that could send voice commands to the device. Moreover, instead of looking directly for wake words, we search for speech recognition errors that could be used as a wake word to send the command. A similar approach has been taken in the past [ 4 ] to open a fake skill (Alexa’s own application) whose name is similar in pronuntiation to a legitimate one. To study speech recognition errors, an Spanish language audio database [ 9 ] with more than 1.700 different files was reproduced near the device while monitoring the reaction. We found some words that were commonly misunderstood (e.g.“el examen”, “economía”) and made the device to wake up, listen and check with Amazon servers, but the given command was discarded. That means that Amazon also has a protection system to discard this type of false positives. Figure 2: Burp Suite usage diagram Surprisingly, during our experiments we observed that the device listens to himself while reproducing a message. Thus, we setup a reminder with a voice command inside it and let the device reproduce it. We discovered that if the volume setting is higher enough the device will execute the command just after reading it and will not be discarded. This can be exploited in a number of different ways. For example, if an attacker gets the user session cookie by a session hijacking [ 10 ] attack (something plausible as we found that dashboard session cookies renewal period is longer than a decade) an attacking reminder can be set using the url mentioned in Section 2.1. The reminder will be automatically executed. This permits the attacker to do online purchases, unless the purchase verification code is turned on, or to operate other available intelligent devices like door locks. 3 CONCLUSION In this work we presented a first look at Alexa’s interaction security. We achieved some interesting findings as the remote execution of commands using a reminder, or finding the historic data hidden in the dashboard, that can potentially be used by an attacker against the user. We plan to continue exploring the available possibilities to detect new threats that could lead to new security breaches and privacy leakages. 4 ACKNOWLEDGMENTS This work was supported by the Spanish MINECO under contract TEC2017-90034-C2-1-R (ALLIANCE). REFERENCES [1] Armis. 2017. The Attack Vector “BlueBorne” Exposes Almost Every Connected Device. Retrieved September 17, 2019 from https://www.armis.com/blueborne/ [2] Nicholas Carlini, Pratyush Mishra, Tavish Vaidya, Yuankai Zhang, Micah Sherr, Clay Shields, David Wagner, and Wenchao Zhou. 2016. Hidden Voice Commands. In 25th USENIX Security Symposium (USENIX Security 16). USENIX Association, Austin, TX, 513–530. [3] Nina Golgowski. 2017. This Burger King Ad Is Trying To Control Your Google Home Device. Retrieved September 05, 2019 from https://www.huffpost.com/entry/ burger-king-launches-ad-on-google-home_n_58ee23dfe4b0c89f912307f9 [4] Deepak Kumar, Riccardo Paccagnella, Paul Murley, Eric Hennenfent, Joshua Mason, Adam Bates, and Michael Bailey. 2018. Skill Squatting Attacks on Amazon Alexa. In Proceedings of the 27th USENIX Security Symposium (USENIX Security ’18). USENIX Association, Berkley, CA, 33–47. [5] MarkMonitor. 2019. MarkMonitor - Clarivate Analytics | Brand Protection, Domain Management, Anti Piracy, Anti Fraud. Retrieved September 03, 2019 from https: //www.markmonitor.com [6] Xavier Marrugat-Plaza. 2019. Alexa Cookied. Retrieved September 17, 2019 from https://github.com/xampla/AlexaCookied/blob/master/alexaCookied.py [7] Mike Rodehorst. 2019. Why Alexa Won’t Wake Up When She Hears Her Name in Amazon’s Super Bowl Ad. Retrieved September 05, 2019 from https://developer.amazon.com/es/blogs/alexa/post/37857f29-dd82-4cf4-9ebd- 6ebe632f74d3/why-alexa-won-t-wake-up-when-she-hears-her-name-in- amazon-s-super-bowl-ad [8] Portswigger Web Security. 2019. Burp Suite. Retrieved July 16, 2019 from https://portswigger.net/burp [9] Eric Streit. 2016. The Audio collections - Collection of spanish words (spawims-octavio). Retrieved May 09, 2019 from https://fsi-languages.yojik.eu/ audiocollections/audiocollections.html [10] Wikipedia. 2019. Session hijacking. Retrieved July 21, 2019 from https://en. wikipedia.org/wiki/Session_hijacking [11] Guoming Zhang, Chen Yan, Xiaoyu Ji, Tianchen Zhang, Taimin Zhang, and Wenyuan Xu. 2017. DolphinAttack: Inaudible Voice Commands. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS ’17). ACM, New York, NY, USA, 103–117. https://doi.org/10.1145/3133956.3134052 110 Computer Networks 205 (2022) 108782 Available online 8 January 2022 1389-1286/© 2022 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Data Article Amazon Alexa traffic traces Rub´ en Barcel´ o-Armada, Ismael Castell-Uroz * , Pere Barlet-Ros Universitat Polit` ecnica de Catalunya ARTICLE INFO Keywords: Amazon Alexa IoT Network traffic traces PCAP ABSTRACT The number of devices that make up the Internet of Things (IoT) has been increasing every year, including smart speakers such as Amazon Echo devices. These devices have become very popular around the world where users with a smart speaker are estimated to be about 83 million in 2020. However, there has also been great concern about how they can affect the privacy and security of their users [1]. Responding to voice commands requires devices to continuously listen for the corresponding wake word, with the privacy implications that this entails. Additionally, the interactions that users may have with the virtual assistant can reveal private information about the user. In this document we publicly share two datasets that can help conduct privacy and security studies from the Amazon Echo Dot smart speaker. The included data contains 300.000 raw PCAP traces containing all the communications between the device and Amazon servers from 100 different voice commands on two different languages. The data can be used to train machine learning algorithms in order to find patterns that can characterize both, the voice commands and people using the device as well as Alexa as the device generating the traffic. Value of the data •Why is this data useful? Big technology companies like Amazon, Google, Apple or Microsoft invert massive amounts of money and resources to develop the so-called smart speakers, intelligent devices that execute voice commands to perform many of the tasks and routines of their users. However, this kind of systems present many privacy and security concerns. For instance, in order to perform those actions, smart speakers must constantly listen to detect the wakeup words needed to execute voice commands. Letting an external device to constantly listen to the conversations of your home poses a threat to the privacy of its inhabitants. Moreover, intelligent devices rely on machine learning algorithms used to interpret the natural language and infer its meaning. To achieve the massive amount of data needed to train their algorithms in order to correctly decipher voice commands from many countries, languages and different accents, companies purposely collect and use information of their own users, often in a completely transparent way. On top of that, some users connect their smart speakers to other intelligent devices (e.g. lights or door locks), fact that can be seen as a security threat in case an attacker could find a flaw on online systems used by smart speakers (e.g. [2]). •Who can benefit from this data? In this work we present a collection of network traffic traces with all the information between one smart speaker (Amazon Echo Dot) and their servers. The dataset can help research groups that want to carry out studies based on the behavior of traffic generated by a smart speaker such as privacy studies, task scheduling or payload prediction. For instance, it can be used as input for Deep Learning algorithms in order to find non-obvious patterns that could represent some kind of threat to their users. An attacker could be interested in knowing the amount, genre, and habits of the people that lives inside a house to select places where there is only one person living inside or to infer time frames with higher possibilities of being empty. Thus, previously studying these characteristics can help to prevent those attacks. •How can this data be used for further insights and development of experiments? As the dataset contains raw PCAP files containing all the information transmitted over the network, researchers can use these datasets to extract the features that they consider appropriate for their algorithms or studies. For instance, some network experiments may only need the data inside the TCP headers, while other studies like network * Corresponding author. E-mail address: [email protected] (I. Castell-Uroz). Contents lists available at ScienceDirect Computer Networks journal homepage: www.elsevier.com/locate/comnet https://doi.org/10.1016/j.comnet.2022.108782 Received 7 September 2021; Received in revised form 10 December 2021; Accepted 6 January 2022 111 monitoring could profit from the data included in the payload to feed DPI algorithms to discover Alexa traffic characteristics hidden that can lead to an automatic prediction/detection/classification tool. •What is the additional value of this data? We also include an explanation of the data acquisition methods to help other teams to complement it with other data if needed. For instance, other languages or a determined list of commands can improve the dataset for specific cases. Moreover, it also allows to replicate our results and compare them to find evolution changes between different time frames. Note, that all the collection process is very time-consuming, though. It took almost three months to develop, refine and collect all the measures present in the dataset. Hopefully this dataset can speed up investigations that require this kind of data. Data The dataset includes the network traffic communications between the Amazon Echo Dot device and Alexa servers. It does not contain only the communications with the Alexa Voice Servers in charge of the voice command responses, but also the traffic from all the other Amazon services running in the background. Thus, traffic traces include information about the entire Alexa ecosystem. We used Wireshark to inspect a subset of the collected traces and found a total of 5 different services running inside. The next table presents the 5 servers as well as their roles. Server Service ntp-g7g.amazon.com Clock synchronization services with NTP protocol avs-alexa-14-eu.amazon.com Alexa Voice Services (voice command interpretation) s3–1-w.amazonaws.com Check Internet link status device-metrics-us-2.amazon. com Metrics directly collected by Amazon from the device api.amazonalexa.com Skill services To generate the dataset, we executed and collected traces from 100 different voice commands. All the experiments have been repeated in two different languages, English and Spanish. For each of the languages each command has been executed with 3 different voices (synthetic voices available on the Amazon Polly service). Moreover, we collected 500 different samples of each voice command and synthetic voice combination to be able to discover points of interest or possible outliers. In total, the dataset contains 300.000 different network traces. The dataset is divided in two different files, one for each of the languages used to collect the measures. Each file follows the structure presented at Fig. 1, with two folder levels and traces inside the second level. The first level denotes the synthetic voice used to execute the command. The second level indicates the command performed. All the samples inside the command folder contain raw PCAP files including the entire network communication between the Amazon Echo Dot device and Amazon servers. Each PCAP file consists of a list of all the network packets going through the network interface while the capture is active. For every packet both, TCP headers as well as the packet payload are captured. It also contains information about the timing of each communication. Note that most communications include network security and, consequently, many packets are encoded using TLS, limiting the amount of information from the payload accessible by the user. In summary each file contains: 1. DatasetEnglish.tar.gz •500 measures for each one of 100 English voice commands, in 3 different voices (1 male and 2 female). •150,000 raw PCAP network traces. •12.6GB of network traffic data generated between the Amazon smart speaker and Alexa Voice Service servers. 2. DatasetSpanish.tar.gz •500 measures for each one of 100 Spanish voice commands, in 3 different voices (1 male and 2 female). •150,000 raw PCAP network traces. •15.6GB of network traffic data generated between the Amazon smart speaker and Alexa Voice Service servers. Experimental design, materials, and methods When a user communicates with the virtual assistant Alexa through a smart speaker or a smartphone, they interact with different components of the Amazon Alexa system. The first component is the smart speaker itself, that will react to command voices executed by the user. The smart speaker has limited computing power and relies on Alexa Voice Service servers (AVS) to decipher the natural language and interpret the given command. Once AVS knows the action to be performed it calls the required skill (Alexa applications) through the so-called AWS Lambda servers, specialized for the task. When the skill or task has finished, Lambda servers notify AVS server and the later answers back to the smart speaker, sending the command reply in text format. Lastly, the smart speaker uses a text-to-speech system to read the response as audio. Fig. 2 shows a summary of the process. All these components compose the Amazon Alexa ecosystem and ensure a proper response to voice Fig. 1. Dataset file structure. R. Barcel´ o-Armada et al. 112 commands issued by the user. Our main objective is to collect the communications between the smart speaker and the AVS server. In order to obtain all the network traces, we perform a kind of a “man-in-the-middle” attack, forcing all the communications to pass through a hot spot owned by us. In our laboratory experiment the hot spot consist of a Raspberry Pi configured as a WIFI hot spot. The Amazon Echo Dot device is connected to the WIFI generated by the Raspberry Pi, and the communications arrive to the AVS servers through the Raspberry Pi LAN port. Fig. 3 shows the structure of our methodology. The data collection process was developed on Python [3], and consists of six differentiated steps: 1 The Raspberry Pi starts the trace capture process by means of the TCPDump tool and generates a voice command. To this end it takes one voice command at a time from a file containing a list of the selected commands. The command will be read out loud using the cloud text-to-speech service Amazon Polly (offered free of charge by Amazon Web Services) through the speakers attached to the Raspberry Pi. 2 Alexa Echo Dot wakes up, captures the voice command and sends it to AVS services. 3 TCPDump running inside the Raspberry Pi intercepts the request and saves it inside the network trace. 4 Amazon AVS sends back the response that once more gets intercepted by our TCPDump probe. 5 The response arrives to Echo device where it is converted to an audio message by their own text-to-speech system. 6 Before launching the next voice command, the Raspberry Pi stops the TCPDump capture and saves it as a sample file inside the corresponding folder. To avoid noise and external influences within the measures the only device connected to the WIFI hotspot are the smart speakers. Moreover, Raspberry Pi OS automatic updates and unneeded services were disabled in order to eliminate non-expected network traffic. On top of that, we also have to insulate as much as possible the device from sounds and external voices that can make it to wake up at unexpected intervals. To this end we setup the device in a completely closed environment with the only presence of the device, the Raspberry Pi and one of the members of the research group to check that everything is correct. Regarding the voice commands, to inspect different scenarios we tried to select not only the commands most used by real users, but also some more complex commands not so popular. To this end, we took profit of Alexa’s own recommendation system. For registered users Alexa periodically sends by email some of the most popular as well as some new and useful commands. We manually selected a subset of them to populate our dataset. We purposely discarded commands setting up alarms, timers and other commands saving data inside memory as the execution of hundreds of them made the device to hang. Unfortunately, not all the voice commands were correctly detected at the first run using synthetic voices. Thus, we manually checked and tweaked every text-to-speech command to avoid generic error responses. Nevertheless, Alexa Echo Dot device occasionally fails to detect some of the commands. Consequently, we took a total of 600 measures for each voice command, and automatically discarded traces without content or with very small amount of traffic, indicative of those errors. Then, we randomly selected 500 of the remaining ones to create our dataset. Experimental study based on the dataset The collected dataset was used for a thesis dissertation [4] presented on July 2021. The objective of the study was to find if it was possible to identify different smart speakers’ users looking only at the encoded network traffic. To this end we used a Deep Learning algorithm and based our study in a closed-world assumption. In other words, our resultant system is able to identify exclusively the people used to train Fig. 2. Amazon ecosystem. Fig. 3. Trace collection structure. R. Barcel´ o-Armada et al. 113 the system, and is not able to generalize to different scenarios. However, it is a first approximation to study the feasibility of those systems to find identifying patterns between encrypted data. To train the system we collected the IP addresses of the AVS servers present in the dataset and extracted all the traces corresponding to any of them. The resultant subset was passed through TCPTrace, a tool to extract interesting information from a TCP trace (e.g. total packets, ack packets, average segment size). We also computed other composed information such as the average size, average time between packets or the total sum of bytes transmitted. Then, we used 70% of the data for the training phase of an MLP algorithm, a 10% for the validation phase and the remaining 20% for the evaluation. Our results, present in Fig. 4, show more than 80% of accuracy predicting the user that executed the voice command. Although not definitive, it is a first step to demonstrate that this type of information may be extracted just capturing encrypted network data. Specifications table Subject Computer Science: Computer Networks and Communications Specific subject area Data transferred between Amazon smart speakers and Amazon Alexa Servers. Type of data Network traffic data How data were acquired Hardware: Amazon Echo Dot G3, Raspberry Pi Software: Tailor-made software written in Python to recollect network traffic data Data format Raw Parameters for data collection - 100 different commands have been used. - Selected commands include the most common ones as well as Alexa’s own suggestions. - Commands are reproduced by three different voices (text to speech voices from Amazon Polly). - Each command is executed 500 times for each voice. - Dataset is taken twice, in two different languages. Description of data collection The data has been collected by means of a custom Python too developed to automate the task. The tool allows you to execute voice commands automatically while the traffic flow is being captured. Data source location Institution: Universitat Polit` ecnica de Catalunya City: Barcelona Country: Spain Data accessibility https://cba.upc.edu/phocadownload/public_documen ts/ids_datasets/dataset_english.zip https://cba.upc.edu/phocadownload/public_doc uments/ids_datasets/dataset_spanish.zip Related research article Ruben Barcelo Armada, Pere Barlet Ros, “Disecci´ on y an´ alisis del tr´ afico de red de Amazon Alexa”, Universitat Polit` ecnica de Catalunya, 2021, https://upcommons.upc. edu/bitstream/handle/2117/348745/155639.pdf Ismael Castell-Uroz ([email protected]) is a Ph.D. student at the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, where he received the B.Sc. degree in Computer Science in 2008 and the M.Sc. degree in Computer Architecture, Networks and Systems in 2010. He has several years of experience in network and system administration and currently holds a Projects Scholarship at UPC. His expertise and research interest are in computer networks, especially in the field of network monitoring, anomaly detection, internet privacy and web tracking. Pere Barlet-Ros ([email protected]) is currently an Associate Professor with the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, and Scientific Director at the Barcelona Neural Networking Center (BNN-UPC). He received the M.Sc. and Ph.D. degrees in Computer Science from UPC, in 2003 and 2008, respectively. From 2013 to 2018, he was Co-founder and Chairman of the machine learning startup Talaia Networks. His research has focused on the development of novel machine learning technologies for network management and optimization, traffic classification and network security, which have been integrated in several open-source and commercial products, including Talaia, Auvik TrafficInsights, Intel CoMo and SMARTxAC. Ruben Barcelo Armada ([email protected]) is a graduate in Informatics Engineering from Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain. He is currently studying a Master’s Degree in Cybersecurity. His research interests include network security and understand the risks of the Internet of Things (IoT) devices, in order to preserve privacy, confidentiality and security of the data and users. Declaration of Competing Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. References [1] J. Lau, B. Zimmerman, F. Schaub, Alexa, are you listening? Privacy perceptions, concerns and privacy-seeking behaviors with smart speakers, in: Proceedings of the ACM on Human-Computer Interaction, 2018, pp. 1–31, https://doi.org/10.1145/ 3274371. [2] I. Castell-Uroz, X. Marrugat-Plaza, J. Sol´ e-Pareta, P. Barlet-Ros, CoNEXT ’19 Companion, in: Proceedings of the 15th International Conference on emerging Networking EXperiments and Technologies, December 2019, pp. 4–6, https://doiorg.recursos.biblioteca.upc.edu/10.1145/3360468.3366769. [3] Ruben Barcelo Armada, Ismael Castell-Uroz, Alexa Dataset Collection Scripts, Universitat Polit` ecnica de Catalunya (2021). https://github.com/RubenBar/Ale xaDataset. [4] Ruben Barcelo Armada, Pere Barlet Ros, Disecci´ on y an´ alisis del tr´ afico de red de Amazon Alexa, Universitat Polit` ecnica de Catalunya (2021). Ruben Barcelo Armada ([email protected]) is a graduate in Informatics Engineering from Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain. He is currently studying a Master’s Degree in Cybersecurity. His research interests include network security and understand the risks of the Internet of Things (IoT) devices, in order to preserve privacy, confidentiality and security of the data and users. Fig. 4. Confusion matrix. R. Barcel´ o-Armada et al. 114 Ismael Castell-Uroz ([email protected]) is a Ph.D. student at the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, where he received the B.Sc. degree in Computer Science in 2008 and the M.Sc. degree in Computer Architecture, Networks and Systems in 2010. He has several years of experience in network and system administration and currently holds a Projects Scholarship at UPC. His expertise and research interest are in computer networks, especially in the field of network monitoring, anomaly detection, internet privacy and web tracking. Pere Barlet-Ros ([email protected]) is currently an Associate Professor with the Computer Architecture Department of the Universitat Polit` ecnica de Catalunya (UPC), Barcelona, Spain, and Scientific Director at the Barcelona Neural Networking Center (BNN-UPC). He received the M.Sc. and Ph.D. degrees in Computer Science from UPC, in 2003 and 2008, respectively. From 2013 to 2018, he was Co-founder and Chairman of the machine learning startup Talaia Networks. His research has focused on the development of novel machine learning technologies for network management and optimization, traffic classification and network security, which have been integrated in several open-source and commercial products, including Talaia, Auvik TrafficInsights, Intel CoMo and SMARTxAC. R. Barcel´ o-Armada et al. 115 116 Bibliography [1] “How the nsa piggy-backs on third-party trackers,” 2013. [Online]. Available: https://cyberlaw.stanford.edu/publications/ how-nsa-piggy-backs-third-party-trackers [2] “Facebook friends could change your credit score,” 2013. [Online]. Available: http://money.cnn.com/2013/08/26/technology/social/ facebook-credit-score/index.html [3] T. Economist, “Insurance data: Very personal finance,” 2012. [Online]. Available: http://www.economist.com/node/21556263 [4] J. Mikians, L. Gyarmati, V. Erramilli, and N. Laoutaris, “Crowdassisted search for price discrimination in e-commerce: first results,” in Proceedings of the ninth ACM conference on Emerging networking experiments and technologies, ser. CoNEXT ’13. New York, NY, USA: Association for Computing Machinery, Dec. 2013, pp. 1–6. [Online]. Available: https://doi.org/10.1145/2535372.2535415 [5] A. Hannak, G. Soeller, D. Lazer, A. Mislove, and C. Wilson, “Measuring Price Discrimination and Steering on E-commerce Web Sites,” in Proceedings of the 2014 Conference on Internet Measurement Conference, ser. IMC ’14. New York, NY, USA: Association for Computing Machinery, Nov. 2014, pp. 305–318. [Online]. Available: https://doi.org/10.1145/2663716.2663744 [6] “The cambridge analytica files,” 2015. [Online]. Available: https://www. theguardian.com/news/series/cambridge-analytica-files [7] I. Castell-Uroz, J. Sol´ e-Pareta, and P. Barlet-Ros, “TrackSign: Guided Web Tracking Discovery,” in IEEE INFOCOM 2021 - IEEE Conference on Computer Communications, May 2021, pp. 1–10. 117 [8] H. Le, F. Fallace, and P. Barlet-Ros, “Towards accurate detection of obfuscated web tracking,” in 2017 IEEE International Workshop on Measurement and Networking (M&N), Sep. 2017, pp. 1–6. [9] “The four v’s of big data (ibm).” [Online]. Available: https://web.archive.org/web/20200429153837/https://www. ibmbigdatahub.com/infographic/four-vs-big-data [10] “The four v’s of big data (ibm).” [Online]. Available: https://web.archive.org/web/20200526041816/https://www. ibmbigdatahub.com/infographic/extracting-business-value-4-vs-big-data [11] S. Englehardt and A. Narayanan, “Online Tracking: A 1-million- site Measurement and Analysis,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, ser. CCS ’16. New York, NY, USA: Association for Computing Machinery, Oct. 2016, pp. 1388–1401. [Online]. Available: https://doi.org/10.1145/2976749.2978313 [12] M. L´ ecuyer, G. Ducoffe, F. Lan, A. Papancea, T. Petsios, R. Spahn, A. Chaintreau, and R. Geambasu, “{XRay}: Enhancing the {Web’s}Transparency with Differential Correlation,” in Proceedings of the 23th USENIX Security Symposium, 2014, pp. 49–64. [Online]. Available: https://www.usenix.org/ conference/usenixsecurity14/technical-sessions/presentation/lecuyer [13] Q. Wu, Q. Liu, Y. Zhang, and G. Wen, “TrackerDetector: A system to detect third-party trackers through machine learning,” Computer Networks, vol. 91, pp. 164–173, Nov. 2015. [Online]. Available: https: //www.sciencedirect.com/science/article/pii/S1389128615002728 [14] A. J. Kaizer and M. Gupta, “Towards Automatic Identification of JavaScript-oriented Machine-Based Tracking,” in Proceedings of the 2016 ACM on International Workshop on Security And Privacy Analytics, ser. IWSPA ’16. New York, NY, USA: Association for Computing Machinery, Mar. 2016, pp. 33–40. [Online]. Available: https://doi.org/10.1145/2875475.2875479 [15] Z. Yu, S. Macbeth, K. Modi, and J. M. Pujol, “Tracking the Trackers,” in Proceedings of the 25th International Conference on World Wide Web, ser. WWW ’16. Republic and Canton of Geneva, CHE: International World Wide Web Conferences Steering Committee, Apr. 2016, pp. 121–132. [Online]. Available: https://doi.org/10.1145/2872427.2883028 118 [16] V. Kalavri, J. Blackburn, M. Varvello, and K. Papagiannaki, “Like a Pack of Wolves: Community Structure of Web Trackers,” in Passive and Active Measurement, ser. Lecture Notes in Computer Science, T. Karagiannis and X. Dimitropoulos, Eds. Cham: Springer International Publishing, 2016, pp. 42–54. [17] U. Iqbal, P. Snyder, S. Zhu, B. Livshits, Z. Qian, and Z. Shafiq, “AdGraph: A Graph-Based Approach to Ad and Tracker Blocking,” in 2020 IEEE Symposium on Security and Privacy (SP), May 2020, pp. 763–776. [18] U. Iqbal, S. Englehardt, and Z. Shafiq, “Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors,” in 2021 IEEE Symposium on Security and Privacy (SP), May 2021, pp. 1143–1161. [19] AdBlock Plus, “Adblock Plus,” Feb. 2020, https://adblockplus.org/en/. [Online]. Available: https://adblockplus.org/en/ [20] R. Hill, “uBlock Origin,” Feb. 2020. [Online]. Available: https://github. com/gorhill/uBlock [21] Q. Wu, Q. Liu, Y. Zhang, P. Liu, and G. Wen, “A Machine Learning Approach for Detecting Third-Party Trackers on the Web,” in Computer Security – ESORICS 2016, ser. Lecture Notes in Computer Science, I. Askoxylakis, S. Ioannidis, S. Katsikas, and C. Meadows, Eds. Cham: Springer International Publishing, 2016, pp. 238–258. [22] M. Ikram, H. J. Asghar, M. A. Kaafar, B. Krishnamurthy, and A. Mahanti, “Towards Seamless Tracking-Free Web: Improved Detection of Trackers via One-class Learning,” Mar. 2016. [Online]. Available: http://arxiv.org/abs/ 1603.06289 [23] M. O. Rabin, “Fingerprinting by random polynomials,” Technical Report, vol. Center for Research in Computing Technology, Harvard University, pp. 15–81, 1981. [Online]. Available: http://www.xmailserver.org/rabin.pdf [24] “Tracking Users with CSS.” [Online]. Available: https://www.templarbit. com/blog/2018/03/20/tracking-users-with-css/ [25] M. Smith, C. Disselkoen, S. Narayan, F. Brown, and D. Stefan, “Browser history {re:visited},” in Proceedings of the 12th USENIX Workshop on Offensive Technologies, 2018. [Online]. Available: https://www.usenix. org/conference/woot18/presentation/smith 119 [78] A. Lerner, A. K. Simpson, T. Kohno, and F. Roesner, “Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016,” in Proceedings of the 25th USENIX Security Symposium, 2016. [Online]. Available: https://www.usenix.org/conference/ usenixsecurity16/technical-sessions/presentation/lerner [79] archive.org, “Wayback Machine,” 2020. [Online]. Available: https://web. archive.org/ [80] H. Metwalley, S. Traverso, and M. Mellia, “Using Passive Measurements to Demystify Online Trackers,” Computer, vol. 49, no. 3, pp. 50–55, Mar. 2016. [81] T. Bujlow, V. Carela-Espa˜ nol, J. Sol´ e-Pareta, and P. Barlet-Ros, “A Survey on Web Tracking: Mechanisms, Implications, and Defenses,” Proceedings of the IEEE, vol. 105, no. 8, pp. 1476–1510, Aug. 2017. [82] F. Roesner, T. Kohno, and D. Wetherall, “Detecting and Defending Against {Third-Party}Tracking on the Web,” in Proceedings of the USENIX Symposium on Networked Systems Design and Implementation, 2012, pp. 155– 168. [Online]. Available: https://www.usenix.org/conference/nsdi12/ technical-sessions/presentation/roesner [83] T.-C. Li, H. Hang, M. Faloutsos, and P. Efstathopoulos, “TrackAdvisor: Taking Back Browsing Privacy from Third-Party Trackers,” in Passive and Active Measurement, ser. Lecture Notes in Computer Science, J. Mirkovic and Y. Liu, Eds. Cham: Springer International Publishing, 2015, pp. 277–289. [84] A. Yamada, H. Masanori, and Y. Miyake, “Web Tracking Site Detection Based on Temporal Link Analysis,” in 2010 IEEE 24th International Conference on Advanced Information Networking and Applications Workshops, Apr. 2010, pp. 626–631. [85] D. Gugelmann, M. Happe, B. Ager, and V. Lenders, “An Automated Approach for Complementing Ad Blockers’ Blacklists,” Proceedings on Privacy Enhancing Technologies, 2015. [Online]. Available: https://petsymposium.org/popets/2015/popets-2015-0018.php [86] H. Metwalley, S. Traverso, and M. Mellia, “Unsupervised Detection of Web Trackers,” in 2015 IEEE Global Communications Conference (GLOBECOM), Dec. 2015, pp. 1–6. 126 [Document text truncated for crawler view.]