SmartFast: an accurate and robust formal analysis tool for Ethereum smart contracts

被引:9
作者
Li, Zhaoxuan [1 ,2 ]
Lu, Siqi [3 ,4 ]
Zhang, Rui [1 ,2 ]
Xue, Rui [1 ,2 ]
Ma, Wenqiu [1 ,2 ]
Liang, Rujin [3 ,4 ]
Zhao, Ziming [5 ]
Gao, Sheng [6 ]
机构
[1] Chinese Acad Sci, Inst Informat Engn, State Key Lab Informat Secur, Beijing 100093, Peoples R China
[2] Univ Chinese Acad Sci, Sch Cyber Secur, Beijing 100049, Peoples R China
[3] Informat Engn Univ, Zhengzhou 450001, Peoples R China
[4] Henan Key Lab Network Cryptog Technol, Zhengzhou 450001, Peoples R China
[5] Zhejiang Univ, Coll Informat Sci & Elect Engn, Hangzhou 310027, Peoples R China
[6] Cent Univ Finance & Econ, Sch Informat, Beijing 100081, Peoples R China
基金
国家重点研发计划; 北京市自然科学基金; 中国国家自然科学基金;
关键词
Blockchain; Smart contracts; Solidity; Security vulnerability; Formal static analysis;
D O I
10.1007/s10664-022-10218-2
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:52
相关论文
共 41 条
  • [1] Beosin, 2020, BEOS BLOCKCH SEC ON
  • [2] Blockchain C, 2018, BAMBOO MORPHING SMAR
  • [3] Bocek T., 2018, Digital Marketplaces Unleashed, P169, DOI DOI 10.1007/978-3-662-49275-819
  • [4] SODA: A Generic Online Detection Framework for Smart Contracts
    Chen, Ting
    Cao, Rong
    Li, Ting
    Luo, Xiapu
    Gu, Guofei
    Zhang, Yufei
    Liao, Zhou
    Zhu, Hang
    Chen, Gang
    He, Zheyuan
    Tang, Yuxing
    Lin, Xiaodong
    Zhang, Xiaosong
    [J]. 27TH ANNUAL NETWORK AND DISTRIBUTED SYSTEM SECURITY SYMPOSIUM (NDSS 2020), 2020,
  • [5] SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses
    Choi, Jaeseung
    Kim, Doyeon
    Kim, Soomin
    Grieco, Gustavo
    Groce, Alex
    Cha, Sang Kil
    [J]. 2021 36TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING ASE 2021, 2021, : 227 - 239
  • [6] Corporation M, 2020, Z3 THEOR PROV
  • [7] DappHub, 2019, FORMAL VERIFICATION
  • [8] Empirical Review of Automated Analysis Tools on 47,587 Ethereum Smart Contracts
    Durieux, Thomas
    Ferreira, Joao F.
    Abreu, Rui
    Cruz, Pedro
    [J]. 2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020), 2020, : 530 - 541
  • [9] Etherscan, 2017, CONTR VER SOURC COD
  • [10] Slither: A Static Analysis Framework For Smart Contracts
    Feist, Josselin
    Greico, Gustavo
    Groce, Alex
    [J]. 2019 IEEE/ACM 2ND INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB 2019), 2019, : 8 - 15