arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2312.04512cs.CR
收藏

MuFuzz:面向区块链智能合约模糊测试的序列感知变异与种子掩码引导

MuFuzz: Sequence-Aware Mutation and Seed Mask Guidance for Blockchain Smart Contract Fuzzing

Peng Qian, Hanjie Wu, Zeren Du, Turan Vural, Dazhong Rong, Zheng Cao, Lun Zhang, Yanbin Wang, Jianhai Chen, Qinming He

AI总结:

针对智能合约模糊测试难以生成有效交易序列和关键输入的问题,本文提出 MuFuzz,融合序列感知变异、掩码引导种子变异与动态自适应能量调整,在分支覆盖和漏洞检测上显著优于现有工具。

摘要:

随着区块链智能合约变得愈发普及并承载更多有价值的数字资产,它们日益成为攻击者极具吸引力的目标。过去几年间,智能合约遭受了大量毁灭性攻击,造成数十亿美元的经济损失。识别智能合约缺陷的研究兴趣显著升温。然而,现有智能合约模糊测试工具仍不能令人满意。它们难以筛选出有意义的交易序列,也难以为每笔交易指定关键输入。因此,这些工具只能触发范围有限的合约状态,难以揭示隐藏在深层状态空间中的复杂漏洞。本文通过采用序列感知变异与种子掩码引导策略来阐明智能合约模糊测试。具体而言,我们首先利用基于数据流的反馈,以有意义的方式确定交易顺序,并进一步引入序列感知变异技术以探索更深层状态。随后,我们设计了一种掩码引导的种子变异策略,使生成的交易输入偏向命中目标分支。此外,我们开发了一种动态自适应能量调整范式,在模糊测试活动期间平衡模糊测试资源分配。我们将这些设计实现为名为 MuFuzz 的新型智能合约模糊器,并在三个基准上进行广泛评估。实证结果表明,MuFuzz 在分支覆盖率和缺陷发现方面均优于现有工具。总体而言,MuFuzz 相比最先进的模糊器实现了更高的分支覆盖率(最高达25%),并且比现有缺陷检测器多检测出30%的缺陷。

英文摘要:

As blockchain smart contracts become more widespread and carry more valuable digital assets, they become an increasingly attractive target for attackers. Over the past few years, smart contracts have been subject to a plethora of devastating attacks, resulting in billions of dollars in financial losses. There has been a notable surge of research interest in identifying defects in smart contracts. However, existing smart contract fuzzing tools are still unsatisfactory. They struggle to screen out meaningful transaction sequences and specify critical inputs for each transaction. As a result, they can only trigger a limited range of contract states, making it difficult to unveil complicated vulnerabilities hidden in the deep state space. In this paper, we shed light on smart contract fuzzing by employing a sequence-aware mutation and seed mask guidance strategy. In particular, we first utilize data-flow-based feedback to determine transaction orders in a meaningful way and further introduce a sequence-aware mutation technique to explore deeper states. Thereafter, we design a mask-guided seed mutation strategy that biases the generated transaction inputs to hit target branches. In addition, we develop a dynamic-adaptive energy adjustment paradigm that balances the fuzzing resource allocation during a fuzzing campaign. We implement our designs into a new smart contract fuzzer named MuFuzz, and extensively evaluate it on three benchmarks. Empirical results demonstrate that MuFuzz outperforms existing tools in terms of both branch coverage and bug finding. Overall, MuFuzz achieves higher branch coverage than state-of-the-art fuzzers (up to 25%) and detects 30% more bugs than existing bug detectors.

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

↑