arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.15433cs.CRcs.SE
收藏

Fuzzm:通过WebAssembly的纯二进制插装和Fuzzing查找内存漏洞

Fuzzm: Finding Memory Bugs through Binary-Only Instrumentation and Fuzzing of WebAssembly

Daniel Lehmann, Martin Toldam Torp, Michael Pradel

摘要:

WebAssembly二进制文件通常是从内存不安全的语言(如C和C++)编译的。由于WebAssembly的线性内存和缺少保护功能,例如,堆栈金丝雀,源代码级内存漏洞可在编译的WebAssembly二进制文件中利用,有时甚至比本机代码更容易。本文解决了通过WebAssembly的第一个仅二进制模糊器检测此类漏洞的问题。我们的方法,称为Fuzzm,结合金丝雀仪器检测堆栈和堆上的溢出和下溢,一个有效的覆盖仪器,一个WebAssembly VM,和流行的AFL模糊的输入生成算法。除了作为模糊的预言机,我们的金丝雀还作为一个独立的二进制硬化技术,以防止在生产中利用脆弱的二进制文件。我们用28个真实的WebAssembly二进制文件来评估Fuzzm,其中一些是从源代码编译的,另一些是在没有源代码的情况下发现的。模糊器探索数千条执行路径,触发数十次崩溃,每秒执行数百次程序执行。当用于二进制加固时,该方法可以防止以前发布的针对易受攻击的WebAssembly二进制文件的漏洞,同时降低运行时开销。

英文摘要:

WebAssembly binaries are often compiled from memory-unsafe languages, such as C and C++. Because of WebAssembly's linear memory and missing protection features, e.g., stack canaries, source-level memory vulnerabilities are exploitable in compiled WebAssembly binaries, sometimes even more easily than in native code. This paper addresses the problem of detecting such vulnerabilities through the first binary-only fuzzer for WebAssembly. Our approach, called Fuzzm, combines canary instrumentation to detect overflows and underflows on the stack and the heap, an efficient coverage instrumentation, a WebAssembly VM, and the input generation algorithm of the popular AFL fuzzer. Besides as an oracle for fuzzing, our canaries also serve as a stand-alone binary hardening technique to prevent the exploitation of vulnerable binaries in production. We evaluate Fuzzm with 28 real-world WebAssembly binaries, some compiled from source and some found in the wild without source code. The fuzzer explores thousands of execution paths, triggers dozens of crashes, and performs hundreds of program executions per second. When used for binary hardening, the approach prevents previously published exploits against vulnerable WebAssembly binaries while imposing low runtime overhead.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑