目前,主流的JavaScript执行引擎为了提高效率,引入优化编译执行模式,对频繁运行的热点函数进行即时优化编译。优化编译执行模式的引入,给通过动态插桩实现JavaScript程序的动态污点分析(dynamic taint analysis,DTA)带来了新的挑战。针对这一问题,该文针对HTML5混合型安卓应用,通过修改其所使用的V8JavaScript引擎,基于动态插桩实现了一种优化编译执行模式下的动态污点分析方法。该方法使用污染包裹对象的方式对污点标签进行存储,在优化编译执行模式下的Hydrogen中间代码层面进行插桩操作。实验结果表明:该方法能够有效地在优化编译执行模式下进行污点跟踪,且性能开销也在可以接受的范围内。
Mainstream JavaScript engines have introduced optimizing compilers. These compilers generate more efficient executable code for frequently functions run, but these optimizing compilers brings new challenges to the dynamic taint analysis (DTA) method implemented via dynamic instrumentation. This paper focuses on the HTMLS-based hybrid android App and presents a dynamic taint analysis method for the optimizing compilers in the V8 JavaScript engine using dynamic instrurumentation. In this method, the taint box object is used to store the taint tags and the taint tracking code is instrumented at the hydrogen level of the optimizing compiler. Tests show that this dynamic taint analysis technique effectively tracks the taint information flow in the optimizing compiler with acceptable performance overhead.