Skip to main content
QUICK REVIEW

[论文解读] Combatting Front-Running in Smart Contracts: Attack Mining, Benchmark Construction and Vulnerability Detector Evaluation

Wuqi Zhang, Lili Wei|arXiv (Cornell University)|Dec 23, 2022
Blockchain Technology Applications and Security被引用 4
一句话总结

本文对以太坊智能合约中的前端攻击漏洞进行了全面研究。提出了一种攻击挖掘算法以检测现实世界中的前端攻击事件,采用动态污点分析定位易受攻击的代码段,构建了涵盖235个合约的513起真实攻击基准,并对七种最先进的漏洞检测工具进行了评估——结果显示召回率极低,不超过6.04%,并揭示了现有工具的关键局限性。

ABSTRACT

Front-running attacks have been a major concern on the blockchain. Attackers launch front-running attacks by inserting additional transactions before upcoming victim transactions to manipulate victim transaction executions and make profits. Recent studies have shown that front-running attacks are prevalent on the Ethereum blockchain and have caused millions of US dollars loss. Vulnerable smart contracts, blockchain programs invoked by transactions, are held responsible for front-running attacks. Although techniques to detect front-running vulnerabilities have been proposed, their performance on real-world vulnerable contracts is unclear. There is no large-scale benchmark based on real attacks to evaluate their capabilities. This motivates us to build a benchmark consisting of 513 real-world attacks with vulnerable code labeled in 235 distinct smart contracts. We propose automated techniques to effectively collect real-world attacks and localize the corresponding vulnerable code at scale. Our experiments show that our approaches are effective, achieving higher recall in finding real attacks and higher precision in pinpointing vulnerabilities compared to the existing techniques. The evaluation of seven state-of-the-art vulnerability detection techniques on the benchmark reveals their inadequacy in detecting front-running vulnerabilities, with a low recall of at most 6.04%. Our further analysis identifies four common limitations in existing techniques: lack of support for inter-contract analysis, inefficient constraint solving for cryptographic operations, improper vulnerability patterns, and lack of token support.

研究动机与目标

  • 为解决智能合约中前端攻击漏洞检测缺乏大规模真实世界基准的问题。
  • 开发一种有效算法,从区块链历史中挖掘真实前端攻击,其召回率高于以往工作。
  • 通过动态污点分析定位智能合约中的易受攻击代码段,以提高漏洞检测的精度。
  • 基于真实世界基准,实证评估七种最先进的漏洞检测工具的性能,揭示其局限性。
  • 识别并分析现有工具在检测性能不佳的根本原因,特别是跨合约分析、密码学操作和代币处理方面的缺陷。

提出的方法

  • 设计了一种自动化攻击挖掘算法,用于分析以太坊区块中的交易序列,通过检测在受害者交易之前发起且能获利的交易,识别前端攻击模式。
  • 对挖掘出的攻击追踪应用动态污点分析,从交易输入到合约函数调用传播信任和数据流,实现对易受攻击代码片段的精确定位。
  • 构建了一个包含513起真实前端攻击的基准,其中235个不同的智能合约被标注,明确指出了导致攻击的易受攻击代码段。
  • 利用该基准评估七种最先进的漏洞检测工具,分析其精确率、召回率和误报率。
  • 通过三位经验丰富的研究人员的独立验证,确保攻击和漏洞标签的基准真实可靠,采用客观标准并经共识评审。
  • 系统性分析检测失败原因,识别出四大核心局限:缺乏跨合约分析能力、对密码学操作处理效率低下、漏洞模式错误,以及对代币支持不足。

实验结果

研究问题

  • RQ1与以往工作相比,所提出的攻击挖掘算法在检测真实世界前端攻击方面的有效性如何?
  • RQ2动态污点分析在多大程度上能以高精度定位智能合约中的易受攻击代码段?
  • RQ3所提出的基准在多大程度上全面且具有代表性地覆盖了以太坊智能合约中的真实前端攻击漏洞?
  • RQ4当在真实世界攻击上评估时,现有最先进的漏洞检测工具的实际召回率和精确率是多少?
  • RQ5当前工具在前端攻击漏洞检测中表现不佳的主要技术局限是什么?

主要发现

  • 所提出的攻击挖掘算法召回率高于以往工作,成功识别出更多以太坊区块链历史中的真实前端攻击。
  • 基于动态污点分析的定位方法在精确定位易受攻击代码段方面优于基线技术,具有更高的精确率。
  • 该基准包含513起真实前端攻击,涉及235个不同的智能合约,所有漏洞均经人工验证确认为真正阳性。
  • 实证评估显示,现有漏洞检测工具在该基准上的最大召回率仅为6.04%,表明其性能严重不足。
  • 本研究识别出当前工具的四大关键局限:缺乏跨合约分析能力、对密码学操作的约束求解效率低下、漏洞模式错误,以及对ERC20代币支持不足。
  • 现有工具报告的大多数漏洞为误报,其中24个函数中有23个被至少两个工具标记为易受攻击,但经人工确认为非易受攻击,原因包括只读函数、访问受限或状态访问孤立。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。