Back to Blog

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

MetaSleuth
October 24, 2024

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

案例背景

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

该漏洞存在于 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 可以清晰地展示所有资金池和代理。

攻击发生后两小时内,所有被盗资产均已转移至攻击者控制的下游地址,原始攻击地址已无任何资金。直接连接到地址 0x8b3c(即距离原始攻击地址一个跳)共有32个下游地址。其中,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 2跳)到layer4地址的资金流:

攻击发生后的第一周,即7月16日至7月22日,发生了第一批大规模的转账。攻击者从地址 0x6a6d 向 Tornado Cash 转移了约50万美元的非法资产。攻击者转移非法资金的特点是:他们将资金转移到距离攻击地址较远的下游地址(高风险地址),并逐渐将一部分资金注入 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
Tether Freezes $6.76M USDT Linked to Iran's IRGC & Houthi Forces: Why On-Chain Compliance is Now a Geopolitical Battlefield
Security Insights

Tether Freezes $6.76M USDT Linked to Iran's IRGC & Houthi Forces: Why On-Chain Compliance is Now a Geopolitical Battlefield

Looking ahead, targeted freezing events like this $6.76M USDT action will only become more common. On-chain data analysis is improving. Stablecoin issuers are also working closely with regulators. As a result, hidden illicit financial networks will be exposed.

Weekly Web3 Security Incident Roundup | Mar 2 – Mar 8, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 2 – Mar 8, 2026

During the week of March 2 to March 8, 2026, seven blockchain security incidents were reported with total losses of ~$3.25M. The incidents occurred across Base, BNB Chain, and Ethereum, exposing critical vulnerabilities in smart contract business logic, token deflationary mechanics, and asset price manipulation. The primary causes included a double-minting logic flaw during full token deposits that allowed an attacker to exponentially inflate their balances through repeated burn-and-mint cycles, a price manipulation vulnerability in an AMM-based lending market where artificially inflated vault shares created divergent price anchors to incorrectly force healthy positions into liquidation, and a flawed access control implementation relying on trivially spoofed contract interfaces that enabled attackers to bypass authorization to batch-mint and dump arbitrary tokens.

Weekly Web3 Security Incident Roundup | Feb 23 – Mar 1, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Feb 23 – Mar 1, 2026

During the week of February 23 to March 1, 2026, seven blockchain security incidents were reported with total losses of ~$13M. The incidents affected multiple protocols, exposing critical weaknesses in oracle design/configuration, cryptographic verification, and core business logic. The primary drivers included oracle manipulation/misconfiguration that led to the largest loss at YieldBloxDAO (~$10M), a crypto-proof verification flaw that enabled the FOOMCASH (~$2.26M) exploit, and additional token design and logic errors impacting Ploutos, LAXO, STO, HedgePay, and an unknown contract, underscoring the need for rigorous audits and continuous monitoring across all protocol layers.

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