SmartFast: an accurate and robust formal analysis tool for Ethereum smart contracts
【Author】 Li, Zhaoxuan; Lu, Siqi; Zhang, Rui; Xue, Rui; Ma, Wenqiu; Liang, Rujin; Zhao, Ziming; Gao, Sheng
【Source】EMPIRICAL SOFTWARE ENGINEERING
【影响因子】3.762
【Abstract】Recently, although state-of-the-art (SOTA) tools were designed and developed to analyze the vulnerabilities of smart contracts on Ethereum, security incidents caused by these vulnerabilities are still widespread. This can be attributed to the fact that each tool has various standards for judging the severity of vulnerabilities. More importantly, tools fail to identify all the vulnerabilities accurately and comprehensively as the evolution of vulnerabilities. To this end, we first propose a vulnerability assessment model to unify the vulnerability measurement standards. Next, we design a static analysis tool called SmartFast, which expresses the contract source code as a novel intermediate representation named SmartIR. Using preset rules and taint tracking technology, SmartFast matches SmartIR to locate the vulnerability code. Furthermore, SmartFast can recommend the optimization of the contract code automatically. Finally, we implement a prototype of SmartFast with 25K lines of code and compare it with 7 SOTA tools on three datasets (a total of 13,687 public contracts). The results indicate that SmartFast is efficient (only took a few seconds per contract) and robust (0.4% failure rate and resistance to the general code confusion methods). Besides, compared with other tools, SmartFast can detect more kinds of vulnerabilities (119) with a higher precision rate (98.43%) and a recall rate (85.12%), which confirms the conclusion of the theoretical analysis in the paper.
【Keywords】Blockchain; Smart contracts; Solidity; Security vulnerability; Formal static analysis
【发表时间】2022 DEC
【收录时间】2022-10-30
【文献类型】实证数据
【主题类别】
区块链治理-技术治理-智能合约漏洞检测
wangjiaxin
本文首先提出了一个统一漏洞度量标准的漏洞评估模型。接下来,我们设计了一个名为SmartFast的静态分析工具,它将契约源代码表示为一种新的中间表示形式SmartIR。SmartFast通过预先设定的规则和污染跟踪技术,匹配SmartIR来定位漏洞代码。此外,SmartFast还可以自动推荐合同代码的优化。最后,我们用25K行代码实现了一个SmartFast的原型,并在三个数据集(共13687个公共契约)上与7个SOTA工具进行了比较。结果表明SmartFast是高效的(每个契约只需要几秒钟)和健壮的(失败率0.4%,抵抗一般代码混淆方法)。此外,与其他工具相比,SmartFast可以检测到更多种类的漏洞(119),准确率(98.43%)和召回率(85.12%)更高,证实了本文理论分析的结论。
回复