eTainter: detecting gas-related vulnerabilities in smart contracts
Asem Ghaleb, Julia Rubin, Karthik Pattabiraman
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
18 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts cites Making Smart Contracts Smarter
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks cites teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks cites Making Smart Contracts Smarter
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks cites Securify: Practical Security Analysis of Smart Contracts
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? cites teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? cites Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? cites 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? cites AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We? cites Securify: Practical Security Analysis of Smart Contracts
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts cites teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts cites Making Smart Contracts Smarter
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart Contracts cites Securify: Practical Security Analysis of Smart Contracts
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts cites teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts cites Making Smart Contracts Smarter
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts cites Securify: Practical Security Analysis of Smart Contracts
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities cites teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities cites Making Smart Contracts Smarter
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities cites Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts
- AChecker: Statically Detecting Smart Contract Access Control Vulnerabilities cites Securify: Practical Security Analysis of Smart Contracts
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis cites Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis cites Making Smart Contracts Smarter
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis cites 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 cites Securify: Practical Security Analysis of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts cites Making Smart Contracts Smarter
Cited by top-tier papers18
- AChecker: Statically Detecting Smart Contract Access Control VulnerabilitiesAsem Ghaleb, Julia Rubin, Karthik PattabiramanICSE 2023 · 63 citations
- Efficiently Detecting Reentrancy Vulnerabilities in Complex Smart ContractsZexu Wang, Jiachi Chen, Yanlin Wang, Yu Zhang et al.FSE 2024 · 27 citations
- Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We?Kaixuan Li, Yue Xue, Sen Chen, Han Liu et al.FSE 2024 · 26 citations
- SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency AnalysisZeqin Liao, Sicheng Hao, Yuhong Nan, Zibin ZhengISSTA 2023 · 22 citations
- Nurgle: Exacerbating Resource Consumption in Blockchain State Storage via MPT ManipulationZheyuan He, Zihao Li, Ao Qiao, Xiapu Luo et al.S&P 2024 · 21 citations
Builds on10
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena et al.CCS 2016 · 2,306 citations
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais et al.CCS 2018 · 1,108 citations
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contractsThomas Durieux, João F. Ferreira, Rui Abreu, Pedro CruzICSE 2020 · 373 citations
- teEther: Gnawing at Ethereum to Automatically Exploit Smart ContractsJohannes Krupp, Christian RossowUSENIX Security 2018 · 345 citations
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy AttacksMichael Rodler, Wenting Li, Ghassan O. Karame, Lucas DaviNDSS 2019 · 298 citations
Related papers
- Ethainter: a smart contract security analyzer for composite vulnerabilitiesLexi Brent, Neville Grech, Sifis Lagouvardos, Bernhard Scholz et al.PLDI 2020 · 163 citations
- Precise static modeling of Ethereum "memory"Sifis Lagouvardos, Neville Grech, Ilias Tsatiris, Yannis SmaragdakisOOPSLA 2020 · 23 citations
- DeFiTainter: Detecting Price Manipulation Vulnerabilities in DeFi ProtocolsQueping Kong, Jiachi Chen, Yanlin Wang, Zigui Jiang et al.ISSTA 2023 · 31 citations
- All Your Tokens are Belong to Us: Demystifying Address Verification Vulnerabilities in Solidity Smart ContractsTianle Sun, Ningyu He, Jiang Xiao, Yinliang Yue et al.USENIX Security 2024 · 11 citations
- ETHBMC: A Bounded Model Checker for Smart ContractsJoel Frank, Cornelius Aschermann, Thorsten HolzUSENIX Security 2020
