Skip to main content
Back

JavaScript

5 results across all content

Publications (2)

2025Preprint

Every Keystroke You Make: A Tech-Law Measurement and Analysis of Event Listeners for Wiretapping

arXiv Preprint(arXiv)

Shaoor Munir, Nurullah Demir, Qian Li, Konrad Kollnig, Zubair Shafiq

TL;DR:38.52% of top websites install third-party keystroke listeners. We connect this invasive tracking to U.S. wiretapping laws.

We conduct a technical and legal analysis connecting JavaScript event listeners used by third-party trackers to U.S. wiretapping laws. Using an instrumented web browser to analyze the top-million websites, we discovered that 38.52% websites installed third-party event listeners to intercept keystrokes, and that at least 3.18% websites transmitted intercepted information to a third-party server. We demonstrate that captured data—such as email addresses entered in form fields—are leveraged for unsolicited marketing campaigns. We map this invasive tracking technique against federal and California wiretapping statutes, bridging the gap between emerging technical practices and decades-old legal frameworks designed to protect electronic communications privacy.

2024ConferenceTop-TierBest Artifact Award

Blocking Tracking JavaScript at the Function Granularity

ACM SIGSAC Conference on Computer and Communications Security(CCS) · 19% acceptance

Abdul Haddi Amjad, Shaoor Munir, Zubair Shafiq, Muhammad Ali Gulzar

TL;DR:Not.js blocks tracking JavaScript at function-level granularity with 94% precision and 98% recall, without breaking websites.

Modern websites extensively rely on JavaScript to implement both functionality and tracking. Existing privacy enhancing content blocking tools struggle against mixed scripts, which simultaneously implement both functionality and tracking, because blocking the script would break functionality and not blocking it would allow tracking. We propose Not.js, a fine grained JavaScript blocking tool that operates at the function level granularity. Not.js's strengths lie in analyzing the dynamic execution context, including the call stack and calling context of each JavaScript function, and then encoding this context to build a rich graph representation. Not.js trains a supervised machine learning classifier on a webpage's graph representation to first detect tracking at the JavaScript function level and then automatically generate surrogate scripts that preserve functionality while removing tracking. Our evaluation of Not.js on the top 10K websites demonstrates that it achieves high precision (94%) and recall (98%) in detecting tracking JavaScript functions, outperforming the state of the art while being robust against off the shelf JavaScript obfuscation. Fine grained detection of tracking functions allows Not.js to automatically generate surrogate scripts that remove tracking JavaScript functions without causing major breakage. Our deployment of Not.js shows that mixed scripts are present on 62.3% of the top 10K websites, with 70.6% of the mixed scripts being third party that engage in tracking activities such as cookie ghostwriting. We share a sample of the tracking functions detected by Not.js within mixed scripts not currently on filter lists with filter list authors, who confirm that these scripts are not blocked due to potential functionality breakage, despite being known to implement tracking.

Talks (1)

Evaluating Large Language Models as a Defense Against Online Tracking

Ad-Filtering Dev Summit 2024 · October 2024

Exploring how LLMs can be leveraged to detect and block tracking JavaScript at the function level granularity, enabling fine-grained privacy protection while preserving website functionality.

Watch/Listen →

Media Coverage (2)

JavaScript Research & Content | Shaoor Munir