arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.00408cs.CR
收藏

穿透敌意:通过跨合约分析检测DeFi协议漏洞利用

Penetrating the Hostile: Detecting DeFi Protocol Exploits through Cross-Contract Analysis

Hainan University(海南大学);Jinan University(暨南大学);University of Chinese Academy of Sciences(中国科学院大学)

Xiaoqi Li, Wenkai Li, Zhiquan Liu, Yuqing Zhang, Yingjie Mao

AI总结:

针对DeFi协议攻击频发且现有仅关注受害者的检测方法难以覆盖攻击者意图的问题,提出首个利用深度学习进行跨合约静态数据流分析的漏洞检测框架DeFiTail,通过统一执行路径和符号执行栈验证,在访问控制、闪电贷漏洞及CVE数据集上均实现高准确率。

摘要:

去中心化金融(DeFi)协议是在区块链上开发用于管理数字资产的加密项目。针对DeFi的攻击频繁发生,已造成超过800亿美元的损失。当前工具通过分析恶意事件期间可能发生的状态变化来检测和定位合约中可能的漏洞。然而,这种仅关注受害者的方法很少具备覆盖攻击者交互意图逻辑的能力。此外,在现实场景中,只有极小比例的DeFi协议遭受攻击,这对这些检测工具展示实际效能构成了重大挑战。在本文中,我们提出了DeFiTail,这是首个利用深度学习技术进行访问控制和闪电贷漏洞利用检测的框架。通过输入跨合约静态数据流,DeFiTail自动学习DeFi协议上发生的现实恶意事件中的攻击逻辑,捕获攻击者与受害者合约之间的威胁模式。由于DeFi协议事件涉及多账户交易交互,包含外部和内部交易的执行路径需要被统一。此外,为了减轻控制流图(CFG)连接中错误的影响,DeFiTail通过采用符号执行栈来验证数据路径。进一步地,我们将数据路径输入到我们的模型中以实现对DeFi协议的检查。对比实验结果表明,DeFiTail实现了最高的准确率,在访问控制方面达到98.39%,在闪电贷漏洞利用方面达到97.43%。DeFiTail还展示了对恶意合约的增强检测能力,从CVE数据集中识别出86.67%的准确率。

英文摘要:

Decentralized finance (DeFi) protocols are crypto projects developed on the blockchain to manage digital assets. Attacks on DeFi have been frequent and have resulted in losses exceeding $80 billion. Current tools detect and locate possible vulnerabilities in contracts by analyzing the state changes that may occur during malicious events. However, this victim-only approaches seldom possess the capability to cover the attacker's interaction intention logic. Furthermore, only a minuscule percentage of DeFi protocols experience attacks in real-world scenarios, which poses a significant challenge for these detection tools to demonstrate practical effectiveness. In this paper, we propose DeFiTail, the first framework that utilizes deep learning technology for access control and flash loan exploit detection. Through feeding the cross-contract static data flow, DeFiTail automatically learns the attack logic in real-world malicious events that occur on DeFi protocols, capturing the threat patterns between attacker and victim contracts. Since the DeFi protocol events involve interactions with multi-account transactions, the execution path with external and internal transactions requires to be unified. Moreover, to mitigate the impact of mistakes in Control Flow Graph (CFG) connections, DeFiTail validates the data path by employing the symbolic execution stack. Furthermore, we feed the data paths through our model to achieve the inspection of DeFi protocols. Comparative experiment results indicate that DeFiTail achieves the highest accuracy, with 98.39% in access control and 97.43% in flash loan exploits. DeFiTail also demonstrates an enhanced capability to detect malicious contracts, identifying 86.67% accuracy from the CVE dataset.

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

↑