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%.
翻译:智能合同是跨链链执行的图灵式完整程序。 与传统的程序不同, 一旦部署, 就无法修改它们。 由于智能合同的价值更高, 智能合同对袭击者来说更是一种令人振奋的目标。 过去几年来, 它们由于简单的编程错误而花费了数百万美元。 结果, 提出了各种检测错误的工具。 这些工具大多依靠象征性执行, 可能因为过度协调而产生虚假的正面效果。 最近, 许多模糊器被提议在智能合同中检测错误。 但是, 这些模糊器在发现浅的错误时会更加有效, 并且对袭击者来说, 它们会变得更加不那么有效。 由于简单的编程错误, 过去几年来, 它们由于简单的编程, 它们会因为简单的程序取得了好的结果是混杂的模糊、 象征性执行和模糊。 在这项工作中, 我们研究智能合同的混合模糊性, 并提交“ ConFuzzius ” 。 在智能合同中, 使用进化的初始的模糊性评估, 使用进化式的模糊性评估, 以进行浅度的合同和约束性部分, 因此, 进化的数据序列分析会显示“ ” 。 在动态数据序列中, 进进化数据分析中, 进化数据序列中, 进式数据分析中, 进化数据序列分析会显示, 进化数据序列的推算出, 进式的推算出, 进式的推算出, 进式的推算出, 进式的逻辑性分析, 。