Precise static modeling of Ethereum "memory"
Sifis Lagouvardos, Neville Grech, Ilias Tsatiris, Yannis Smaragdakis
摘要
Static analysis of smart contracts as-deployed on the Ethereum blockchain has received much recent attention. However, high-precision analyses currently face significant challenges when dealing with the Ethereum VM (EVM) execution model. A major such challenge is the modeling of low-level, transient “memory” (as opposed to persistent, on-blockchain “storage”) that smart contracts employ. Statically understanding the usage patterns of memory is non-trivial, due to the dynamic allocation nature of in-memory buffers. We offer an analysis that models EVM memory, recovering high-level concepts (e.g., arrays, buffers, call arguments) via deep modeling of the flow of values. Our analysis opens the door to Ethereum static analyses with drastically increased precision. One such analysis detects the extraction of ERC20 tokens by unauthorized users. For another practical vulnerability (redundant calls, possibly used as an attack vector), our memory modeling yields analysis precision of 89%, compared to 16% for a state-of-the-art tool without precise memory modeling. Additionally, precise memory modeling enables the static computation of a contract’s gas cost. This gas-cost analysis has recently been instrumental in the evaluation of the impact of the EIP-1884 repricing (in terms of gas costs) of EVM operations, leading to a reward and significant publicity from the Ethereum Foundation.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts 引用了 Making Smart Contracts Smarter
- Elipmoc: advanced decompilation of Ethereum smart contracts 引用了 Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contracts
- Elipmoc: advanced decompilation of Ethereum smart contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- Learning to Fuzz from Symbolic Execution with Application to Smart Contracts 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Learning to Fuzz from Symbolic Execution with Application to Smart Contracts 引用了 VerX: Safety Verification of Smart Contracts
- Learning to Fuzz from Symbolic Execution with Application to Smart Contracts 引用了 Making Smart Contracts Smarter
- Learning to Fuzz from Symbolic Execution with Application to Smart Contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contracts 引用了 VerX: Safety Verification of Smart Contracts
- Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contracts 引用了 Making Smart Contracts Smarter
- Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contracts 引用了 Learning to Fuzz from Symbolic Execution with Application to Smart Contracts
- Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- Practical Verification of Smart Contracts using Memory Splitting 引用了 Elipmoc: advanced decompilation of Ethereum smart contracts
- Practical Verification of Smart Contracts using Memory Splitting 引用了 VerX: Safety Verification of Smart Contracts
- Practical Verification of Smart Contracts using Memory Splitting 引用了 Making Smart Contracts Smarter
- Practical Verification of Smart Contracts using Memory Splitting 引用了 Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contracts
- Practical Verification of Smart Contracts using Memory Splitting 引用了 Securify: Practical Security Analysis of Smart Contracts
- WASAI: uncovering vulnerabilities in Wasm smart contracts 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- WASAI: uncovering vulnerabilities in Wasm smart contracts 引用了 Making Smart Contracts Smarter
- WASAI: uncovering vulnerabilities in Wasm smart contracts 引用了 Learning to Fuzz from Symbolic Execution with Application to Smart Contracts
- eTainter: detecting gas-related vulnerabilities in smart contracts 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- eTainter: detecting gas-related vulnerabilities in smart contracts 引用了 Making Smart Contracts Smarter
- eTainter: detecting gas-related vulnerabilities in smart contracts 引用了 Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contracts
- eTainter: detecting gas-related vulnerabilities in smart contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
引用它的顶会 Paper9
- eTainter: detecting gas-related vulnerabilities in smart contractsAsem Ghaleb, Julia Rubin, Karthik PattabiramanISSTA 2022 · 57 次引用
- WASAI: uncovering vulnerabilities in Wasm smart contractsWeimin Chen, Zihan Sun, Haoyu Wang, Xiapu Luo 等ISSTA 2022 · 43 次引用
- Elipmoc: advanced decompilation of Ethereum smart contractsNeville Grech, Sifis Lagouvardos, Ilias Tsatiris, Yannis SmaragdakisOOPSLA 2022 · 40 次引用
- Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contractsYannis Smaragdakis, Neville Grech, Sifis Lagouvardos, Konstantinos Triantafyllou 等OOPSLA 2021 · 18 次引用
- Practical Verification of Smart Contracts using Memory SplittingShelly Grossman, John Toman, Alexander Bakst, Sameer Arora 等OOPSLA 2024 · 7 次引用
它引用的 Paper6
- 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 次引用
- teEther: Gnawing at Ethereum to Automatically Exploit Smart ContractsJohannes Krupp, Christian RossowUSENIX Security 2018 · 345 次引用
- Learning to Fuzz from Symbolic Execution with Application to Smart ContractsJingxuan He, Mislav Balunovic, Nodar Ambroladze, Petar Tsankov 等CCS 2019 · 288 次引用
- VerX: Safety Verification of Smart ContractsAnton Permenev, Dimitar Dimitrov, Petar Tsankov, Dana Drachsler-Cohen 等S&P 2020 · 251 次引用
相关 Paper
- Synthesis of Sound and Precise Storage Cost Bounds via Unsound Resource Analysis and Max-SMTElvira Albert, Jesús Correas, Pablo Gordillo, Guillermo Román-Díez 等ISSTA 2024 · 1 次引用
- ETHBMC: A Bounded Model Checker for Smart ContractsJoel Frank, Cornelius Aschermann, Thorsten HolzUSENIX Security 2020
- The Incredible Shrinking Context... in a Decompiler Near YouSifis Lagouvardos, Yannis Bollanos, Neville Grech, Yannis SmaragdakisISSTA 2025 · 1 次引用
- Precise Static Identification of Ethereum Storage VariablesSifis Lagouvardos, Yannis Bollanos, Michael Debono, Neville Grech 等ICSE 2026 · 2 次引用
- PrettySmart: Detecting Permission Re-delegation Vulnerability for Token Behaviors in Smart ContractsZhijie Zhong, Zibin Zheng, Hong-Ning Dai, Qing Xue 等ICSE 2024 · 12 次引用
