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 条
  • [31] Automated Repair of Smart Contract Vulnerabilities: A Systematic Literature Review
    Kiani, Rasoul
    Sheng, Victor S.
    ELECTRONICS, 2024, 13 (19)
  • [32] Toward Automated Detecting Unanticipated Price Feed in Smart Contract
    Mo, Yifan
    Chen, Jiachi
    Wang, Yanlin
    Zheng, Zibin
    PROCEEDINGS OF THE 32ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2023, 2023, : 1257 - 1268
  • [33] Enhancing Automated Defect Detection in Collagen Based Manufacturing by Employing a Smart Machine Vision Technique
    Williams, Christopher D.
    Paul, Manoranjan
    Debnath, Tanmoy
    IMAGE AND VIDEO TECHNOLOGY - PSIVT 2015 WORKSHOPS, 2016, 9555 : 155 - 166
  • [34] EVM-Shield: In-Contract State Access Control for Fast Vulnerability Detection and Prevention
    Zhang, Xiaoli
    Sun, Wenxiang
    Xu, Zhicheng
    Cheng, Hongbing
    Cai, Chengjun
    Cui, Helei
    Li, Qi
    IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY, 2024, 19 : 2517 - 2532
  • [35] Fine-grained smart contract vulnerability detection by heterogeneous code feature learning and automated dataset construction
    Cai, Jie
    Li, Bin
    Zhang, Tao
    Zhang, Jiale
    Sun, Xiaobing
    JOURNAL OF SYSTEMS AND SOFTWARE, 2024, 209
  • [36] Automated grading and defect detection: A review
    Pham, DT
    Alcock, RJ
    FOREST PRODUCTS JOURNAL, 1998, 48 (04) : 34 - 42
  • [37] A bytecode-based integrated detection and repair method for reentrancy vulnerabilities in smart contracts
    Feng Z.
    Feng Y.
    He H.
    Zhang W.
    Zhang Y.
    IET Blockchain, 2024, 4 (03): : 235 - 251
  • [38] Smart proctoring with automated anomaly detection
    Wang, Pu
    Lin, Yifeng
    Zhao, Tiesong
    EDUCATION AND INFORMATION TECHNOLOGIES, 2024,
  • [39] Trust-Based Smart Contract for Automated Agent to Agent Communication
    Mhamdi, Halima
    Soufiene, Ben Othman
    Zouinkhi, Ahmed
    Ali, Obaid
    Sakli, Hedi
    COMPUTATIONAL INTELLIGENCE AND NEUROSCIENCE, 2022, 2022
  • [40] Automated Demand Response Framework in ELNs: Decentralized Scheduling and Smart Contract
    Yang, Xiaodong
    Wang, Guofeng
    He, Haibo
    Lu, Junjie
    Zhang, Youbing
    IEEE TRANSACTIONS ON SYSTEMS MAN CYBERNETICS-SYSTEMS, 2020, 50 (01): : 58 - 72