FlashSyn:通过反例驱动近似进行闪电贷攻击合成
FlashSyn: Flash Loan Attack Synthesis via Counter Example Driven Approximation
AI总结:
本文提出FlashSyn框架,通过数值近似和反例驱动细化自动合成利用闪电贷攻击DeFi协议的对抗性交易,在18个基准中成功合成16个攻击,部分攻击利润超过历史黑客。
摘要:
在去中心化金融(DeFi)中,贷款人可以向借款人提供闪电贷,即仅在区块链交易内有效且必须在交易结束时支付费用偿还的贷款。与普通贷款不同,闪电贷允许借款人无需预先抵押存款即可借入大量资产。恶意攻击者利用闪电贷汇集大量资产以利用易受攻击的DeFi协议。在本文中,我们引入了一个新的框架,用于自动合成利用闪电贷攻击DeFi协议的对抗性交易。为了绕过DeFi协议的复杂性,我们提出了一种新技术,使用数值方法(多项式线性回归和最近邻插值)来近似DeFi协议的功能行为。然后,我们使用DeFi协议的近似函数构造一个优化查询,以找到由一系列具有最优参数的函数调用组成的对抗性攻击,该攻击可带来最大利润。为了提高近似的准确性,我们提出了一种新颖的反例驱动近似细化技术。我们将我们的框架实现为一个名为FlashSyn的工具。我们在16个曾遭受闪电贷攻击的DeFi协议和2个来自Damn Vulnerable DeFi挑战的DeFi协议上评估了FlashSyn。FlashSyn自动合成了18个基准中16个的对抗性攻击。在16个成功案例中,FlashSyn在3个案例中识别出比历史黑客使用的攻击向量产生更高利润的攻击向量,并在10个案例中发现了多个不同的攻击向量,展示了其在发现可能的闪电贷攻击方面的有效性。
英文摘要:
In decentralized finance (DeFi), lenders can offer flash loans to borrowers, i.e., loans that are only valid within a blockchain transaction and must be repaid with fees by the end of that transaction. Unlike normal loans, flash loans allow borrowers to borrow large assets without upfront collaterals deposits. Malicious adversaries use flash loans to gather large assets to exploit vulnerable DeFi protocols. In this paper, we introduce a new framework for automated synthesis of adversarial transactions that exploit DeFi protocols using flash loans. To bypass the complexity of a DeFi protocol, we propose a new technique to approximate the DeFi protocol functional behaviors using numerical methods (polynomial linear regression and nearest-neighbor interpolation). We then construct an optimization query using the approximated functions of the DeFi protocol to find an adversarial attack constituted of a sequence of functions invocations with optimal parameters that gives the maximum profit. To improve the accuracy of the approximation, we propose a novel counterexample driven approximation refinement technique. We implement our framework in a tool named FlashSyn. We evaluate FlashSyn on 16 DeFi protocols that were victims to flash loan attacks and 2 DeFi protocols from Damn Vulnerable DeFi challenges. FlashSyn automatically synthesizes an adversarial attack for 16 of the 18 benchmarks. Among the 16 successful cases, FlashSyn identifies attack vectors yielding higher profits than those employed by historical hackers in 3 cases, and also discovers multiple distinct attack vectors in 10 cases, demonstrating its effectiveness in finding possible flash loan attacks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。