Wasmati: An Efficient Static Vulnerability Scanner for WebAssembly

04/26/2022
by   Tiago Brito, et al.
0

WebAssembly is a new binary instruction format that allows targeted compiled code written in high-level languages to be executed with near-native speed by the browser's JavaScript engine. However, given that WebAssembly binaries can be compiled from unsafe languages like C/C++, classical code vulnerabilities such as buffer overflows or format strings can be transferred over from the original programs down to the cross-compiled binaries. As a result, this possibility of incorporating vulnerabilities in WebAssembly modules has widened the attack surface of modern web applications. This paper presents Wasmati, a static analysis tool for finding security vulnerabilities in WebAssembly binaries. It is based on the generation of a code property graph (CPG), a program representation previously adopted for detecting vulnerabilities in various languages but hitherto unapplied to WebAssembly. We formalize the definition of CPG for WebAssembly, introduce techniques to generate CPG for complex WebAssembly, and present four different query specification languages for finding vulnerabilities by traversing a program's CPG. We implemented ten queries capturing different vulnerability types and extensively tested Wasmati on four heterogeneous datasets. We show that Wasmati can scale the generation of CPGs for large real-world applications and can efficiently find vulnerabilities for all our query types. We have also tested our tool on WebAssembly binaries collected in the wild and identified several potential vulnerabilities, some of which we have manually confirmed to exist unless the enclosing application properly sanitizes the interaction with such affected binaries.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/12/2020

Industrial Experience of Finding Cryptographic Vulnerabilities in Large-scale Codebases

Enterprise environments need to screen large-scale (millions of lines of...
research
05/17/2023

Statically Detecting Buffer Overflow in Cross-language Android Applications Written in Java and C/C++

Many applications are being written in more than one language to take ad...
research
03/25/2022

C to Checked C by 3C

Owing to the continued use of C (and C++), spatial safety violations (e....
research
08/20/2023

Can Large Language Models Find And Fix Vulnerable Software?

In this study, we evaluated the capability of Large Language Models (LLM...
research
03/04/2020

Revisiting Security Vulnerabilities in Commercial Password Managers

In this work we analyse five popular commercial password managers for se...
research
03/28/2020

liOS: Lifting iOS apps for fun and profit

Although iOS is the second most popular mobile operating system and is o...
research
10/12/2019

Statically Detecting Vulnerabilities by Processing Programming Languages as Natural Languages

Web applications continue to be a favorite target for hackers due to a c...

Please sign up or login with your details

Forgot password? Click here to reset