arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.10517cs.CRcs.SE
收藏

以太坊字节码中自动化漏洞检测的演进:一项综合研究

Evolution of Automated Weakness Detection in Ethereum Bytecode: a Comprehensive Study

Monika di Angelo, Thomas Durieux, João F. Ferreira, Gernot Salzer

AI总结:

本研究基于以太坊主链全部已部署字节码构建的大规模数据集,分析12款漏洞检测工具的鲁棒性与检测演进情况,发现漏洞报告量随时间下降、工具检测能力存在不同程度退化。

摘要:

区块链程序(也称为智能合约)管理着加密货币和代币等高价值资产,并在去中心化金融(DeFi)和供应链管理等领域实现各类协议。这类应用需要极高的安全性,但由于公链的透明性,这一目标很难实现。目前已有大量工具可帮助开发者和审计人员完成漏洞检测工作。作为一项新兴技术,区块链及其相关工具发展迅速,使得工具和开发者都难以跟上其发展节奏。\n在本研究中,我们基于代表六年区块链活动的数据集,研究了代码分析工具的鲁棒性以及漏洞检测的演进情况。我们聚焦于以太坊——这一拥有最多开发者和已部署程序的加密生态系统。我们既研究了单个工具的检测行为,也分析了多款针对同类漏洞的工具之间的检测一致性。\n本研究是首个基于以太坊主链全部已部署字节码开展的研究。我们通过将具有相同骨架的字节码视为等价字节码,实现了这一覆盖范围。字节码的骨架是通过省略功能无关的部分得到的。这一方法将截至2022年1月以太坊上部署的4800万个合约缩减为248328个具有不同骨架的合约。为实现批量执行,我们利用了可简化Solidity智能合约分析的开源框架SmartBugs,并对其进行增强,使其也能接受字节码作为唯一输入。此外,我们还集成了另外6款字节码分析工具。本研究纳入的12款工具在该数据集上的执行共耗费了30个CPU年。尽管这些工具总共报告了1307486个潜在漏洞,但我们观察到,随着时间推移,报告的漏洞数量有所下降,同时不同工具的检测能力也出现了不同程度的退化。

英文摘要:

Blockchain programs (also known as smart contracts) manage valuable assets like cryptocurrencies and tokens, and implement protocols in domains like decentralized finance (DeFi) and supply-chain management. These types of applications require a high level of security that is hard to achieve due to the transparency of public blockchains. Numerous tools support developers and auditors in the task of detecting weaknesses. As a young technology, blockchains and utilities evolve fast, making it challenging for tools and developers to keep up with the pace. In this work, we study the robustness of code analysis tools and the evolution of weakness detection on a dataset representing six years of blockchain activity. We focus on Ethereum as the crypto ecosystem with the largest number of developers and deployed programs. We investigate the behavior of single tools as well as the agreement of several tools addressing similar weaknesses. Our study is the first that is based on the entire body of deployed bytecode on Ethereum's main chain. We achieve this coverage by considering bytecodes as equivalent if they share the same skeleton. The skeleton of a bytecode is obtained by omitting functionally irrelevant parts. This reduces the 48 million contracts deployed on Ethereum up to January 2022 to 248328 contracts with distinct skeletons. For bulk execution, we utilize the open-source framework SmartBugs that facilitates the analysis of Solidity smart contracts, and enhance it to accept also bytecode as the only input. Moreover, we integrate six further tools for bytecode analysis. The execution of the 12 tools included in our study on the dataset took 30 CPU years. While the tools report a total of 1307486 potential weaknesses, we observe a decrease in reported weaknesses over time, as well as a degradation of tools to varying degrees.

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

↑