论文标题

EVMPATCH:以太坊智能合约的及时和自动补丁

EVMPatch: Timely and Automated Patching of Ethereum Smart Contracts

论文作者

Rodler, Michael, Li, Wenting, Karame, Ghassan O., Davi, Lucas

论文摘要

在智能合同代码中利用错误的最新攻击具有毁灭性后果,从而质疑这项技术的好处。目前,解决错误并及时部署修补合同是高度挑战的。即时修补特别重要,因为由于区块链系统的分布性质,智能合约始终在线。他们还管理大量资产,这些资产处于危险之中,并且在攻击后通常无法恢复。升级智能合约的现有解决方案取决于手动和容易出错的过程。本文介绍了一个称为EVMPATCH的框架,以立即和自动修补有故障的智能合约。 EVMPATCH为流行的以太坊区块链配备了字节上的重写引擎,并透明/自动将常见的现成合同重写为可升级的合同。 EVMPATCH的概念验证实现会自动硬化智能合约,这些合约容易受到整数的影响,并访问控制错误,但可以轻松扩展以覆盖更多的错误类。我们对14,000个现实世界(脆弱)合同的广泛评估表明,我们的方法成功地阻止了这些合同上启动的攻击交易,同时保持合同的预期功能完好无损。我们对经验丰富的软件开发人员进行了一项研究,表明EVMPATCH是实用的,并减少了将给定的Solidity Smart合同转换为可升级合同的时间,同时确保了与原始合同的功能等效性。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源