Cross-Contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts

被引:55
|
作者
Xue, Yinxing [1 ]
Ma, Mingliang [1 ]
Lin, Yun [2 ]
Sui, Yulei [3 ]
Ye, Jiaming [1 ]
Peng, Tianyong [1 ]
机构
[1] Univ Sci & Technol China, Hefei, Peoples R China
[2] Natl Univ Singapore, Singapore, Singapore
[3] Univ Technol Sydney, Sydney, NSW, Australia
基金
澳大利亚研究理事会; 中国国家自然科学基金;
关键词
reentrancy vulnerabilities; static taint analysis; cross-contract analysis; smart contracts;
D O I
10.1145/3324884.3416553
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Reentrancy bugs, one of the most severe vulnerabilities in smart contracts, have caused huge financial loss in recent years. Researchers have proposed many approaches to detecting them. However, empirical studies have shown that these approaches suffer from undesirable false positives and false negatives, when the code under detection involves the interaction between multiple smart contracts. In this paper, we propose an accurate and efficient cross-contract reentrancy detection approach in practice. Rather than design rule-of-thumb heuristics, we conduct a large empirical study of 11714 real-world contracts from Etherscan against three well-known general-purpose security tools for reentrancy detection. We manually summarized the reentrancy scenarios where the state-of-the-art approaches cannot address. Based on the empirical evidence, we present CLAIRVOYANCE, a cross-function and cross-contract static analysis to detect reentrancy vulnerabilities in real world with significantly higher accuracy. To reduce false negatives, we enable, for the first time, a cross-contract call chain analysis by tracking possibly tainted paths. To reduce false positives, we systematically summarized five major path protective techniques (PPTs) to support fast yet precise path feasibility checking. We implemented our approach and compared CLAIRVOYANCE with five state-of-the-art tools on 17770 real-worlds contracts. The results show that CLAIRVOYANCE yields the best detection accuracy among all the five tools and also finds 101 unknown reentrancy vulnerabilities.
引用
收藏
页码:1029 / 1040
页数:12
相关论文
共 50 条
  • [31] Static Analysis Method for Detecting Buffer Overflow Vulnerabilities
    F. M. Puchkov
    K. A. Shapchenko
    Programming and Computer Software, 2005, 31 : 179 - 189
  • [32] A static analysis framework for detecting SQL injection vulnerabilities
    Fu, Xiang
    Lu, Xin
    Peltsverger, Boris
    Chen, Shijun
    Qian, Kai
    Tao, Lixin
    COMPSAC 2007: THE THIRTY-FIRST ANNUAL INTERNATIONAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE, VOL I, PROCEEDINGS, 2007, : 87 - +
  • [33] Detecting Software Vulnerabilities in Android Using Static Analysis
    Dhaya, R.
    Poongodi, M.
    2014 INTERNATIONAL CONFERENCE ON ADVANCED COMMUNICATION CONTROL AND COMPUTING TECHNOLOGIES (ICACCCT), 2014, : 915 - 918
  • [34] Machine learning methods for detecting smart contracts vulnerabilities within Ethereum blockchain - A review
    Crisostomo, Joao
    Bacao, Fernando
    Lobo, Victor
    EXPERT SYSTEMS WITH APPLICATIONS, 2025, 268
  • [35] Slither: A Static Analysis Framework For Smart Contracts
    Feist, Josselin
    Greico, Gustavo
    Groce, Alex
    2019 IEEE/ACM 2ND INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB 2019), 2019, : 8 - 15
  • [36] SmartCheck: Static Analysis of Ethereum Smart Contracts
    Tikhomirov, Sergei
    Voskresenskaya, Ekaterina
    Ivanitskiy, Ivan
    Takhaviev, Ramil
    Marchenko, Evgeny
    Alexandrov, Yaroslav
    2018 IEEE/ACM 1ST INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB), 2018, : 9 - 16
  • [37] Modelling And Simulation For Detecting Vulnerabilities And Security Threats Of Smart Contracts Using Machine Learning
    Mughaid, Ala
    Obeidat, Ibrahim
    Shdaifat, Andaleeb
    Alhayjna, Razan
    AlZu'bi, Shadi
    2023 EIGHTH INTERNATIONAL CONFERENCE ON FOG AND MOBILE EDGE COMPUTING, FMEC, 2023, : 123 - 127
  • [38] Running on Fumes Preventing Out-of-Gas Vulnerabilities in Ethereum Smart Contracts Using Static Resource Analysis
    Albert, Elvira
    Gordillo, Pablo
    Rubio, Albert
    Sergey, Ilya
    VERIFICATION AND EVALUATION OF COMPUTER AND COMMUNICATION SYSTEMS, VECOS 2019, 2019, 11847 : 63 - 78
  • [39] SECURIFY: Practical Security Analysis of Smart Contracts
    Tsankov, Petar
    Dan, Andrei
    Drachsler-Cohen, Dana
    Gervais, Arthur
    Bunzli, Florian
    Vechev, Martin
    PROCEEDINGS OF THE 2018 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY (CCS'18), 2018, : 67 - 82
  • [40] OC-Detector: Detecting Smart Contract Vulnerabilities Based on Clustering Opcode Instructions
    Gu, Xiguo
    Zheng, Liwei
    Yang, Huiwen
    Liu, Shifan
    Cui, Zhanqi
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2023, 33 (11N12) : 1673 - 1700