[论文解读] An Adaptive Gas Cost Mechanism for Ethereum to Defend Against Under-Priced DoS Attacks
本文提出了一种以太坊的自适应气体成本机制,该机制根据执行频率动态调整操作成本,以防御已知和未知的低定价拒绝服务(DoS)攻击。通过使用基于模拟的框架来测量EVM资源消耗,并利用特殊智能合约实现运行时参数更新,该方法在对合法用户造成可忽略的性能开销的前提下,有效缓解了DoS威胁。
The gas mechanism in Ethereum charges the execution of every operation to ensure that smart contracts running in EVM (Ethereum Virtual Machine) will be eventually terminated. Failing to properly set the gas costs of EVM operations allows attackers to launch DoS attacks on Ethereum. Although Ethereum recently adjusted the gas costs of EVM operations to defend against known DoS attacks, it remains unknown whether the new setting is proper and how to configure it to defend against unknown DoS attacks. In this paper, we make the first step to address this challenging issue by first proposing an emulation-based framework to automatically measure the resource consumptions of EVM operations. The results reveal that Ethereum's new setting is still not proper. Moreover, we obtain an insight that there may always exist exploitable under-priced operations if the cost is fixed. Hence, we propose a novel gas cost mechanism, which dynamically adjusts the costs of EVM operations according to the number of executions, to thwart DoS attacks. This method punishes the operations that are executed much more frequently than before and lead to high gas costs. To make our solution flexible and secure and avoid frequent update of Ethereum client, we design a special smart contract that collaborates with the updated EVM for dynamic parameter adjustment. Experimental results demonstrate that our method can effectively thwart both known and unknown DoS attacks with flexible parameter settings. Moreover, our method only introduces negligible additional gas consumption for benign users.
研究动机与目标
- 调查以太坊当前固定的气体成本设置是否足以防御已知和未知的拒绝服务攻击。
- 识别静态气体成本分配在面对不断演变的EVM工作负载和资源消耗模式时的局限性。
- 设计一种灵活、安全且高效的机制,能够根据异常执行频率自适应地调整气体成本。
- 在无需频繁升级以太坊客户端的前提下,实现动态参数更新,确保长期可维护性。
- 在真实条件下评估该机制对已知和未知拒绝服务攻击的有效性。
提出的方法
- 开发一种基于模拟的框架,自动测量EVM操作在不同执行路径下的实际资源消耗(CPU、内存)。
- 利用该框架分析以太坊当前的气体成本设置,发现即使经过近期调整,仍不足以实现全面的DoS防护。
- 提出一种动态气体成本机制,提高执行频率显著高于正常水平的操作的成本,从而威慑攻击者。
- 引入一种特殊智能合约,与打补丁的EVM协同工作,实现无需以太坊客户端更新即可安全且灵活地更新成本调整参数。
- 采用滑动窗口机制并结合统计分析(均值与标准差),检测异常执行模式并标记潜在的DoS攻击。
- 通过发送方地址、函数调用和执行追踪对恶意交易进行过滤,防止参数被篡改。
实验结果
研究问题
- RQ1以太坊当前固定的气体成本配置是否能有效抵御已知和未知的拒绝服务攻击?
- RQ2一种根据执行频率自适应调整的动态气体成本机制,能否有效防止低定价的拒绝服务攻击?
- RQ3如何在无需频繁升级以太坊客户端的前提下,使气体成本调整机制既安全又灵活?
- RQ4该机制对合法(良性)交易的性能开销有多大?
- RQ5系统能否通过统计异常检测快速且准确地识别并响应拒绝服务攻击?
主要发现
- 模拟框架显示,即使经过近期调整,以太坊当前的气体成本设置仍不足以防御拒绝服务攻击,原因在于部分操作定价过低。
- 研究发现,固定气体成本本质上存在缺陷,因为资源消耗模式和系统工作负载随时间演变,静态定价无法应对这种变化。
- 所提出的自适应气体成本机制通过提高高频使用操作的成本,成功缓解了已知和未知的拒绝服务攻击,有效威慑了攻击者。
- 该机制在各种参数设置下,对良性用户引入的额外气体消耗不足0.1%,确保了极小的性能影响。
- 通过智能合约实现动态参数更新,可在无需升级以太坊客户端的前提下实现安全且灵活的配置变更。
- 基于滑动窗口内执行频率的统计分析检测机制,能够快速识别拒绝服务攻击,并有效抵御操纵尝试。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。