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] Detecting Rug-Pull: Analyzing Smart Contract Backdoor Codes in Ethereum
    Yu, Kwan Woo
    Lee, Byung Mun
    APPLIED SCIENCES-BASEL, 2025, 15 (01):
  • [42] Smart contract anomaly detection: The Contrastive Learning Paradigm
    Fadi, Oumaima
    Bahaj, Adil
    Zkik, Karim
    El Ghazi, Abdellatif
    Ghogho, Mounir
    Boulmalf, Mohammed
    COMPUTER NETWORKS, 2025, 260
  • [43] Smart Contract Vulnerability Detection Techniques for Hyperledger Fabric
    Centre for Development of Advanced Computing, Applied Artificial Intelligence Group, Maharashtra, Pune, India
    IEEE Int. Conf. Converg. Technol., I2CT, 2023,
  • [44] Vulnerable Smart Contract Detection by means of Model Checking
    Crincoli, Giuseppe
    Iadarola, Giacomo
    La Rocca, Piera Elena
    Martinelli, Fabio
    Mercaldo, Francesco
    Santone, Antonella
    BSCI'22: PROCEEDINGS OF THE FOURTH ACM INTERNATIONAL SYMPOSIUM ON BLOCKCHAIN AND SECURE CRITICAL INFRASTRUCTURE, 2022, : 3 - 10
  • [45] A Survey of Vulnerability Detection Techniques by Smart Contract Tools
    Khan, Zulfiqar Ali
    Namin, Akbar Siami
    IEEE ACCESS, 2024, 12 : 70870 - 70910
  • [46] Automated generation of smart contract code from legal contract specifications with SYMBOLEO2SC
    Rasti, Aidin
    Anda, Amal Ahmed
    Alfuhaid, Sofana
    Parvizimosaed, Alireza
    Amyot, Daniel
    Roveri, Marco
    Logrippo, Luigi
    Mylopoulos, John
    SOFTWARE AND SYSTEMS MODELING, 2024,
  • [47] Smart contract vulnerability detection combined with multi-objective detection
    Zhang, Lejun
    Wang, Jinlong
    Wang, Weizheng
    Jin, Zilong
    Su, Yansen
    Chen, Huiling
    COMPUTER NETWORKS, 2022, 217
  • [48] Towards Auto Contract Generation and Ensemble-based Smart Contract Vulnerability Detection
    Puducherry, K. Lakshminarayana
    Puducherry, K. Sathiyamurthy
    INTERNATIONAL JOURNAL OF ELECTRICAL AND COMPUTER ENGINEERING SYSTEMS, 2022, 13 (09) : 747 - 757
  • [49] Toward cognitive support for automated defect detection
    Ehab Essa
    M. Shamim Hossain
    A. S. Tolba
    Hazem M. Raafat
    Samir Elmogy
    Ghulam Muahmmad
    Neural Computing and Applications, 2020, 32 : 4325 - 4333
  • [50] Automated pantograph dynamic testing and defect detection
    Tucker, G.
    Faham, H.
    Parsa, S.
    Antunes, P.
    MECHANISM AND MACHINE THEORY, 2025, 209