Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum
Zibin Zheng, Neng Zhang, Jianzhong Su, Zhijie Zhong, Mingxi Ye, Jiachi Chen
摘要
Smart contracts are programs deployed on a blockchain and are immutable once deployed. Reentrancy, one of the most important vulnerabilities in smart contracts, has caused millions of dollars in financial loss. Many reentrancy detection approaches have been proposed. It is necessary to investigate the performance of these approaches to provide useful guidelines for their application. In this work, we conduct a large-scale empirical study on the capability of five well-known or recent reentrancy detection tools such as Mythril and Sailfish. We collect 230,548 verified smart contracts from Etherscan and use detection tools to analyze 139,424 contracts after deduplication, which results in 21,212 contracts with reentrancy issues. Then, we manually examine the defective functions located by the tools in the contracts. From the examination results, we obtain 34 true positive contracts with reentrancy and 21,178 false positive contracts without reentrancy. We also analyze the causes of the true and false positives. Finally, we evaluate the tools based on the two kinds of contracts. The results show that more than 99.8% of the reentrant contracts detected by the tools are false positives with eight types of causes, and the tools can only detect the reentrancy issues caused by call.value(), 58.8% of which can be revealed by the Ethereum's official IDE, Remix. Furthermore, we collect real-world reentrancy attacks reported in the past two years and find that the tools fail to find any issues in the corresponding contracts. Based on the findings, existing works on reentrancy detection appear to have very limited capability, and researchers should turn the rudder to discover and detect new reentrancy patterns except those related to call.value().
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Enhancing the Open Network: Definition and Automated Detection of Smart Contract Defects 引用了 Making Smart Contracts Smarter
- Enhancing the Open Network: Definition and Automated Detection of Smart Contract Defects 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Enhancing the Open Network: Definition and Automated Detection of Smart Contract Defects 引用了 Securify: Practical Security Analysis of Smart Contracts
- Identifying Smart Contract Security Issues in Code Snippets from Stack Overflow 引用了 Making Smart Contracts Smarter
- Identifying Smart Contract Security Issues in Code Snippets from Stack Overflow 引用了 Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts
- Identifying Smart Contract Security Issues in Code Snippets from Stack Overflow 引用了 Securify: Practical Security Analysis of Smart Contracts
- ZEUS: Analyzing Safety of Smart Contracts 引用了 Making Smart Contracts Smarter
- Are We There Yet? Unraveling the State-of-the-Art Smart Contract Fuzzers 引用了 Making Smart Contracts Smarter
- Are We There Yet? Unraveling the State-of-the-Art Smart Contract Fuzzers 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Are We There Yet? Unraveling the State-of-the-Art Smart Contract Fuzzers 引用了 Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts 引用了 Making Smart Contracts Smarter
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- sFuzz: an efficient adaptive fuzzer for solidity smart contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
- sFuzz: an efficient adaptive fuzzer for solidity smart contracts 引用了 Making Smart Contracts Smarter
- Uncover the Premeditated Attacks: Detecting Exploitable Reentrancy Vulnerabilities by Identifying Attacker Contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
- Uncover the Premeditated Attacks: Detecting Exploitable Reentrancy Vulnerabilities by Identifying Attacker Contracts 引用了 Making Smart Contracts Smarter
- Uncover the Premeditated Attacks: Detecting Exploitable Reentrancy Vulnerabilities by Identifying Attacker Contracts 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Uncover the Premeditated Attacks: Detecting Exploitable Reentrancy Vulnerabilities by Identifying Attacker Contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts 引用了 Making Smart Contracts Smarter
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
引用它的顶会 Paper11
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart ContractsZexu Wang, Jiachi Chen, Yanlin Wang, Yu Zhang 等FSE 2024 · 27 次引用
- Are We There Yet? Unraveling the State-of-the-Art Smart Contract FuzzersShuohan Wu, Zihao Li, Luyi Yan, Weimin Chen 等ICSE 2024 · 24 次引用
- Uncover the Premeditated Attacks: Detecting Exploitable Reentrancy Vulnerabilities by Identifying Attacker ContractsShuo Yang, Jiachi Chen, Mingyuan Huang, Zibin Zheng 等ICSE 2024 · 24 次引用
- Identifying Smart Contract Security Issues in Code Snippets from Stack OverflowJiachi Chen, Chong Chen, Jiang Hu, John C. Grundy 等ISSTA 2024 · 9 次引用
- Enhancing the Open Network: Definition and Automated Detection of Smart Contract DefectsHao Song, Teng Li, Jiachi Chen, Ting Chen 等ICSE 2025 · 5 次引用
它引用的 Paper9
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena 等CCS 2016 · 2,306 次引用
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais 等CCS 2018 · 1,108 次引用
- ZEUS: Analyzing Safety of Smart ContractsSukrit Kalra, Seep Goel, Mohan Dhawan, Subodh SharmaNDSS 2018 · 595 次引用
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contractsThomas Durieux, João F. Ferreira, Rui Abreu, Pedro CruzICSE 2020 · 373 次引用
- sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin 等ICSE 2020 · 260 次引用
相关 Paper
- Cross-Contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart ContractsYinxing Xue, Mingliang Ma, Yun Lin, Yulei Sui 等ASE 2020 · 77 次引用
- SAILFISH: Vetting Smart Contract State-Inconsistency Bugs in SecondsPriyanka Bose, Dipanjan Das, Yanju Chen, Yu Feng 等S&P 2022 · 142 次引用
- AdvSCanner: Generating Adversarial Smart Contracts to Exploit Reentrancy Vulnerabilities Using LLM and Static AnalysisYin Wu, Xiaofei Xie, Chenyang Peng, Dijun Liu 等ASE 2024 · 9 次引用
- Verifying Smart Contract Security against Re-entrancy Attacks through Relational Value AnalysisDivya Rathore, Kartik NagarFSE 2026
- Silence False Alarms: Identifying Anti-Reentrancy Patterns on Ethereum to Refine Smart Contract Reentrancy DetectionQiyang Song, Heqing Huang, Xiaoqi Jia, Yuanbo Xie 等NDSS 2025
