Wasabi: A Framework for Dynamically Analyzing WebAssembly

08/31/2018
by   Daniel Lehmann, et al.
0

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. Unfortunately, building such tools from scratch requires knowledge of low-level details of the language, and perhaps even 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 allows implementing heavyweight dynamic analyses that can monitor all low-level behavior. The approach is based on binary instrumentation, which inserts calls to analysis functions written in JavaScript into a WebAssembly binary. Wasabi addresses several unique challenges not present for other binary instrumentation tools, such as the problem of tracing type-polymorphic instructions with analysis functions that have a fixed type, which we address through an on-demand monomorphization of analysis calls. To control the overhead imposed by an analysis, Wasabi selectively instruments only those instructions relevant for the analysis. 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 (depending on the program and the analyzed instructions, between 1.02x and 163x), and (iii) makes it straightforward to implement various dynamic analyses, including instruction counting, call graph extraction, memory access tracing, and taint analysis.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/13/2022

MCAD: Beyond Basic-Block Throughput Estimation Through Differential, Instruction-Level Tracing

Estimating instruction-level throughput is critical for many application...
research
03/10/2021

ELLA: Exploration through Learned Language Abstraction

Building agents capable of understanding language instructions is critic...
research
12/22/2021

Semantics-Recovering Decompilation through Neural Machine Translation

Decompilation transforms low-level program languages (PL) (e.g., binary ...
research
03/07/2017

Redundancy Suppression In Time-Aware Dynamic Binary Instrumentation

Software tracing techniques are well-established and used by instrumenta...
research
05/01/2020

Designing Robust API Monitoring Solutions

Tracing the sequence of library and system calls that a program makes is...
research
01/16/2019

TrABin: Trustworthy Analyses of Binaries

Verification of microkernels, device drivers, and crypto routines requir...
research
03/29/2021

Dynamic Binary Translation for SGX Enclaves

Enclaves, such as those enabled by Intel SGX, offer a hardware primitive...

Please sign up or login with your details

Forgot password? Click here to reset