一句话:提出面向 DeFi 协议的跨合约污点分析框架,检测价格操纵漏洞。
DeFi 协议是在区块链上管理高价值数字资产的程序,价格操纵漏洞使攻击者可通过操纵代币价格获取超额收益。本文提出 DeFiTainter,一个用于检测价格操纵漏洞的跨合约污点分析框架。其两项机制包括:通过从代码常量、合约存储和函数参数中恢复调用信息来构建跨合约调用图;以及面向价格操纵漏洞检测的高层语义归纳,用于准确识别污点源与汇并跨合约追踪污点数据。在真实事件和高价值 DeFi 协议上的评估表明,DeFiTainter 优于现有方法,检测精确率达 96%、召回率达 91.3%,并发现三个此前未公开的价格操纵漏洞。
DeFi protocols are programs that manage high-value digital assets on blockchain. The price manipulation vulnerability is one of the common vulnerabilities in DeFi protocols, which allows attackers to gain excessive profits by manipulating token prices. In this paper, we propose DeFiTainter, an inter-contract taint analysis framework for detecting price manipulation vulnerabilities. DeFiTainter features two innovative mechanisms to ensure its effectiveness. The first mechanism is to construct a call graph for inter-contract taint analysis by restoring call information, not only from code constants but also from contract storage and function parameters. The second mechanism is a high-level semantic induction tailored for detecting price manipulation vulnerabilities, which accurately identifies taint sources and sinks and tracks taint data across contracts. Extensive evaluation of real-world incidents and high-value DeFi protocols shows that DeFiTainter outperforms existing approaches and achieves state-of-the-art performance with a precision of 96% and a recall of 91.3% in detecting price manipulation vulnerabilities. Furthermore, DeFiTainter uncovers three previously undisclosed price manipulation vulnerabilities.