DefectChecker: Automated Smart Contract Defect Detection by Analyzing EVM Bytecode

被引:53
作者
Chen, Jiachi [1 ]
Xia, Xin [1 ]
Lo, David [2 ]
Grundy, John [1 ]
Luo, Xiapu [3 ]
Chen, Ting [4 ]
机构
[1] Monash Univ, Fac Informat Technol, Clayton, Vic 3800, Australia
[2] Singapore Management Univ, Sch Informat Syst, Singapore 188065, Singapore
[3] Hong Kong Polytech Univ, Dept Comp, Hung Hom, Hong Kong, Peoples R China
[4] Univ Elect Sci & Technol China, Sch Comp Sci & Engn, Chengdu 610054, Peoples R China
基金
国家重点研发计划; 中国国家自然科学基金; 澳大利亚研究理事会;
关键词
Smart contracts; Blockchain; Tools; Computer bugs; Computer hacking; Virtual machining; Organizations; ethereum; contract defects detection; bytecode analyze; symbolic execution;
D O I
10.1109/TSE.2021.3054928
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Smart contracts are Turing-complete programs running on the blockchain. They are immutable and cannot be modified, even when bugs are detected. Therefore, ensuring smart contracts are bug-free and well-designed before deploying them to the blockchain is extremely important. A contract defect is an error, flaw or fault in a smart contract that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. Detecting and removing contract defects can avoid potential bugs and make programs more robust. Our previous work defined 20 contract defects for smart contracts and divided them into five impact levels. According to our classification, contract defects with seriousness level between 1-3 can lead to unwanted behaviors, e.g., a contract being controlled by attackers. In this paper, we propose DefectChecker, a symbolic execution-based approach and tool to detect eight contract defects that can cause unwanted behaviors of smart contracts on the Ethereum blockchain platform. DefectChecker can detect contract defects from smart contracts' bytecode. We verify the performance of DefectChecker by applying it to an open-source dataset. Our evaluation results show that DefectChecker obtains a high F-score (88.8 percent in the whole dataset) and only requires 0.15s to analyze one smart contract on average. We also applied DefectChecker to 165,621 distinct smart contracts on the Ethereum platform. We found that 25,815 of these smart contracts contain at least one of the contract defects that belongs to impact level 1-3, including some real-world attacks.
引用
收藏
页码:2189 / 2207
页数:19
相关论文
共 50 条
[41]   Smart contract vulnerability detection combined with multi-objective detection [J].
Zhang, Lejun ;
Wang, Jinlong ;
Wang, Weizheng ;
Jin, Zilong ;
Su, Yansen ;
Chen, Huiling .
COMPUTER NETWORKS, 2022, 217
[42]   Eth2Vec: Learning contract-wide code representations for vulnerability detection on Ethereum smart contracts [J].
Ashizawa, Nami ;
Yanai, Naoto ;
Cruz, Jason Paul ;
Okamura, Shingo .
BLOCKCHAIN-RESEARCH AND APPLICATIONS, 2022, 3 (04)
[43]   Smart Contract Vulnerability Detection Method Based on Feature Graph and Multiple Attention Mechanisms [J].
He, Zhenxiang ;
Zhao, Zhenyu ;
Chen, Ke ;
Liu, Yanlin .
CMC-COMPUTERS MATERIALS & CONTINUA, 2024, 79 (02) :3023-3045
[44]   Unity is Strength: Enhancing Precision in Reentrancy Vulnerability Detection of Smart Contract Analysis Tools [J].
Wang, Zexu ;
Chen, Jiachi ;
Zheng, Peilin ;
Zhang, Yu ;
Zhang, Weizhe ;
Zheng, Zibin .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2025, 51 (01) :1-13
[45]   NDLSC: A New Deep Learning-based Approach to Smart Contract Vulnerability Detection [J].
Xiong Zenggang ;
Lou Qiangqiang ;
Li Youfeng ;
Chen Hao ;
Zhang Xuemin ;
Li Yuan ;
Li Jing .
Journal of Signal Processing Systems, 2025, 97 (1) :49-68
[46]   Automated Gateways: A Smart Contract-Powered Solution for Interoperability Across Blockchains [J].
Khorasani, Koosha Esmaeilzadeh ;
Rouhani, Sara ;
Pan, Rui ;
Pourheidari, Vahid .
2024 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN, BLOCKCHAIN 2024, 2024, :611-618
[47]   QuadraCode AI: Smart Contract Vulnerability Detection with Multimodal Representation [J].
Upadhya, Jiblal ;
Upadhyay, Kritagya ;
Sainju, Arpan ;
Poudel, Samir ;
Hasan, Md Nahid ;
Poudel, Khem ;
Ranganathan, Jaishree .
2024 33RD INTERNATIONAL CONFERENCE ON COMPUTER COMMUNICATIONS AND NETWORKS, ICCCN 2024, 2024,
[48]   EtherProv: provenance-aware detection, analysis, and mitigation of Ethereum smart contract security issues [J].
Linoy, Shlomi ;
Ray, Suprio ;
Stakhanova, Natalia .
2021 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN (BLOCKCHAIN 2021), 2021, :11-20
[49]   A Systematic Review and Performance Evaluation of Open-Source Tools for Smart Contract Vulnerability Detection [J].
He, Yaqiong ;
Fan, Jinlin ;
Wu, Huaiguang .
CMC-COMPUTERS MATERIALS & CONTINUA, 2024, 80 (01) :995-1032
[50]   Park: Accelerating Smart Contract Vulnerability Detection via Parallel-Fork Symbolic Execution [J].
Zheng, Peilin ;
Zheng, Zibin ;
Luo, Xiapu .
PROCEEDINGS OF THE 31ST ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2022, 2022, :740-751