EVMPatch: Timely and Automated Patching of Ethereum Smart Contracts
Michael Rodler, Wenting Li, Ghassan O. Karame, Lucas Davi
摘要
Recent attacks exploiting errors in smart contract code had devastating consequences thereby questioning the benefits of this technology. It is currently highly challenging to fix errors and deploy a patched contract in time. Instant patching is especially important since smart contracts are always online due to the distributed nature of blockchain systems. They also manage considerable amounts of assets, which are at risk and often beyond recovery after an attack. Existing solutions to upgrade smart contracts depend on manual and error-prone processes. This paper presents a framework, called EVMPatch, to instantly and automatically patch faulty smart contracts. EVMPatch features a bytecode rewriting engine for the popular Ethereum blockchain, and transparently/automatically rewrites common off-the-shelf contracts to upgradable contracts. The proof-of-concept implementation of EVMPatch automatically hardens smart contracts that are vulnerable to integer over/underflows and access control errors, but can be easily extended to cover more bug classes. Our extensive evaluation on 14,000 real-world (vulnerable) contracts demonstrate that our approach successfully blocks attack transactions launched on these contracts, while keeping the intended functionality of the contract intact. We perform a study with experienced software developers, showing that EVMPatch is practical, and reduces the time for converting a given Solidity smart contract to an upgradable contract by 97.6 %, while ensuring functional equivalence to the original contract.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 17 篇顶会 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 引用了 ZEUS: Analyzing Safety of 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
- ZEUS: Analyzing Safety of Smart Contracts 引用了 Making Smart Contracts Smarter
- 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
- Characterizing Ethereum Upgradable Smart Contracts and Their Security Implications 引用了 teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts
- Characterizing Ethereum Upgradable Smart Contracts and Their Security Implications 引用了 Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- Characterizing Ethereum Upgradable Smart Contracts and Their Security Implications 引用了 Making Smart Contracts Smarter
- Fuzz on the Beach: Fuzzing Solana Smart Contracts 引用了 Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- Fuzz on the Beach: Fuzzing Solana Smart Contracts 引用了 Making Smart Contracts Smarter
- Fuzz on the Beach: Fuzzing Solana 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
引用它的顶会 Paper17
- Impact and User Perception of Sandwich Attacks in the DeFi EcosystemYe Wang, Patrick Zuest, Yaxing Yao, Zhicong Lu 等CHI 2022 · 52 次引用
- WASAI: uncovering vulnerabilities in Wasm smart contractsWeimin Chen, Zihan Sun, Haoyu Wang, Xiapu Luo 等ISSTA 2022 · 43 次引用
- Characterizing Ethereum Upgradable Smart Contracts and Their Security ImplicationsXiaofan Li, Jin Yang, Jiaqi Chen, Yuzhe Tang 等WWW 2024 · 23 次引用
- Fuzz on the Beach: Fuzzing Solana Smart ContractsSven Smolka, Jens-Rene Giesen, Pascal Winkler, Oussama Draissi 等CCS 2023 · 22 次引用
- BunnyFinder: Finding Incentive Flaws for Ethereum ConsensusRujia Li, Mingfei Zhang, Xueqian Lu, Wenbo Xu 等NDSS 2026 · 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 次引用
- 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
- SmartFix: Fixing Vulnerable Smart Contracts by Accelerating Generate-and-Verify Repair using Statistical ModelsSunbeom So, Hakjoo OhFSE 2023 · 20 次引用
- SGUARD: Towards Fixing Vulnerable Smart Contracts AutomaticallyTai D. Nguyen, Long H. Pham, Jun SunS&P 2021 · 69 次引用
- EVMbench: Evaluating AI Agents on Smart Contract SecurityJustin Wang, Andreas Bigger, Xiaohai Xu, Justin W. Lin 等ICML 2026 · 8 次引用
- eThor: Practical and Provably Sound Static Analysis of Ethereum Smart ContractsClara Schneidewind, Ilya Grishchenko, Markus Scherer, Matteo MaffeiCCS 2020 · 9 次引用
- Your Exploit is Mine: Instantly Synthesizing Counterattack Smart ContractZhuo Zhang, Zhiqiang Lin, Marcelo Morales, Xiangyu Zhang 等USENIX Security 2023
