Back to Blog

非法资金流向案例研究:LI.FI 攻击事件

MetaSleuth
October 24, 2024
5 min read

非法资金流向案例分析:LI.FI 攻击事件

案例背景

2024 年 7 月 16 日,跨链桥及 DEX 聚合器 Li.Fi 遭受了重大安全漏洞攻击,攻击者利用了 Li.Fi Diamond 合约。约 1160 万美元的多种稳定币及其他资产被盗。攻击者能够从授予该合约无限授权(infinite approvals)的用户处窃取资金。

该漏洞存在于 GasZipFacet 合约的 函数 depositToGasZipERC20() 中。GasZipFacet 合约由 LI.FI 团队在攻击发生前五天部署,旨在为跨链交易提供 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 路由合约的交互交易。移动非法收益至 Tornado Cash 的交易示例:0x07de, 0xfe82, 0x6a47, 0x8ea6。移动非法收益至 eXch 的交易示例:0xaa89, 0x7e65, 0x8572, 0x625c, 0x2dd2, 0xda71

从二层地址(距离原始攻击地址 0x8b3c 两跳)到四层地址的部分资金流向:

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

将资金从地址 0x8e85(距离 0x8b3c 一跳)移动至 Tornado Cash 路由合约的转账示例:

如图所示,在 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
~$4.72M Lost: TAC, Transit Finance & More | BlockSec Weekly
Security Insights

~$4.72M Lost: TAC, Transit Finance & More | BlockSec Weekly

This BlockSec weekly security report covers 3 notable attack incidents identified between May 11 and May 17, 2026, across TRON, TON, and Ethereum, with total estimated losses of approximately $4.72M. Three incidents are analyzed in detail: the highlighted $1.88M Transit Finance exploit on TRON, where a deprecated swap bridge contract with lingering token approvals was exploited through arbitrary calldata forwarding; the $2.8M TAC TON-to-EVM bridge exploit caused by missing canonical wallet verification in the jetton deposit flow; and the $46.75K Boost Hook exploit on Ethereum, where spot price manipulation on a Uniswap V4 hook-based perpetual protocol forced the protocol to buy tokens at inflated prices using its own reserves.

~$15.9M Lost: Trusted Volumes, Wasabi & More | BlockSec Weekly
Security Insights

~$15.9M Lost: Trusted Volumes, Wasabi & More | BlockSec Weekly

This BlockSec bi-weekly security report covers 11 notable attack incidents identified between April 27 and May 10, 2026, across Sui, Ethereum, BNB Chain, Base, Blast, and Berachain, with total estimated losses of approximately $15.9M. Three incidents are analyzed in detail: the highlighted $1.14M Aftermath Finance exploit on Sui, where a signed/unsigned semantic mismatch in the builder-fee validation allowed an attacker to inject a negative fee that was converted into positive collateral during settlement; the $5.87M Trusted Volumes RFQ authorization mismatch on Ethereum; and the $5.7M Wasabi Protocol infrastructure-to-contract-control compromise across multiple EVM chains.

Newsletter - April 2026
Security Insights

Newsletter - April 2026

In April 2026, the DeFi ecosystem experienced three major security incidents. KelpDAO lost ~$290M due to an insecure 1-of-1 DVN bridge configuration exploited via RPC infrastructure compromise, Drift Protocol suffered ~$285M from a multisig governance takeover leveraging Solana's durable nonce mechanism, and Rhea Finance incurred ~$18.4M following a business logic flaw in its margin-trading module that allowed circular swap path manipulatio

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