Source-linked AI summary
Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors
Umar Iqbal, Steven Englehardt, Zubair Shafiq
TL;DR
Browser fingerprinting is an invasive, opaque stateless tracking technique for which existing protections struggle to balance detection accuracy with website functionality. The paper proposes FP-INSPECTOR, a machine-learning syntactic-semantic detector combining static and dynamic analysis, and evaluates targeted countermeasures and web prevalence. FP-INSPECTOR detects 26% more fingerprinting scripts than prior heuristics, reduces breakage by 2X in particularly vulnerable websites, and finds fingerprinting on 10.18% of Alexa top-100K websites.
Problem
Existing browser-fingerprinting protections struggle to provide accurate mitigation without degrading benign website functionality.
Method
FP-INSPECTOR uses machine learning over syntactic and semantic features extracted through complementary static and dynamic analysis.
Results
FP-INSPECTOR detects 26% more fingerprinting scripts than manually designed heuristics, reduces website breakage by 2X on particularly vulnerable websites, and finds fingerprinting on 10.18% of Alexa top-100K websites.
Takeaways & Limitations
FP-INSPECTOR supports targeted fingerprinting countermeasures and reveals widespread deployment alongside previously unreported JavaScript API uses.
Takeaways & Limitations
Because detection operates at script granularity, adversarial websites can disperse fingerprinting across scripts or combine it with functional code to evade detection or mitigation.
Abstract
from arXiv · showhide
Browser fingerprinting is an invasive and opaque stateless tracking technique. Browser vendors, academics, and standards bodies have long struggled to provide meaningful protections against browser fingerprinting that are both accurate and do not degrade user experience. We propose FP-Inspector, a machine learning based syntactic-semantic approach to accurately detect browser fingerprinting. We show that FP-Inspector performs well, allowing us to detect 26% more fingerprinting scripts than the state-of-the-art. We show that an API-level fingerprinting countermeasure, built upon FP-Inspector, helps reduce website breakage by a factor of 2. We use FP-Inspector to perform a measurement study of browser fingerprinting on top-100K websites. We find that browser fingerprinting is now present on more than 10% of the top-100K websites and over a quarter of the top-10K websites. We also discover previously unreported uses of JavaScript APIs by fingerprinting scripts suggesting that they are looking to exploit APIs in new and unexpected ways.
I. INTRODUCTION
Browser fingerprinting is an opaque stateless tracking technique that remains difficult to mitigate accurately without breaking benign website functionality. FP-INSPECTOR combines static and dynamic analysis with machine learning to detect fingerprinting, evaluate targeted protections, and measure its prevalence on the web.
- Blanket API restrictions can break benign website functionality, while network blocking and hard-coded heuristics struggle with first-party, dual-purpose, and evolving fingerprinting scripts.These limitations motivate a detector that can distinguish fingerprinting behavior more selectively.
- FP-INSPECTOR combines syntactic and semantic features from static and dynamic analysis to learn fingerprinting behaviors.Static analysis improves coverage of code that does not execute during a page visit, while dynamic analysis helps handle obfuscated or minified scripts.
- FP-INSPECTOR detects fingerprinting scripts with 99.9% accuracy and 26% more scripts than manually designed heuristics.Its evaluation also finds that targeted countermeasures reduce website breakage by a factor of 2 on websites particularly prone to breakage.
- Fingerprinting appears on 10.18% of Alexa top-100K websites, with scripts served from more than two thousand domains and new uses of JavaScript APIs identified.The measured domains include anti-ad fraud vendors and cross-site trackers, while Permissions and Performance APIs are disproportionately used by fingerprinting scripts.
- The paper contributes an ML-based detector, an evaluation of breakage under mitigation strategies, a top-100K measurement study, and clustering analysis of JavaScript APIs.The API analysis uncovers previously unreported browser fingerprinting vectors.
- Browser fingerprinting is an opaque, stateless tracking technique that uses device configuration information exposed through JavaScript APIs and HTTP headers.Unlike cookies, fingerprints are not directly observable or controllable by users.
III. FP-INSPECTOR
FP-INSPECTOR combines static and dynamic JavaScript analysis to learn fingerprinting behaviors and detect scripts. Its pipeline collects scripts and traces, represents code as ASTs, extracts syntactic and semantic features, and trains classifiers.
- III. FP-INSPECTOR: FP-INSPECTOR combines static and dynamic JavaScript analysis to detect fingerprinting scripts.Static analysis improves coverage, while dynamic analysis helps handle obfuscation.
- III. FP-INSPECTOR: FP-INSPECTOR learns emergent fingerprinting properties from limited ground truth and can generalize to new scripts and previously unknown methods.The approach uses many low-level syntactic and semantic heuristics as classifier features rather than relying on hand-coded rules.
- III. FP-INSPECTOR: The system extends OpenWPM to collect JavaScript source files, inline scripts, and execution traces from webpages.Execution traces record accessed APIs, methods or properties, arguments or values, and stack traces.
- III. FP-INSPECTOR: ASTs abstract away whitespace, comments, and coding style while preserving syntactic relationships among script elements.Nodes represent keywords, identifiers, and literals, while edges represent their relationships.
- III. FP-INSPECTOR: The method unpacks scripts delivered as text through eval or Function before constructing ASTs.An instrumented browser captures scripts as parsed by the JavaScript engine, including inline scripts.
- III. FP-INSPECTOR: Static features use API-related parent:child AST pairs, such as ForStatement:var and MemberExpression:measureText, to represent fingerprinting access patterns.Restricting pairs to those containing API-related keywords avoids a prohibitively large feature set.
B. Mitigating fingerprinting scripts
The paper evaluates content blocking and API restriction as fingerprinting countermeasures. FP-INSPECTOR supports targeted restrictions that limit fingerprinting APIs for scripts detected on particular domains.
- B. Mitigating fingerprinting scripts: Existing countermeasures either block fingerprinting-script requests or restrict scripts’ access to fingerprinting APIs.API restriction allows scripts to load but limits access to APIs known to support fingerprinting.
- B. Mitigating fingerprinting scripts: Blanket API restriction provides protection against active fingerprinting but can break benign website functionality and requires additional protection against passive fingerprinting.Privacy-focused browsers use blanket restriction partly because it avoids detecting fingerprinting scripts.
- B. Mitigating fingerprinting scripts: The evaluation compares blanket API restriction, targeted API restriction, and request blocking.Targeted restriction applies only to scripts served from domains detected by FP-INSPECTOR as deploying fingerprinting scripts.
IV. EVALUATION
The evaluation measures FP-INSPECTOR’s detection accuracy and the website breakage caused by fingerprinting mitigations.
- IV. EVALUATION: The evaluation measures detection accuracy and website breakage under fingerprinting mitigations.These two dimensions assess both classifier performance and the practical impact of countermeasures.
A. Accuracy
The accuracy evaluation addresses the lack of current, script-level fingerprinting ground truth. Because existing lists are incomplete for distinguishing resources and first-party fingerprinting, the authors use modified prior heuristics.
- A. Accuracy: Existing academic script lists are snapshots, while available tracking lists do not provide sufficiently current ground truth for training.Disconnect’s list identifies fingerprinting domains but not the actual fingerprinting URLs.
- A. Accuracy: Disconnect’s list cannot distinguish fingerprinting from non-fingerprinting resources served by the same domains.This limits its usefulness for supervised classification at the script level.
- A. Accuracy: The authors use a slightly modified version of prior manually designed heuristics to identify fingerprinting scripts for training.The chosen approach is intended to cover both first-party and third-party fingerprinting scripts.
1) Fingerprinting Definition:
The paper treats fingerprinting-script labeling as difficult because device-information access can serve benign purposes, while the crawl-based dataset covers only scripts that execute. The study samples popular and long-tail websites but faces execution and parsing limits.
- Fingerprinting Definition:: Fingerprinting labels are ambiguous because collecting device information can support benign functionality rather than device identification.An advertisement may collect screen size to assess viewability without using it as a fingerprint.
- Fingerprinting Definition:: 20,000 Alexa top-100K homepages were sampled to cover both the top-10K websites and the long tail.The sample combines the top 10K sites with 10K randomly selected sites ranked from 10K to 100K.
- Fingerprinting Definition:: Ground truth was available only for scripts that executed during the crawl, although nonexecuting scripts could still receive static classification.The crawled dataset contains 17,629 websites and 153,354 distinct executing scripts.
- Fingerprinting Definition:: Static analysis failed to create ASTs for 6.4% of scripts because of invalid syntax.ASTs were successfully created for 143,526 scripts, while 9,828 failed parsing.
3) Enhancing Ground Truth:
FP-INSPECTOR improves a heuristic ground truth through iterative classifier review and retraining, combining static and dynamic evidence to address dormant and obfuscated scripts. The resulting classifier detects more scripts with high accuracy, while targeted countermeasures reduce breakage and hybrid blocking offers broader protection.
- Enhancing Ground Truth:: Heuristics generally had high precision but low recall, while classifier errors remained for API-heavy benign scripts and fingerprinting mixed with functional code.Canvas animations and charts could be mislabeled, as could login-page scripts combining canvas-font fingerprinting with functional code.
- Enhancing Ground Truth:: Static-only detections were usually dormant, whereas dynamic-only detections were usually obfuscated or excessively minified.94.46% of static-only scripts were partially or completely dormant, and 92.30% of dynamic-only scripts were obfuscated or excessively minified.
- Classification Accuracy:: 26% more scripts than heuristics were detected with 0.05% FPR, 6.1% FNR, 93.8% recall, 93.1% precision, and 99.9% accuracy.Table II reports the combined static and dynamic classifier results.
- Breakage: Targeted countermeasures reduced breakage by a factor of 2 on tested websites particularly prone to breakage.Blanket API restriction broke more than two-thirds of tested websites, while targeted API restriction caused no major breakage on about 75%.
- Breakage: Hybrid blocking caused less breakage than request blocking but more than targeted API restrictions, while providing the best protection.It misses passive first-party fingerprinting, which the paper describes as nearly impossible to block without breaking websites.
V. MEASURING FINGERPRINTING IN THE WILD
FP-INSPECTOR measures fingerprinting across Alexa’s top-100K websites and finds deployment is concentrated among highly ranked sites, with more than 10.18% affected overall.
- More than 10.18% of Alexa top-100K websites deploy fingerprinting, with prevalence higher among highly ranked sites.
- Over a quarter of the top sites now deploy fingerprinting, and this increase extends to less popular sites ranked 10K–100K.
- FP-INSPECTOR detects fingerprinting served by 2,349 domains on the top-100K sites, compared with 519 domains on the top-1-million sites reported previously.
B. Fingerprinting is most common on news sites
Fingerprinting deployment varies sharply by website category, is linked to advertising-related services, and includes vendors that participate in cross-site tracking practices.
- B. Fingerprinting is most common on news sites: Fingerprinting ranges from nearly 14% of news websites to about 1% of credit/debit-related websites.
- B. Fingerprinting is most common on news sites: Fingerprinting’s category distribution roughly matches broader tracker distribution, and its prevalence may reflect advertising-based website monetization.
- C. Fingerprinting is used to fight ad fraud but also for potential cross-site tracking: The most prevalent fingerprinting vendors include anti-ad-fraud providers, while other top vendors appear to be content delivery networks.
- C. Fingerprinting is used to fight ad fraud but also for potential cross-site tracking: 17.28% of fingerprinting vendors participate in cookie syncing, often with well-known adtech vendors.
- VI. ANALYZING APIS USED BY FINGERPRINTERS: The analysis identifies previously unknown fingerprinting uses of the Permissions, peripheral, Performance, and related browser APIs.
2) Animation fingerprinting:
Animation-related browser behavior can provide fingerprinting signals, while FP-INSPECTOR’s script-level design leaves evasion and enforcement boundaries.
- 2) Animation fingerprinting:: requestAnimationFrame can reveal browser rendering frame rates, whose differences may leak entropy for fingerprinting.
- VII. LIMITATIONS: FP-INSPECTOR may miss fingerprinting divided across several scripts because detection models syntactic and semantic relationships only within individual scripts.
- VII. LIMITATIONS: Script dispersion can evade detection but requires distributing every update across multiple chunks and extensive testing.
- VII. LIMITATIONS: Script amalgamation can evade targeted API restrictions and may break websites when functional and fingerprinting code share one script.
- VIII. CONCLUSION: FP-INSPECTOR detects 26% more fingerprinting scripts than prior heuristics and reduces website breakage by 2X.
IX. APPENDIX
The appendix describes instrumentation and heuristic procedures used to extract static and dynamic fingerprinting features from JavaScript.
- OpenWPM instrumentation is extended to cover additional JavaScript methods and DOM interactions used by fingerprinting scripts.
- Execution tracing limits recording to the first 50 calls per method, except for canvas font methods called repeatedly during font fingerprinting.
- AST features capture syntactic patterns such as loops and measureText accesses that indicate canvas font fingerprinting behavior.
- Dynamic features are extracted from execution traces, while modified prior heuristics provide initial labels for fingerprinting and non-fingerprinting scripts.
- The heuristic rules cover canvas, WebRTC, canvas-font, and AudioContext fingerprinting through characteristic API calls and behaviors.
D. Examples of Dormant and Deviating Scripts
The paper gives examples of dormant and deviating scripts to illustrate differing fingerprinting-script behaviors.
- D. Examples of Dormant and Deviating Scripts: Dormant and deviating scripts represent two distinct examples of fingerprinting-script behavior.Script 3 is dormant, while Script 4 is deviating.
E. Why Machine Learning?
Simple textual similarity is unreliable because fingerprinting scripts are often altered and fingerprinting-related APIs also appear in benign scripts. FP-INSPECTOR’s syntactic-semantic learning approach addresses these cases more effectively.
- E. Why Machine Learning?: 81.69% accuracy was achieved at a 5.28% similarity threshold, but fingerprinting and non-fingerprinting scripts significantly overlapped.At this threshold, the true positive rate was 69.20% and the false positive rate was 5.97%.
- E. Why Machine Learning?: Most websites alter fingerprinting libraries through minification, obfuscation, partial embedding, or inspired reimplementation, reducing textual similarity.These alterations make fingerprinting scripts less similar to popular libraries.
- E. Why Machine Learning?: Shared APIs such as Math, window, and canvas increase similarity between benign scripts and fingerprinting libraries, limiting simple similarity metrics.Canvas, for example, can support animations rather than fingerprinting.
- E. Why Machine Learning?: FP-INSPECTOR combines static and dynamic syntactic-semantic analysis so learning can generalize across altered libraries and functional API uses.The approach uses static and dynamic analysis to complement their respective coverage and obfuscation limitations.
F. JavaScript APIs Frequently Used in Fingerprinting Scripts
The paper measures JavaScript API keywords that fingerprinting scripts use disproportionately and reports their prevalence across scripts and websites.
- F. JavaScript APIs Frequently Used in Fingerprinting Scripts: API keyword prevalence is measured as the ratio of occurrence fractions in fingerprinting scripts versus non-fingerprinting scripts.Higher ratios indicate greater prevalence in fingerprinting scripts.
- F. JavaScript APIs Frequently Used in Fingerprinting Scripts: The analysis reports each keyword’s ratio alongside counts of distinct scripts and websites using it.The table organizes these measures under Keywords, Scripts, and Websites.
- F. JavaScript APIs Frequently Used in Fingerprinting Scripts: The accompanying table covers frequently used fingerprinting keywords and their presence across a 20K-website crawl.Script counts refer to distinct fingerprinting scripts, while website counts refer to websites embedding those scripts.