论文标题
confuzzius:智能合约的数据依赖性感知混合杂种器
ConFuzzius: A Data Dependency-Aware Hybrid Fuzzer for Smart Contracts
论文作者
论文摘要
智能合约是在区块链上执行的图灵完整程序。与传统程序不同,一旦部署,它们就无法修改。随着智能合约具有更多的价值,它们成为攻击者的激动人心的目标。在过去的几年中,由于简单的编程错误,他们遭受了数百万美元的损失。结果,已经提出了各种检测错误的工具。这些工具中的大多数都依赖于符号执行,这可能会由于过度评价而产生误报。最近,已经提出了许多模糊器来检测智能合约中的错误。但是,这些往往更有效地发现浅虫子,并且在寻找处于执行深处的错误方面较不效率,从而达到低代码覆盖范围和许多虚假负面因素。事实证明,在传统计划中取得良好结果的另一种选择是混合模糊,象征性执行和模糊的结合。在这项工作中,我们研究了有关智能合约的混合模糊,并现在是第一个用于智能合约的混合杂物。 cunduzus使用进化模糊来行使智能合约和约束解决方案的浅部分,以产生能够满足复杂条件的输入,从而阻止进化的模糊探索更深的部分。此外,Cunduzzius利用动态数据依赖性分析有效地生成交易序列,这些序列更有可能导致可能隐藏错误的合同状态。我们通过将其与最先进的符号执行工具和智能合约的模糊器进行比较来评估concuzus的有效性。我们对128个合同和21K现实世界合同的策划数据集的评估表明,我们的混合动力方法检测到更多的错误(高达23%),而在代码覆盖范围(最高69%)方面表现出色(最高69%),并且数据依赖性分析提高了错误检测高达18%。
Smart contracts are Turing-complete programs that are executed across a blockchain. Unlike traditional programs, once deployed, they cannot be modified. As smart contracts carry more value, they become more of an exciting target for attackers. Over the last years, they suffered from exploits costing millions of dollars due to simple programming mistakes. As a result, a variety of tools for detecting bugs have been proposed. Most of these tools rely on symbolic execution, which may yield false positives due to over-approximation. Recently, many fuzzers have been proposed to detect bugs in smart contracts. However, these tend to be more effective in finding shallow bugs and less effective in finding bugs that lie deep in the execution, therefore achieving low code coverage and many false negatives. An alternative that has proven to achieve good results in traditional programs is hybrid fuzzing, a combination of symbolic execution and fuzzing. In this work, we study hybrid fuzzing on smart contracts and present ConFuzzius, the first hybrid fuzzer for smart contracts. ConFuzzius uses evolutionary fuzzing to exercise shallow parts of a smart contract and constraint solving to generate inputs that satisfy complex conditions that prevent evolutionary fuzzing from exploring deeper parts. Moreover, ConFuzzius leverages dynamic data dependency analysis to efficiently generate sequences of transactions that are more likely to result in contract states in which bugs may be hidden. We evaluate the effectiveness of ConFuzzius by comparing it with state-of-the-art symbolic execution tools and fuzzers for smart contracts. Our evaluation on a curated dataset of 128 contracts and 21K real-world contracts shows that our hybrid approach detects more bugs (up to 23%) while outperforming state-of-the-art in terms of code coverage (up to 69%), and that data dependency analysis boosts bug detection up to 18%.