Walma: 利用机器学习检测WebAssembly中的内存破坏
Walma: Learning to See Memory Corruption in WebAssembly
AI总结:
Walma通过机器学习检测WebAssembly线性内存中的内存破坏和外部篡改,评估了六个真实世界CVE影响的应用,展示了CNN在结构化内存布局中的有效性及不同监控策略的精度与开销平衡。
摘要:
WebAssembly(Wasm)的单体线性内存模型促进了内存破坏攻击,可能升级为浏览器中的跨站脚本攻击或在恶意主机篡改模块状态时未被检测。现有防御依赖于侵入性的二进制仪器化或定制运行时,无法在对抗性主机模型下进行运行时完整性验证。我们提出了Walma,一种WebAssembly线性内存认证框架,利用机器学习通过分类内存快照来检测内存破坏和外部篡改。我们评估了Walma在六个真实世界CVE影响的应用上,跨三个验证后端(cpu-wasm,cpu-tch,gpu)和三种仪器化策略。我们的结果表明,基于CNN的分类可以有效检测具有结构化内存布局的应用中的内存破坏,粗粒度边界检查的开销最低为1.07倍,而细粒度监控引入更高的(1.5倍至1.8倍)但可预测的开销。我们的评估量化了不同部署配置下的精度与开销权衡,证明了基于机器学习的WebAssembly内存认证的实用性。
英文摘要:
The monolithic linear memory of WebAssembly (Wasm) creates a bidirectional attack surface: a memory corruption bug in a module can compromise the host, and a compromised host can corrupt the state of a trusted module. Existing defenses either require custom runtimes or source code changes, and none can verify runtime integrity under an adversarial host. We present WALMA, the first attestation framework delivering resilience by reaction against data-centric attacks that corrupt a region of memory. We render linear memory snapshots as grayscale images and classify them with a convolutional neural network. The network reads the row-aligned structure that compiled code imposes on memory and detects corruption that byte and texture statistics miss. Our main VGG-16 detector reaches 95%--100% verdict accuracy on four of five CVE-affected applications without a single false alarm, and a 1.9M-parameter ResNet, small enough to run inside the runtime on every host call, stays within a few points of it on the same four. A Shannon-entropy analysis bounds which out-of-band edits the network can separate from valid state, and black-box evasion requires contiguous overwrites of hundreds of kilobytes to megabytes. On the 53 WABench binaries, boundary attestation costs 1.07x--1.69x, scaling with a module's exposure to the host rather than with its runtime. WALMA thus makes linear memory integrity a property a Wasm runtime can check continuously: end to end against compromised modules, and against untrusted hosts provided snapshots reach the verifier intact.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。