保护 DeFi 平台免受非价格闪电贷攻击
Protecting DeFi Platforms against Non-Price Flash Loan Attacks
AI总结:
本文提出 FlashGuard,一种针对非价格闪电贷攻击的运行时检测与缓解方法,通过在内存池短暂时机内发送隐蔽微尘交易破坏攻击原子性,实现超 99.93% 准确率的实时检测,并验证其可挽回超 4.05 亿美元损失。
摘要:
去中心化金融(DeFi)平台中的智能合约是极具吸引力的攻击目标,因为其漏洞可能导致巨额资金损失。特别是闪电贷攻击,对总锁仓价值(TVL)超过 1060 亿美元的 DeFi 协议构成了重大威胁。这些攻击利用区块链的原子性属性,在单笔交易中抽干智能合约的资金。虽然现有研究主要集中在价格操纵攻击(如预言机操纵)上,但缓解通常利用智能合约零日漏洞的非价格闪电贷攻击在很大程度上仍未得到解决。由于这些攻击具有独特的模式、时间敏感性和复杂性,检测它们具有挑战性。在本文中,我们提出了 FlashGuard,一种针对非价格闪电贷攻击的运行时检测与缓解方法。我们的方法针对智能合约函数签名,以实时识别攻击,并利用交易在内存池中可见但尚未确认的短暂时机,通过破坏攻击交易的原子性进行反击。当 FlashGuard 检测到攻击时,它会向矿工分发一笔隐蔽的微尘反击交易,以更改受害者合约的状态,从而破坏攻击的原子性并迫使攻击交易回滚。我们使用 20 次历史攻击和若干未见过的攻击来评估我们的方法。FlashGuard 实现了 150.31 毫秒的平均实时检测延迟、超过 99.93% 的检测准确率以及 410.92 毫秒的平均破坏时间。如果在这些攻击实例发生前部署了 FlashGuard,它本可以挽救超过 4.0571 亿美元的损失。FlashGuard 展示了作为 DeFi 安全解决方案的巨大潜力,可缓解并处理日益增长的非价格闪电贷攻击威胁。
英文摘要:
Smart contracts in Decentralized Finance (DeFi) platforms are attractive targets for attacks as their vulnerabilities can lead to massive amounts of financial losses. Flash loan attacks, in particular, pose a major threat to DeFi protocols that hold a Total Value Locked (TVL) exceeding \$106 billion. These attacks use the atomicity property of blockchains to drain funds from smart contracts in a single transaction. While existing research primarily focuses on price manipulation attacks, such as oracle manipulation, mitigating non-price flash loan attacks that often exploit smart contracts' zero-day vulnerabilities remains largely unaddressed. These attacks are challenging to detect because of their unique patterns, time sensitivity, and complexity. In this paper, we present FlashGuard, a runtime detection and mitigation method for non-price flash loan attacks. Our approach targets smart contract function signatures to identify attacks in real-time and counterattack by disrupting the attack transaction atomicity by leveraging the short window when transactions are visible in the mempool but not yet confirmed. When FlashGuard detects an attack, it dispatches a stealthy dusting counterattack transaction to miners to change the victim contract's state which disrupts the attack's atomicity and forces the attack transaction to revert. We evaluate our approach using 20 historical attacks and several unseen attacks. FlashGuard achieves an average real-time detection latency of 150.31ms, a detection accuracy of over 99.93\%, and an average disruption time of 410.92ms. FlashGuard could have potentially rescued over \$405.71 million in losses if it were deployed prior to these attack instances. FlashGuard demonstrates significant potential as a DeFi security solution to mitigate and handle rising threats of non-price flash loan attacks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。