Wasabi: A Framework for Dynamically Analyzing WebAssembly

Wasabi: A Framework for Dynamically Analyzing WebAssembly
复制标题

DOI:
10.1145/3297858.3304068
复制
发表时间:
2018-08
期刊:
Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems
影响因子:
--
通讯作者:
Daniel Lehmann;Michael Pradel
Daniel Lehmann;Michael Pradel
中科院分区:
其他
文献类型:
--
作者:
Daniel Lehmann;Michael Pradel

文献摘要

相似文献

WebAssembly是一种新的Web低级语言,一年多以来已经在所有主要浏览器中实现。为了确保未来Web应用程序的安全性、性能和正确性,迫切需要WebAssembly的动态分析工具。然而,从头开始构建这样的工具需要了解语言及其运行时环境的底层细节。Wasabi是第一个动态分析WebAssembly的通用框架。Wasabi提供了一个易于使用的高级API,支持重量级动态分析。它基于二进制插装,将对用JavaScript编写的分析函数的调用插入到WebAssembly二进制文件中。动态分析WebAssembly带来了一些独特的挑战,例如使用具有固定类型的分析函数跟踪类型多态指令的问题,我们通过按需单态化来解决这个问题。我们对计算密集型基准测试和实际应用程序的评估表明,Wasabi(i)忠实地保留了原始程序行为,(ii)对重量级动态分析施加了合理的开销,(iii)使其直接实现各种动态分析,包括指令计数,调用图提取,内存访问跟踪和污点分析。
WebAssembly is the new low-level language for the web and has now been implemented in all major browsers since over a year. To ensure the security, performance, and correctness of future web applications, there is a strong need for dynamic analysis tools for WebAssembly. However, building such tools from scratch requires knowledge of low-level details of the language and its runtime environment. This paper presents Wasabi, the first general-purpose framework for dynamically analyzing WebAssembly. Wasabi provides an easy-to-use, high-level API that supports heavyweight dynamic analyses. It is based on binary instrumentation, which inserts calls to analysis functions written in JavaScript into a WebAssembly binary. Dynamically analyzing WebAssembly comes with several unique challenges, such as the problem of tracing type-polymorphic instructions with analysis functions that have a fixed type, which we address through on-demand monomorphization. Our evaluation on compute-intensive benchmarks and real-world applications shows that Wasabi (i) faithfully preserves the original program behavior, (ii) imposes an overhead that is reasonable for heavyweight dynamic analysis, and (iii) makes it straightforward to implement various dynamic analyses, including instruction counting, call graph extraction, memory access tracing, and taint analysis.