{"id":{"repo_id":"vt","oai_identifier":"oai:vtechworks.lib.vt.edu:10919/142225"},"canonical_url":"https://search.ndltd.org/etd/vt/oai:vtechworks.lib.vt.edu:10919/142225","repository":{"repo_id":"vt","name":"Virginia Tech","base_url":"https://vtechworks.lib.vt.edu/oai/request"},"display":{"title":"Enhancing Web Privacy through Fine-Grained Program Analysis of Tracking JavaScript","abstract":"Advertisers and tracking services (ATS) are pervasive on the modern web. To counter these practices, millions of users rely on privacy-enhancing technologies (PETs), such as ad-blockers, which primarily depend on filter lists composed of regex-based rules to block network requests associated with data exfiltration. However, this approach has become increasingly ineffective in the face of an ongoing arms race. Currently, PETs struggle to handle mixed JavaScript (JS) scripts that combine tracking behavior with legitimate website functionality. These tools operate at the network level and can only block entire script requests rather than specific behaviors within a script. As a result, once a mixed script executes, any subsequent data exfiltration carried out through encrypted URL requests becomes invisible to network-based defenses, rendering existing PETs ineffective. Mixed JS scripts create a fundamental dilemma for PETs: aggressively blocking them risks breaking websites, while allowing them undermines user privacy. This thesis addresses this challenge by asking: How can code-aware program analysis be leveraged to design privacy-enhancing technologies that effectively mitigate tracking while preserving essential web functionality? This thesis makes three primary contributions. First, we focus on identification of mixed JS by introducing TrackerSift, a large-scale measurement framework that reveals mixed behavior in a substantial fraction of web JS scripts. Second, we validate that mixed JS scripts can be effectively handled through program analysis, demonstrating that functions inside mixed JS scripts can clearly separate tracking code from functional code. Finally, we address mitigation by presenting NoT.JS, a code-aware, ML–based system that accurately identifies tracking JS functions inside mixed JS scripts and refactors them to selectively remove tracking logic while maintaining legitimate functionality. Together, these contributions advance privacy-enhancing technologies by enabling principled mitigation of mixed JS scripts through code-aware program analysis.","abstract_html":"Advertisers and tracking services (ATS) are pervasive on the modern web. To counter these practices, millions of users rely on privacy-enhancing technologies (PETs), such as ad-blockers, which primarily depend on filter lists composed of regex-based rules to block network requests associated with data exfiltration. However, this approach has become increasingly ineffective in the face of an ongoing arms race. Currently, PETs struggle to handle mixed JavaScript (JS) scripts that combine tracking behavior with legitimate website functionality. These tools operate at the network level and can only block entire script requests rather than specific behaviors within a script. As a result, once a mixed script executes, any subsequent data exfiltration carried out through encrypted URL requests becomes invisible to network-based defenses, rendering existing PETs ineffective. Mixed JS scripts create a fundamental dilemma for PETs: aggressively blocking them risks breaking websites, while allowing them undermines user privacy. This thesis addresses this challenge by asking: How can code-aware program analysis be leveraged to design privacy-enhancing technologies that effectively mitigate tracking while preserving essential web functionality? This thesis makes three primary contributions. First, we focus on identification of mixed JS by introducing TrackerSift, a large-scale measurement framework that reveals mixed behavior in a substantial fraction of web JS scripts. Second, we validate that mixed JS scripts can be effectively handled through program analysis, demonstrating that functions inside mixed JS scripts can clearly separate tracking code from functional code. Finally, we address mitigation by presenting NoT.JS, a code-aware, ML–based system that accurately identifies tracking JS functions inside mixed JS scripts and refactors them to selectively remove tracking logic while maintaining legitimate functionality. Together, these contributions advance privacy-enhancing technologies by enabling principled mitigation of mixed JS scripts through code-aware program analysis.","abstract_has_math":false,"creators":["Amjad, Abdul Haddi"],"institution":"Virginia Tech","degree_name":"Doctor of Philosophy","degree_level":"doctoral","degree_discipline":"Computer Science & Applications","degree_department":"Computer Science and#38; Applications","school":null,"contributors":[],"advisors":[],"committee_chairs":["Gulzar, Muhammad Ali"],"committee_members":["Shafiq, Zubair","Yao, Danfeng","Meng, Na","Ji, Bo"],"year":2026,"date_issued":"2026-03-11","date_published":"2026-03-11","updated_at":"2026-11-18T20:22:40Z","subjects":["Web","Privacy","Software Engineering"],"languages":["en"],"rights":["Creative Commons Attribution-ShareAlike 4.0 International"],"rights_urls":["http://creativecommons.org/licenses/by-sa/4.0/"],"identifier_entries":[{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["vt_gsexam:45672"],"render_values":[{"text":"vt_gsexam:45672","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10919/142225","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10919/142225","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://vtechworks.lib.vt.edu/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Avtechworks.lib.vt.edu%3A10919%2F142225","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.committeechair","label":"Committee Chair","values":["Gulzar, Muhammad Ali"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Shafiq, Zubair","Yao, Danfeng","Meng, Na","Ji, Bo"]},{"key":"dc:contributor.department","label":"Department","values":["Computer Science and#38; Applications"]},{"key":"dc:creator","label":"Author","values":["Amjad, Abdul Haddi"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2026-03-12T08:00:10Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2026-03-12T08:00:10Z"]},{"key":"dc:date.issued","label":"Date","values":["2026-03-11"]},{"key":"dc:publisher","label":"Institution","values":["Virginia Tech"]},{"key":"dc:type","label":"Dc Type","values":["Dissertation"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science & Applications"]},{"key":"thesis:degree_level","label":"Degree Level","values":["doctoral"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Doctor of Philosophy"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Virginia Polytechnic Institute and State University"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Web","Privacy","Software Engineering"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["Creative Commons Attribution-ShareAlike 4.0 International"]},{"key":"dc:rights.uri","label":"Rights URI","values":["http://creativecommons.org/licenses/by-sa/4.0/"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["vt_gsexam:45672"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10919/142225"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Advertisers and tracking services (ATS) are pervasive on the modern web. To counter these practices, millions of users rely on privacy-enhancing technologies (PETs), such as ad-blockers, which primarily depend on filter lists composed of regex-based rules to block network requests associated with data exfiltration. However, this approach has become increasingly ineffective in the face of an ongoing arms race. Currently, PETs struggle to handle mixed JavaScript (JS) scripts that combine tracking behavior with legitimate website functionality. These tools operate at the network level and can only block entire script requests rather than specific behaviors within a script. As a result, once a mixed script executes, any subsequent data exfiltration carried out through encrypted URL requests becomes invisible to network-based defenses, rendering existing PETs ineffective. Mixed JS scripts create a fundamental dilemma for PETs: aggressively blocking them risks breaking websites, while allowing them undermines user privacy. This thesis addresses this challenge by asking: How can code-aware program analysis be leveraged to design privacy-enhancing technologies that effectively mitigate tracking while preserving essential web functionality? This thesis makes three primary contributions. First, we focus on identification of mixed JS by introducing TrackerSift, a large-scale measurement framework that reveals mixed behavior in a substantial fraction of web JS scripts. Second, we validate that mixed JS scripts can be effectively handled through program analysis, demonstrating that functions inside mixed JS scripts can clearly separate tracking code from functional code. Finally, we address mitigation by presenting NoT.JS, a code-aware, ML–based system that accurately identifies tracking JS functions inside mixed JS scripts and refactors them to selectively remove tracking logic while maintaining legitimate functionality. Together, these contributions advance privacy-enhancing technologies by enabling principled mitigation of mixed JS scripts through code-aware program analysis."]},{"key":"dc:description.abstractgeneral","label":"General Abstract","values":["Online advertising and tracking services (ATS) are a fundamental part of today's web, but they also raise serious concerns about user privacy. To protect themselves, millions of people rely on privacy-enhancing technologies (PETs), such as ad-blockers. These tools typically depend on simple filter-rule lists to block outgoing tracking requests. However, as ATS adapt, they employ increasingly sophisticated techniques in which tracking is hidden within mixed website resources that also provide essential functionality. Blocking these mixed resources outright can break websites, while allowing them can expose users to unwanted tracking. This thesis explores how PETs can better navigate this trade-off. It asks how deeper code-level analysis can be used to identify and remove tracking behavior without disrupting how websites functionality. The thesis first measures how common these mixed web resources are, those that combine essential website functionality with hidden tracking, and shows that they are widespread across the web. It then demonstrates that analyzing website JavaScript code at a fine-grained, function-level granularity enables tracking behavior to be isolated from website functionality in mixed resources. Building on these insights, the thesis presents an automated machine-learning system that detects and removes tracking code from mixed resources while preserving legitimate website functionality. Overall, this thesis shows that understanding how ATS tracking is embedded within website code is essential for building more effective and reliable PETs, and highlights how code-aware analysis can help PETs keep pace with an evolving web."]},{"key":"dc:description.degree","label":"Dc Description Degree","values":["Doctor of Philosophy"]},{"key":"dc:format.medium","label":"Dc Format Medium","values":["ETD"]},{"key":"dc:title","label":"Title","values":["Enhancing Web Privacy through Fine-Grained Program Analysis of Tracking JavaScript"]}]}],"canonical_facts":{"dc:contributor.committeechair":["Gulzar, Muhammad Ali"],"dc:contributor.committeemember":["Shafiq, Zubair","Yao, Danfeng","Meng, Na","Ji, Bo"],"dc:contributor.department":["Computer Science and#38; Applications"],"dc:creator":["Amjad, Abdul Haddi"],"dc:date.accessioned":["2026-03-12T08:00:10Z"],"dc:date.available":["2026-03-12T08:00:10Z"],"dc:date.issued":["2026-03-11"],"dc:description.abstract":["Advertisers and tracking services (ATS) are pervasive on the modern web. To counter these practices, millions of users rely on privacy-enhancing technologies (PETs), such as ad-blockers, which primarily depend on filter lists composed of regex-based rules to block network requests associated with data exfiltration. However, this approach has become increasingly ineffective in the face of an ongoing arms race. Currently, PETs struggle to handle mixed JavaScript (JS) scripts that combine tracking behavior with legitimate website functionality. These tools operate at the network level and can only block entire script requests rather than specific behaviors within a script. As a result, once a mixed script executes, any subsequent data exfiltration carried out through encrypted URL requests becomes invisible to network-based defenses, rendering existing PETs ineffective. Mixed JS scripts create a fundamental dilemma for PETs: aggressively blocking them risks breaking websites, while allowing them undermines user privacy. This thesis addresses this challenge by asking: How can code-aware program analysis be leveraged to design privacy-enhancing technologies that effectively mitigate tracking while preserving essential web functionality? This thesis makes three primary contributions. First, we focus on identification of mixed JS by introducing TrackerSift, a large-scale measurement framework that reveals mixed behavior in a substantial fraction of web JS scripts. Second, we validate that mixed JS scripts can be effectively handled through program analysis, demonstrating that functions inside mixed JS scripts can clearly separate tracking code from functional code. Finally, we address mitigation by presenting NoT.JS, a code-aware, ML–based system that accurately identifies tracking JS functions inside mixed JS scripts and refactors them to selectively remove tracking logic while maintaining legitimate functionality. Together, these contributions advance privacy-enhancing technologies by enabling principled mitigation of mixed JS scripts through code-aware program analysis."],"dc:description.abstractgeneral":["Online advertising and tracking services (ATS) are a fundamental part of today's web, but they also raise serious concerns about user privacy. To protect themselves, millions of people rely on privacy-enhancing technologies (PETs), such as ad-blockers. These tools typically depend on simple filter-rule lists to block outgoing tracking requests. However, as ATS adapt, they employ increasingly sophisticated techniques in which tracking is hidden within mixed website resources that also provide essential functionality. Blocking these mixed resources outright can break websites, while allowing them can expose users to unwanted tracking. This thesis explores how PETs can better navigate this trade-off. It asks how deeper code-level analysis can be used to identify and remove tracking behavior without disrupting how websites functionality. The thesis first measures how common these mixed web resources are, those that combine essential website functionality with hidden tracking, and shows that they are widespread across the web. It then demonstrates that analyzing website JavaScript code at a fine-grained, function-level granularity enables tracking behavior to be isolated from website functionality in mixed resources. Building on these insights, the thesis presents an automated machine-learning system that detects and removes tracking code from mixed resources while preserving legitimate website functionality. Overall, this thesis shows that understanding how ATS tracking is embedded within website code is essential for building more effective and reliable PETs, and highlights how code-aware analysis can help PETs keep pace with an evolving web."],"dc:description.degree":["Doctor of Philosophy"],"dc:format.medium":["ETD"],"dc:identifier.other":["vt_gsexam:45672"],"dc:identifier.uri":["https://hdl.handle.net/10919/142225"],"dc:language.iso":["en"],"dc:publisher":["Virginia Tech"],"dc:rights":["Creative Commons Attribution-ShareAlike 4.0 International"],"dc:rights.uri":["http://creativecommons.org/licenses/by-sa/4.0/"],"dc:subject":["Web","Privacy","Software Engineering"],"dc:title":["Enhancing Web Privacy through Fine-Grained Program Analysis of Tracking JavaScript"],"dc:type":["Dissertation"],"thesis:degree_discipline":["Computer Science & Applications"],"thesis:degree_level":["doctoral"],"thesis:degree_name":["Doctor of Philosophy"],"thesis:institution_name":["Virginia Polytechnic Institute and State University"]},"updated_at":"2026-11-18T20:22:40Z"}