eTainter: detecting gas-related vulnerabilities in smart contracts
Asem Ghaleb, Julia Rubin, Karthik Pattabiraman
摘要
The execution of smart contracts on the Ethereum blockchain consumes gas paid for by users submitting contracts' invocation requests. A contract execution proceeds as long as the users dedicate enough gas, within the limit set by Ethereum. If insufficient gas is provided, the contract execution halts and changes made during execution get reverted. Unfortunately, contracts may contain code patterns that increase execution cost, causing the contracts to run out of gas. These patterns can be manipulated by malicious attackers to induce unwanted behavior in the targeted victim contracts, e.g., Denial-of-Service (DoS) attacks. We call these gas-related vulnerabilities. We propose eTainter, a static analyzer for detecting gas-related vulnerabilities based on taint tracking in the bytecode of smart contracts. We evaluate eTainter by comparing it with the prior work, MadMax, on a dataset of annotated contracts. The results show that eTainter outperforms MadMax in both precision and recall, and that eTainter has a precision of 90% based on manual inspection. We also use eTainter to perform large-scale analysis of 60,612 real-world contracts on the Ethereum blockchain. We find that gas-related vulnerabilities exist in 2,763 of these contracts, and that eTainter analyzes a contract in eight seconds, on average.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 18 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts 引用了 Making Smart Contracts Smarter
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks 引用了 Making Smart Contracts Smarter
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks 引用了 Securify: Practical Security Analysis of Smart Contracts
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? 引用了 Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? 引用了 Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? 引用了 AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? 引用了 Securify: Practical Security Analysis of Smart Contracts
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts 引用了 Making Smart Contracts Smarter
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts 引用了 teEther: Gnawing at Ethereum to Automatically Exploit 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
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities 引用了 Making Smart Contracts Smarter
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities 引用了 Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities 引用了 Securify: Practical Security Analysis of Smart Contracts
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis 引用了 Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis 引用了 Making Smart Contracts Smarter
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis 引用了 Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis 引用了 Securify: Practical Security Analysis of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
引用它的顶会 Paper18
- AChecker: Statically Detecting Smart Contract Access Control VulnerabilitiesAsem Ghaleb, Julia Rubin, Karthik PattabiramanICSE 2023 · 63 次引用
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart ContractsZexu Wang, Jiachi Chen, Yanlin Wang, Yu Zhang 等FSE 2024 · 27 次引用
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We?Kaixuan Li, Yue Xue, Sen Chen, Han Liu 等FSE 2024 · 26 次引用
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency AnalysisZeqin Liao, Sicheng Hao, Yuhong Nan, Zibin ZhengISSTA 2023 · 22 次引用
- Nurgle: Exacerbating Resource Consumption in Blockchain State Storage via MPT ManipulationZheyuan He, Zihao Li, Ao Qiao, Xiapu Luo 等S&P 2024 · 21 次引用
它引用的 Paper10
- 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 次引用
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contractsThomas Durieux, João F. Ferreira, Rui Abreu, Pedro CruzICSE 2020 · 373 次引用
- teEther: Gnawing at Ethereum to Automatically Exploit Smart ContractsJohannes Krupp, Christian RossowUSENIX Security 2018 · 345 次引用
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy AttacksMichael Rodler, Wenting Li, Ghassan O. Karame, Lucas DaviNDSS 2019 · 298 次引用
相关 Paper
- Ethainter: a smart contract security analyzer for composite vulnerabilitiesLexi Brent, Neville Grech, Sifis Lagouvardos, Bernhard Scholz 等PLDI 2020 · 163 次引用
- Precise static modeling of Ethereum "memory"Sifis Lagouvardos, Neville Grech, Ilias Tsatiris, Yannis SmaragdakisOOPSLA 2020 · 23 次引用
- DeFiTainter: Detecting Price Manipulation Vulnerabilities in DeFi ProtocolsQueping Kong, Jiachi Chen, Yanlin Wang, Zigui Jiang 等ISSTA 2023 · 31 次引用
- All Your Tokens are Belong to Us: Demystifying Address Verification Vulnerabilities in Solidity Smart ContractsTianle Sun, Ningyu He, Jiang Xiao, Yinliang Yue 等USENIX Security 2024 · 11 次引用
- ETHBMC: A Bounded Model Checker for Smart ContractsJoel Frank, Cornelius Aschermann, Thorsten HolzUSENIX Security 2020
