Read Between the Lines: Detecting Tracking JavaScript with Bytecode Classification
Mohammad Ghasemisharif, Jason Polakis
Abstract
Browsers and extensions that aim to block online ads and tracking scripts predominantly rely on rules from filter lists for determining which resource requests must be blocked. These filter lists are often manually curated by a community of online users. However, due to the arms race between blockers and ad-supported websites, these rules must continuously get updated so as to adapt to novel bypassing techniques and modified requests, thus rendering the detection and rule-generation process cumbersome and reactive (which can result in major delays between propagation and detection). In this paper, we address the detection problem by proposing an automated pipeline that detects tracking and advertisement JavaScript resources with high accuracy, designed to incur minimal false positives and overhead. Our method models script detection as a text classification problem, where JavaScript resources are documents containing bytecode sequences. Since bytecode is directly obtained from the JavaScript interpreter, our technique is resilient against commonly used bypassing methods, such as URL randomization or code obfuscation. We experiment with both deep learning and traditional ML-based approaches for bytecode classification and show that our approach identifies ad/tracking scripts with 97.08% accuracy, significantly outperforming cutting-edge systems in terms of both precision and the level of required features. Our experimental analysis further highlights our system's capabilities, by demonstrating how it can augment filter lists by uncovering ad/tracking scripts that are currently unknown, as well as proactively detecting scripts that have been erroneously added by list curators.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Fledging Will Continue Until Privacy Improves: Empirical Analysis of Google's Privacy-Preserving Targeted Advertising cites Online Tracking: A 1-million-site Measurement and Analysis
- Fledging Will Continue Until Privacy Improves: Empirical Analysis of Google's Privacy-Preserving Targeted Advertising cites AdGraph: A Graph-Based Approach to Ad and Tracker Blocking
- Fledging Will Continue Until Privacy Improves: Empirical Analysis of Google's Privacy-Preserving Targeted Advertising cites Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors cites Online Tracking: A 1-million-site Measurement and Analysis
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors cites AdGraph: A Graph-Based Approach to Ad and Tracker Blocking
- SoK: After Decades of Web Tracker Detection, What's Next? cites Online Tracking: A 1-million-site Measurement and Analysis
- SoK: After Decades of Web Tracker Detection, What's Next? cites Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors
- SoK: After Decades of Web Tracker Detection, What's Next? cites AdGraph: A Graph-Based Approach to Ad and Tracker Blocking
- SoK: After Decades of Web Tracker Detection, What's Next? cites Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation
- Byte by Byte: Unmasking Browser Fingerprinting at the Function Level using V8 Bytecode Transformers cites Online Tracking: A 1-million-site Measurement and Analysis
- Byte by Byte: Unmasking Browser Fingerprinting at the Function Level using V8 Bytecode Transformers cites Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors
- Byte by Byte: Unmasking Browser Fingerprinting at the Function Level using V8 Bytecode Transformers cites Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation
- AdGraph: A Graph-Based Approach to Ad and Tracker Blocking cites Online Tracking: A 1-million-site Measurement and Analysis
- Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation cites Online Tracking: A 1-million-site Measurement and Analysis
Cited by top-tier papers3
- Fledging Will Continue Until Privacy Improves: Empirical Analysis of Google's Privacy-Preserving Targeted AdvertisingGiuseppe Calderonio, Mir Masood Ali, Jason PolakisUSENIX Security 2024 · 8 citations
- SoK: After Decades of Web Tracker Detection, What's Next?Wolf Rieder, Philip Raschke, Thomas Cory, Christian René Sechting et al.S&P 2026 · 1 citation
- Byte by Byte: Unmasking Browser Fingerprinting at the Function Level using V8 Bytecode TransformersPouneh Nikkhah Bahrami, Dylan Cutler, Igor BilogrevicCCS 2025
Builds on15
- Tranco: A Research-Oriented Top Sites Ranking Hardened Against ManipulationVictor Le Pochat, Tom van Goethem, Samaneh Tajalizadehkhoob, Maciej Korczynski et al.NDSS 2019 · 826 citations
- Online Tracking: A 1-million-site Measurement and AnalysisSteven Englehardt, Arvind NarayananCCS 2016 · 798 citations
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting BehaviorsUmar Iqbal, Steven Englehardt, Zubair ShafiqS&P 2021 · 143 citations
- AdGraph: A Graph-Based Approach to Ad and Tracker BlockingUmar Iqbal, Peter Snyder, Shitong Zhu, Benjamin Livshits et al.S&P 2020 · 112 citations
- The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private InformationSuphannee Sivakorn, Iasonas Polakis, Angelos D. KeromytisS&P 2016 · 86 citations
Related papers
- AdVersa: Adversarially-Robust and Practical Ad and Tracker Blocking in the WildChaejin Lim, Kiho Lee, Beomjin Jin, Heewon Baek et al.WWW 2026
- AdCPG: Classifying JavaScript Code Property Graphs with Explanations for Ad and Tracker BlockingChangmin Lee, Sooel SonCCS 2023 · 7 citations
- ASTrack: Automatic Detection and Removal of Web Tracking Code with Minimal Functionality LossIsmael Castell-Uroz, Kensuke Fukuda, Pere Barlet-RosINFOCOM 2023 · 8 citations
- Blocking Tracking JavaScript at the Function GranularityAbdul Haddi Amjad, Shaoor Munir, Zubair Shafiq, Muhammad Ali GulzarCCS 2024 · 3 citations
- Khaleesi: Breaker of Advertising and Tracking Request ChainsUmar Iqbal, Charlie Wolfe, Charles Nguyen, Steven Englehardt et al.USENIX Security 2022
