Back to Blog

非法资金流动案例研究:LI.FI 攻击

MetaSleuth
October 24, 2024
4 min read

非法资金流动案例研究:LI.FI 攻击

案例背景

2024年7月16日,跨链桥和 DEX 聚合器 Li.Fi 遭遇了重大的安全漏洞,攻击者利用了 Li.Fi Diamond 合约。用户的大约1160万美元的各种稳定币和其他资产被盗。攻击者能够从已向受攻击合约授予无限授权的用户那里提取资金。

该漏洞存在于 GasZipFacet 合约的 depositToGasZipERC20() 函数 中。LI.FI 团队在攻击前五天部署了 GasZipFacet 合约,用于为桥接交易提供 Gas 充值功能。depositToGasZipERC20() 函数包含一个用户控制的参数 _swapData,该参数随后被传递给 LibSwap.swap() 函数调用。不幸的是,LibSwap.swap 包含一个底层调用,可以执行攻击者控制的 _swapData 参数指定的任意函数(包括调用目标和调用数据)。攻击者利用了这种“任意调用漏洞”,从已给予 Li.Fi Diamond 合约无限授权的用户那里执行了未经授权的转账。

资金流分析

2024年7月16日,攻击者发起了近一百笔交易,利用任意调用漏洞,在30分钟内将约1100万美元的稳定币(USDT、USDC、DAI)转移到地址 0x8b3c。几乎所有被盗的稳定币随后被迅速兑换成以太坊原生代币 ETH。攻击者使用的 DEX 包括 Uniswap、Metamask Swap 等。兑换交易示例:0xdf9b, 0x11d, 0xb4a4

Metamask Swap Spender 交互的兑换交易 0x8e27 是资金流的示例。攻击者将333,258 USDT 兑换成了 97.16 ETH。使用 MetaSleuth 可以清晰地展示所有池和代理。

攻击发生后两小时内,所有被盗资产都被转移到攻击者控制的下游地址,原始攻击地址已不留任何资金。共有32个下游地址直接连接到地址 0x8b3c(即距离原始攻击地址一跳)。其中15个地址仅收到来自攻击地址的0.1 ETH。截至2024年10月22日,这15个地址持有的 ETH 尚未被转出。其余地址已处理了大部分非法资金。

从受害者地址到攻击者控制的下游地址的资金流一部分:

在将非法资金转移到距离地址 0x8b3c 一跳的下游地址后,攻击者开始分批进一步转移资金。洗钱过程持续了近三个月。几乎所有非法资金最终都被转移到 Tornado Cash(占99.9%),一小部分被发送到交易所 eXch 进行直接套现。攻击者总共通过114笔交易与 Tornado Cash Router 进行了交互。将非法收益转移到 Tornado Cash 的交易示例:0x07de, 0xfe82, 0x6a47, 0x8ea6。将非法收益转移到 eXch 的交易示例:0xaa89, 0x7e65, 0x8572, 0x625c, 0x2dd2, 0xda71

从 layer2 地址(距离原始攻击地址 0x8b3c 两跳)流向 layer4 地址的资金流一部分:

攻击发生后的第一周,即7月16日至7月22日,出现了第一批大规模的转账。攻击者将约50万美元的非法资产从地址 0x6a6d 转移到了 Tornado Cash。攻击者转移非法资金表现出明显的特征:他们将资金转移到远离攻击地址的下游地址(高风险地址),并逐渐将一部分资金导向 Tornado Cash。在第一批交易中,最长的转账路径达到了 20跳。攻击者利用了极深的洗钱路径来模糊非法资金流。8月至10月期间,其余非法资金以相同的特征,在转账批次中逐渐转移到 Tornado Cash。

从地址 0x8e85(距离 0x8b3c 一跳)向 Tornado Cash Router 转移资金的交易批次示例:

如图所示,在2024年8月13日至8月16日期间,攻击者通过12跳的路径,逐步将206 ETH 转移到 Tornado Cash。在地址 0xe9f7 处,攻击者将204 ETH 分成两笔交易:100 ETH 发送到 Tornado Cash,而104 ETH 则被转入进一步的洗钱地址。这种拆分模式在整个转移过程中保持一致。也就是说,攻击者在每次与 Tornado Cash 交互时都会使用一个新的、更深的地址。

应对措施

攻击发生两天后,LI.FI 正式发布了事件报告,声称已成功禁用所有链上的漏洞合约组件,并阻止了任何进一步的未经授权的访问。LI.FI 启动了赔偿计划,并全额赔偿了受影响的用户。关于追回被盗资产,他们声称将继续与执法部门、相关第三方(包括行业安全团队)合作,追踪并尝试追回被盗资金。截至2024年10月22日,几乎所有非法资金已被转移到 Tornado Cash,Li.Fi 尚未发布追踪报告。

部分相关地址和交易

地址 交易 非法资金流向
0x8e85eace2fa757c1d97c5ebfb8b0622e5f23c5a1 0xe237, 0x0d23 206.49 ETH
0xcb7c341dc6172b642dcf4a14015be70a27e5b31e 0x050c, 0x37d4 873,568 USDT + 36.48 ETH
0x7b93fa16c04cdcf91949d4f5f893f740992ae57e 0x57ea, 0x52ac 332.02 ETH
0x3462d2523cded523ad47c14111aa1dcbe7773675 0xc66d, 0xc0ff 120.55 ETH
0xd0be9c4c84068a9964c3781f540f703c300db268 0x0c3b, 0x1670 275.38 ETH

资金流概述:

更多信息请参阅 MetaSleuth: https://metasleuth.io/result/eth/0x14c1597cc833783ed8ac08ecc9b704b0a398201d?source=c8cd3609-0402-45eb-bb9e-2f710bd66554

Sign up for the latest updates
~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly
Security Insights

~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly

This BlockSec weekly security report covers eight attack incidents detected between April 20 and April 26, 2026, across Ethereum, Avalanche, Sui, Base, HyperLiquid, and MegaETH, with total estimated losses of approximately $7.04M. The highlighted incident is the $1.3M GiddyDefi exploit, where the attacker did not break any cryptography or use a flash loan but simply replayed an existing on-chain EIP-712 signature with the unsigned `aggregator` and `fromToken` fields swapped out for a malicious contract, demonstrating how partial signature coverage turns any historical signature into a generic permit. Other incidents include a $3.5M Volo Vault operator key compromise on Sui, a $1.5M Purrlend privileged-role takeover, a $413K SingularityFinance oracle misconfiguration, a $142.7K Scallop cross-pool index injection, a $72.35K Kipseli Router decimal mismatch, a $50.7K REVLoans (Juicebox) accounting pollution, and a $64K Custom Rebalancer arbitrary-call exploit.

The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis
Security Insights

The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis

This BlockSec deep-dive analyzes the KelpDAO $290M rsETH cross-chain bridge exploit (April 18, 2026), attributed to the Lazarus Group, tracing a causal chain across three layers: how a single-point DVN dependency enabled the attack, how DeFi composability cascaded the damage through Aave V3 lending markets to freeze WETH liquidity exceeding $6.7B across Ethereum, Arbitrum, Base, Mantle, and Linea, and how the crisis forced decentralized governance to exercise centralized emergency powers. The article examines three parameters that shaped the cascade's severity (LTV, pool depth, and cross-chain deployment count) and provides an exclusive technical breakdown of Arbitrum Security Council's forced state transition, an atomic contract upgrade that moved 30,766 ETH without the holder's signature.

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026

This BlockSec weekly security report covers four attack incidents detected between April 13 and April 19, 2026, across multiple chains such as Ethereum, Unichain, Arbitrum, and NEAR, with total estimated losses of approximately $310M. The highlighted incident is the $290M KelpDAO rsETH bridge exploit, where an attacker poisoned the RPC infrastructure of the sole LayerZero DVN to fabricate a cross-chain message, triggering a cascading WETH freeze across five chains and an Arbitrum Security Council forced state transition that raises questions about the actual trust boundaries of decentralized systems. Other incidents include a $242K MMR proof forgery on Hyperbridge, a $1.5M signed integer abuse on Dango, and an $18.4M circular swap path exploit on Rhea Finance's Burrowland protocol.

Go Deeper with MetaSleuth Investigation

Extend your crypto compliance capabilities with Blocksec's MetaSleuth Investigation, the first platform for tracing funds, mapping transaction networks and revealing hidden on-chain relationships.

Move from detection to resolution faster with clear visual insights and evidence-ready workflows across the digital assets ecosystem.

MetaSleuth Investigation