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 条
  • [21] VulHunter: An Automated Vulnerability Detection System Based on Deep Learning and Bytecode
    Guo, Ning
    Li, Xiaoyong
    Yin, Hui
    Gao, Yali
    INFORMATION AND COMMUNICATIONS SECURITY (ICICS 2019), 2020, 11999 : 199 - 218
  • [22] Automated Smart Contract Vulnerability Detection using Fine-tuned Large Language Models
    Yang, Zhiju
    Man, Gaoyuan
    Yue, Songqing
    6TH INTERNATIONAL CONFERENCE ON BLOCKCHAIN TECHNOLOGY AND APPLICATIONS, ICBTA 2023, 2023, : 19 - 23
  • [23] Democratization of Smart Contracts: A Prototype for Automated Contract Generation
    Franz, Felix
    Fertig, Tobias
    Schuetz, Andreas E.
    2020 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN AND CRYPTOCURRENCY (IEEE ICBC), 2020,
  • [24] Automated Fabric Defect Detection
    Bandara, Prasanna
    Bandara, Thilan
    Ranatunga, Tharaka
    Vimarshana, Vibodha
    Sooriyaarachchi, Sulochana
    De Silva, Chathura
    2018 18TH INTERNATIONAL CONFERENCE ON ADVANCES IN ICT FOR EMERGING REGIONS (ICTER) CONFERENCE PROCEEDINGS, 2018, : 119 - 125
  • [25] A Proxy -Layer Approach to Secure Smart Contract Deployment on Private EVM-Based PoA Blockchains
    Wang, Yonghao
    Alit, Jahid
    Arshadi, Junaid
    Liu, Yunxia
    2023 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN, BLOCKCHAIN, 2023, : 109 - 112
  • [26] CrossFuzz: Cross-contract fuzzing for smart contract vulnerability detection
    Yang, Huiwen
    Gu, Xiguo
    Chen, Xiang
    Zheng, Liwei
    Cui, Zhanqi
    SCIENCE OF COMPUTER PROGRAMMING, 2024, 234
  • [27] Smart Contract Vulnerability Detection Technique: A Survey
    Qian P.
    Liu Z.-G.
    He Q.-M.
    Huang B.-T.
    Tian D.-Z.
    Wang X.
    Ruan Jian Xue Bao/Journal of Software, 2022, 33 (08): : 3059 - 3085
  • [28] Correctness Detection of Smart Contract Based on Fuzzing
    Wang, Jiacheng
    Jiang, Jiajia
    Zhao, Jiahao
    Zhang, Yushu
    Wang, Liangmin
    Computer Engineering and Applications, 2024, 60 (05) : 307 - 320
  • [29] Automated Generation of Test Cases for Smart Contract Security Analyzers
    Kim, Ki Byung
    Lee, Jonghyup
    IEEE ACCESS, 2020, 8 : 209377 - 209392
  • [30] SmartMeasurer: A Secure and Automated Bandwidth Measurement for Tor with Smart Contract
    Tang, Zejia
    Pan, Tianyao
    Han, Yang
    Shen, Tongzhou
    Xu, Lei
    Xu, Dawei
    MATHEMATICS, 2023, 11 (19)