损坏的仪表:攻击EVM中的资源计量
Broken Metre: Attacking Resource Metering in EVM
摘要:
以太坊等区块链系统使用一种称为“计量”的方法来为智能合约的执行分配成本,这种方法旨在激励矿工操作网络并保护其免受DoS攻击。在过去,以太坊计量的不完善性允许通过修改计量机制来应对几次DoS攻击。本文提出了一种新的对以太坊的DoS攻击,它系统地利用了以太坊的计量机制。我们首先回放并分析了几个月的交易,在此期间,我们发现计量模型中存在许多差异,例如指令定价的显著不一致。我们进一步证明,执行成本和所利用的资源,如CPU和内存之间的相关性很小。基于这些观察,我们提出了一种新的类型的拒绝服务攻击,我们称之为资源耗尽攻击,它使用这些不完美的生成低吞吐量的合同。为此,我们设计了一个遗传算法,生成的合同的吞吐量平均比典型的合同慢200倍。然后,我们展示了所有主要的以太坊客户端实现都是脆弱的,如果在商品硬件上运行,在受到攻击时将无法与网络保持同步。我们认为,这种攻击不仅对以太坊的竞争对手和投机者,而且对以太坊矿工都具有经济吸引力。最后,我们将讨论针对此类攻击的短期和潜在的长期修复方案。我们的攻击已经负责任地向以太坊基金会披露,并获得了5,000美元的bug赏金。
英文摘要:
Blockchain systems, such as Ethereum, use an approach called "metering" to assign a cost to smart contract execution, an approach which is designed to incentivise miners to operate the network and protect it against DoS attacks. In the past, the imperfections of Ethereum metering allowed several DoS attacks which were countered through modification of the metering mechanism. This paper presents a new DoS attack on Ethereum which systematically exploits its metering mechanism. We first replay and analyse several months of transactions, during which we discover a number of discrepancies in the metering model, such as significant inconsistencies in the pricing of the instructions. We further demonstrate that there is very little correlation between the execution cost and the utilised resources, such as CPU and memory. Based on these observations, we present a new type of DoS attack we call Resource Exhaustion Attack, which uses these imperfections to generate low-throughput contracts. To do this, we design a genetic algorithm that generates contracts with a throughput on average 200 times slower than typical contracts. We then show that all major Ethereum client implementations are vulnerable and, if running on commodity hardware, would be unable to stay in sync with the network when under attack. We argue that such an attack could be financially attractive not only for Ethereum competitors and speculators, but also for Ethereum miners. Finally, we discuss short-term and potential long-term fixes against such attacks. Our attack has been responsibly disclosed to the Ethereum Foundation and awarded a bug bounty reward of 5,000 USD.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。