Platform-Independent Dynamic Taint Analysis for JavaScript
- 26 October 2018
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 46 (12) , 1364-1379
Abstract
Previous approaches to dynamic taint analysis for JavaScript are implemented directly in a browser or JavaScript engine, limiting their applicability to a single platform and requiring ongoing maintenance as platforms evolve, or they require nontrivial program transformations. We present an approach that relies on instrumentation to encode taint propagation as instructions for an abstract machine. Our approach has two key advantages: it is platform-independent and can be used with any existing JavaScript engine, and it can track taint on primitive values without requiring the introduction of wrapper objects. Furthermore, our technique enables multiple deployment scenarios by varying when and where the generated instructions are executed and it supports indirect taint sources, i.e., situations where taint enters an application via arguments passed to dynamically registered event-listener functions. We implemented the technique for the ECMAScript 5 language in a tool called Ichnaea, and evaluated it on 22 NPM modules containing several types of injection vulnerabilities, including 4 modules containing vulnerabilities that were not previously discovered and reported. On these modules, run-time overheads range from 3.17x to 38.42x, which is significantly better than a previous transformation-based technique. We also report on a case study that shows how Ichnaea can be used to detect privacy leaks in a Tizen web application for the Samsung Gear S2 smart watch.Keywords
Funding Information
- Czech Technical University
- European Research Council (695412)
- National Science Foundation (CCF-1715153)
This publication has 27 references indexed in Scilit:
- FlowDroidACM SIGPLAN Notices, 2014
- JSFlow2014
- Information Flow Control in WebKit’s JavaScript Bytecode2014
- Jalangi: a selective record-replay and dynamic analysis framework for JavaScript2013
- Practical blended taint analysis for JavaScript2013
- You are what you include2012
- Information flow analysis for javascript2011
- Taint-Exchange: A Generic System for Cross-Process and Cross-Host Taint Tracking2011
- Pin2005
- Certification of programs for secure information flowCommunications of the ACM, 1977