Skip to main content
QUICK REVIEW

[论文解读] DEPOSafe: Demystifying the Fake Deposit Vulnerability in Ethereum Smart Contracts

Ru Ji, Ningyu He|arXiv (Cornell University)|Jun 11, 2020
Blockchain Technology Applications and Security参考文献 21被引用 5
一句话总结

本文提出 DEPOSafe,一种自动化工具,通过符号执行和动态行为建模检测以太坊 ERC-20 智能合约中的虚假存款漏洞。该工具分析了 176,000 份合约,识别出超过 7,000 份存在漏洞的合约,揭示了广泛存在的风险,尤其是在验证机制薄弱的中心化交易所中,凸显了区块链生态系统中的关键安全威胁。

ABSTRACT

Cryptocurrency has seen an explosive growth in recent years, thanks to the evolvement of blockchain technology and its economic ecosystem. Besides Bitcoin, thousands of cryptocurrencies have been distributed on blockchains, while hundreds of cryptocurrency exchanges are emerging to facilitate the trading of digital assets. At the same time, it also attracts the attentions of attackers. Fake deposit, as one of the most representative attacks (vulnerabilities) related to exchanges and tokens, has been frequently observed in the blockchain ecosystem, causing large financial losses. However, besides a few security reports, our community lacks of the understanding of this vulnerability, for example its scale and the impacts. In this paper, we take the first step to demystify the fake deposit vulnerability. Based on the essential patterns we have summarized, we implement DEPOSafe, an automated tool to detect and verify (exploit) the fake deposit vulnerability in ERC-20 smart contracts. DEPOSafe incorporates several key techniques including symbolic execution based static analysis and behavior modeling based dynamic verification. By applying DEPOSafe to 176,000 ERC-20 smart contracts, we have identified over 7,000 vulnerable contracts that may suffer from two types of attacks. Our findings demonstrate the urgency to identify and prevent the fake deposit vulnerability.

研究动机与目标

  • 系统性地表征以太坊 ERC-20 智能合约中虚假存款漏洞的特征,此类漏洞已在现实攻击中造成重大财务损失。
  • 衡量该漏洞在以太坊生态系统中的规模与影响,特别是与中心化交易所(CEXes)的关系。
  • 开发一种自动化工具 DEPOSafe,能够以高精度检测并验证虚假存款漏洞。
  • 提高开发人员、交易所和监管机构对这一被低估的漏洞的普遍性和严重性的认识。
  • 为智能合约开发人员和交易所运营者提供可操作的缓解策略,以防止漏洞被利用。

提出的方法

  • 该方法结合使用 Mythril 的基于符号执行的静态分析,检测 ERC-20 合约中潜在的漏洞模式。
  • 构建动态验证器,以模拟代币与交易所之间的存款交互,从而减少静态分析带来的误报。
  • 该工具识别出两种攻击类型:I 型(代币层面缺陷)和 II 型(交易所验证缺陷),具有不同的检测标准。
  • DEPOSafe 评估了 2015 年 7 月至 2020 年 3 月期间部署的 176,000 份 ERC-20 合约,重点关注 transfer 和 transferFrom 函数的实现。
  • 通过模拟交易流程并检查返回行为不一致或缺少异常,对检测到的漏洞进行验证。
  • 该方法旨在可扩展且实用,可集成至智能合约审计工作流中。

实验结果

研究问题

  • RQ1导致 ERC-20 智能合约中虚假存款漏洞的关键实现模式是什么?
  • RQ2该虚假存款漏洞在以太坊 ERC-20 生态系统中有多普遍?
  • RQ3当与薄弱的交易所验证机制结合时,该漏洞的财务和运营影响是什么?
  • RQ4自动化工具能否以高精度有效检测并验证虚假存款漏洞?
  • RQ5静态检测中误报的根本原因是什么?动态验证如何提升可靠性?

主要发现

  • DEPOSafe 识别出 7,716 份 ERC-20 智能合约存在 II 型虚假存款攻击漏洞,此类漏洞需依赖交易所验证缺陷才能被利用。
  • 其中 56 种代币的总市值超过 11 亿美元,持有者超过 69.5 万人,交易量达 460 万笔,表明存在巨大的暴露风险。
  • 研究发现,超过 7,000 份合约因非标准的 ERC-20 实现而易受 I 型攻击,尤其是 transfer 和 transferFrom 函数存在缺陷。
  • 许多合约在失败时返回布尔值而非抛出异常,使攻击者能够绕过余额和授权检查。
  • 分析表明,由于对存款交易的后端验证不足,大量交易所可能易受虚假存款攻击。
  • 研究结果强调了中心化交易所亟需改进验证机制,同时开发人员也应更严格遵守 ERC-20 标准。

更好的研究,从现在开始

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

无需绑定信用卡

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