[论文解读] TaintAssembly: Taint-Based Information Flow Control Tracking for WebAssembly
TaintAssembly 是一个经过修改的 V8 JavaScript 引擎,支持对解释执行的 WebAssembly 进行动态污点追踪,能够实现函数参数、局部变量、线性内存以及概率性污点之间的污点传播。与原生 V8 相比,其运行时开销仅为 5–12%,因此适用于 WebAssembly 应用程序的信息流分析开发与调试。
WebAssembly (wasm) has recently emerged as a promisingly portable, size-efficient, fast, and safe binary format for the web. As WebAssembly can interact freely with JavaScript libraries, this gives rise to a potential for undesirable behavior to occur. It is therefore important to be able to detect when this might happen. A way to do this is through taint tracking, where we follow the flow of information by applying taint labels to data. In this paper, we describe TaintAssembly, a taint tracking engine for interpreted WebAssembly, that we have created by modifying the V8 JavaScript engine. We implement basic taint tracking functionality, taint in linear memory, and a probabilistic variant of taint. We then benchmark our TaintAssembly engine by incorporating it into a Chromium build and running it on custom test scripts and various real world WebAssembly applications. We find that our modifications to the V8 engine do not incur significant overhead with respect to vanilla V8's interpreted WebAssembly, making TaintAssembly suitable for development and debugging.
研究动机与目标
- 为解决 WebAssembly 缺乏动态污点追踪工具的问题,特别是在与 JavaScript 交互的背景下。
- 使开发人员能够在开发过程中检测到意外的数据流和潜在漏洞。
- 在不引入显著性能开销的前提下,实现对解释执行的 WebAssembly 的污点追踪。
- 支持函数参数、局部变量、线性内存以及概率性污点模型之间的污点传播。
- 评估在真实浏览器引擎(V8/Chromium)中实现污点追踪的可行性与性能表现。
提出的方法
- 修改 V8 的 WebAssembly 解释器,使用位向量污点追踪技术,对函数参数和局部变量进行污点标签追踪。
- 通过为内存位置维护独立的污点映射表,将污点追踪扩展至 WebAssembly 的线性内存,带来一定的运行时和内存开销。
- 实现了一种概率性污点模型,为每次操作分配一个污点传播概率,以减少内存使用,但牺牲了部分精度。
- 使用 8 位分辨率表示概率值,并通过 100,000 次迭代的哈希函数评估污点持久性。
- 将修改后的 V8 引擎集成至 Chromium 构建中,并在自定义脚本和真实世界的 WebAssembly 应用程序上进行基准测试。
- 对 V8 源代码进行追踪与调试,因主干分支不稳定,故选择稳定分支(chromium/3270)作为目标。
实验结果
研究问题
- RQ1是否可以在解释执行的 WebAssembly 中有效实现动态污点追踪,且不会带来不可接受的性能开销?
- RQ2污点在 WebAssembly 函数、局部变量和线性内存之间的传播行为如何?
- RQ3在真实浏览器引擎(如 V8)中,污点追踪的性能开销有多大?
- RQ4概率性污点追踪在减少内存使用的同时,对污点寿命的保持效果如何?
- RQ5污点追踪能否检测到 WebAssembly 与 JavaScript 之间的数据流,从而实现漏洞检测?
主要发现
- TaintAssembly 在真实世界的 WebAssembly 应用程序上仅带来 5–12% 的性能开销,相较于原生 V8,证明其在开发场景中具有实际可行性。
- 对函数参数和局部变量的基本污点追踪有效且开销极低。
- 线性内存中的污点追踪功能正常,但由于需要维护独立的污点映射表,带来了可测量的运行时和内存开销。
- 概率性污点追踪在传播概率低于 0.6 时,污点持久性急剧下降,在概率为 0.8 时约有 50% 的保留率。
- 通过包含 2700 个操作的哈希函数,污点传播行为近似于软正切函数,表明污点寿命具有可预测的衰减特性。
- 该实现成功支持了 WebAssembly 与 JavaScript 交互中的污点追踪,能够检测来自不受信任源的数据流。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。