一句话:通过可扩展框架 SmartBugs 对 9 个分析工具做大规模实证评估,揭示智能合约漏洞检测精度低与假阳性严重。
为应对以太坊智能合约自动化分析、测试与调试研究难以比较与复现的问题,本文提出可扩展执行框架 SmartBugs,并构建两个数据集:69 个标注漏洞合约的精度评估集,以及 Etherscan 上含 Solidity 源码的全部 47,518 个合约。作者用 SmartBugs 运行 9 个先进工具,共执行 428,337 次分析,耗时约 564 天 3 小时。结果显示,标注漏洞中仅 42% 被所有工具检出,Mythril 准确率最高(27%);在最大数据集上 97% 合约被标为有漏洞,提示大量假阳性,且仅少数漏洞、仅两类能被四个及以上工具同时检出。
Over the last few years, there has been substantial research on automated analysis, testing, and debugging of Ethereum smart contracts. However, it is not trivial to compare and reproduce that research. To address this, we present an empirical evaluation of 9 state-of-the-art automated analysis tools using two new datasets: i) a dataset of 69 annotated vulnerable smart contracts that can be used to evaluate the precision of analysis tools; and ii) a dataset with all the smart contracts in the Ethereum Blockchain that have Solidity source code available on Etherscan (a total of 47,518 contracts). The datasets are part of SmartBugs, a new extendable execution framework that we created to facilitate the integration and comparison between multiple analysis tools and the analysis of Ethereum smart contracts. We used SmartBugs to execute the 9 automated analysis tools on the two datasets. In total, we ran 428,337 analyses that took approximately 564 days and 3 hours, being the largest experimental setup to date both in the number of tools and in execution time. We found that only 42% of the vulnerabilities from our annotated dataset are detected by all the tools, with the tool Mythril having the higher accuracy (27%). When considering the largest dataset, we observed that 97% of contracts are tagged as vulnerable, thus suggesting a considerable number of false positives. Indeed, only a small number of vulnerabilities (and of only two categories) were detected simultaneously by four or more tools.