arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2104.15068cs.CR
收藏

DeFiRanger:检测对DeFi应用程序的价格操纵攻击

DeFiRanger: Detecting Price Manipulation Attacks on DeFi Applications

Siwei Wu, Dabao Wang, Jianting He, Yajin Zhou, Lei Wu, Xingliang Yuan, Qinming He, Kui Ren

摘要:

去中心化金融(DeFi)的快速增长推动了以太坊生态系统的发展。与此同时,针对DeFi应用程序(应用程序)的攻击正在增加。然而,据我们所知,现有的智能合约漏洞检测工具无法直接用于检测DeFi攻击。这是因为它们缺乏恢复和理解高级DeFi语义的能力,例如,用户在分散式交易所(DEX)中交易代币对X和Y。在这项工作中,我们专注于检测DeFi应用程序上的两种新攻击,包括直接和间接的价格操纵攻击。前者意味着攻击者通过攻击易受攻击的DeFi应用程序在同一DEX中执行不必要的交易,直接操纵DEX中的代币价格。后者意味着攻击者间接操纵易受攻击的DeFi应用程序的代币价格(例如,借贷应用程序)。为此,我们提出了一种独立于平台的方法来恢复高级DeFi语义,首先从原始以太坊交易构建现金流树,然后将低级语义提升到高级语义,包括令牌交易,流动性挖掘和流动性取消。最后,我们使用恢复的DeFi语义表示的模式来检测价格操纵攻击。我们已经实现了一个名为\tool{}的原型,并将其应用于超过3.5亿笔交易。它成功地检测到了432次真实世界的攻击。我们确认它们属于四个已知的安全事件和五个零日事件。我们报告了我们的发现。已分配两个CVE。我们进一步执行了攻击分析,以揭示漏洞的根本原因、攻击足迹和攻击的影响。我们的工作迫切需要保护DeFi生态系统。

英文摘要:

The rapid growth of Decentralized Finance (DeFi) boosts the Ethereum ecosystem. At the same time, attacks towards DeFi applications (apps) are increasing. However, to the best of our knowledge, existing smart contract vulnerability detection tools cannot be directly used to detect DeFi attacks. That's because they lack the capability to recover and understand high-level DeFi semantics, e.g., a user trades a token pair X and Y in a Decentralized EXchange (DEX). In this work, we focus on the detection of two types of new attacks on DeFi apps, including direct and indirect price manipulation attacks. The former one means that an attacker directly manipulates the token price in DEX by performing an unwanted trade in the same DEX by attacking the vulnerable DeFi app. The latter one means that an attacker indirectly manipulates the token price of the vulnerable DeFi app (e.g., a lending app). To this end, we propose a platform-independent way to recover high-level DeFi semantics by first constructing the cash flow tree from raw Ethereum transactions and then lifting the low-level semantics to high-level ones, including token trade, liquidity mining, and liquidity cancel. Finally, we detect price manipulation attacks using the patterns expressed with the recovered DeFi semantics. We have implemented a prototype named \tool{} and applied it to more than 350 million transactions. It successfully detected 432 real-world attacks in the wild. We confirm that they belong to four known security incidents and five zero-day ones. We reported our findings. Two CVEs have been assigned. We further performed an attack analysis to reveal the root cause of the vulnerability, the attack footprint, and the impact of the attack. Our work urges the need to secure the DeFi ecosystem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑