Back to Blog

BlockSec 如何找回被盗资金:三个代表性案例的技术视角

February 20, 2023

DeFi黑客攻击仍在发生。对于被盗的DeFi项目资金,通常很难追回。一些项目会与黑客协商,提供赏金并承诺放弃法律诉讼。有时这会奏效,但会树立一个坏榜样。这更像是鼓励人们通过黑客攻击来获取赏金,而不是进行负责任的讨论。

BlockSec采取了一种不同的方法,帮助多个项目追回被盗资金。除了追踪资金流向并与交易所等中心化实体合作的一贯方式外,我们还想分享我们通过纯技术方法追回被盗资金的三次成功案例,包括最近的Platypus Finance TransitSwap Saddle Finance

Platypus Finance:挽回240万美元

The Block 有一篇关于我们如何为Platypusdefi追回资金的好文章。基本上,攻击者犯了一个错误,即无法将资金从攻击合约中移出。这是因为攻击者忘记编写将代币从攻击合约转移出去的代码逻辑。

然而,我们的团队发现可以通过利用攻击合约中现有的代码,将USDC从合约转移到项目合约。基本上,攻击者合约有一个函数,如果被调用,攻击合约就会批准固定数量的USDC给项目合约。这段代码被用于攻击目的。但是,我们可以重用这段代码逻辑,将USDC批准给项目合约,然后升级项目合约(这是一个代理合约),将USDC从攻击者合约移出。

我们通过POC评估了这个想法,并与Platypusdefi分享了信息。我们与他们紧密合作,这个方法奏效了!在以下交易中追回了240万美元的USDC。

TransitSwap:挽回24.6万美元

2022年10月1日,BSC上的TransitSwap遭到攻击。一些攻击交易被一个机器人抢跑。

然而,我们发现这个机器人可能存在profanity工具漏洞。该漏洞是由于生成私钥时随机性不足造成的。我们开发了一个工具,可以恢复此类易受攻击地址的私钥。

我们成功恢复了机器人的私钥。然而,资金在机器人合约中,而不是在EoA中。我们设法反编译了合约,并找到了一个可用于转移资金的函数。

我们已将资金转移到TransitFinance官方资金接收地址

阅读更多关于 我们如何为TransitSwap(和BabySwap)追回被盗资金

Saddle Finance:挽回380万美元

对于Saddle Finance,我们采取了另一种方式进行救援。基本思路是监听以太坊的待处理池,通过我们的交易预执行系统Mopsus检测攻击交易,并通过自动合成一个救援交易来阻止攻击,该交易会将易受攻击的资产移入我们的安全账户,并通过FlashBot抢跑攻击交易。下图显示了架构。

以下时间线显示了我们的系统如何为Saddle Finance挽回380万美元在2022年4月底。特别是,我们的系统在不到一秒的时间内完成了检测攻击交易并自动合成救援交易的整个过程。我们将所有挽回的资金退还给Saddle Finance。点击链接查看原始攻击交易我们的救援交易

阅读更多:通过主动威胁预防确保Web3安全

总结

以上三个只是代表性的案例。事实上,我们还有更多的成功挽回资金的案例。

我们一直认为DeFi的安全性无法通过单一方法来解决。没有万能药。BlockSec开发了几个工具(并正在开发更多工具)和服务来帮助保护整个生态系统。我们有Phalcon,一个区块链交易浏览器安全代码审计服务(涵盖Solidity、Rust、Go和Move),以及主动攻击缓解服务。我们为加密货币用户构建了几个工具来对抗网络钓鱼攻击,包括加密货币资金分析工具MetaSleuth和区块链浏览器的浏览器扩展MetaSuites。我们持续向MetaMask和Etherscan报告网络钓鱼URL和地址。BlockSec已与包括CronosFortaTokenlonKeyStoneGoplus等合作伙伴合作,以确保整个加密生态系统的安全。

如果您有任何问题,请随时与我们联系。

了解更多关于BlockSec的信息: 网站 | 文档 | Twitter | 博客 | TG群组

Sign up for the latest updates
Drift Protocol Incident: Multisig Governance Compromise via Durable Nonce Exploitation
Security Insights

Drift Protocol Incident: Multisig Governance Compromise via Durable Nonce Exploitation

On April 1, 2026 (UTC), Drift Protocol on Solana suffered a $285.3M loss after an attacker exploited Solana's durable nonce mechanism to delay the execution of phished multisig approvals, ultimately transferring administrative control of the protocol's 2-of-5 Squads governance with zero timelock. With full admin privileges, the attacker created a malicious collateral market (CVT), inflated its oracle price, relaxed withdrawal protections, and drained USDC, JLP, SOL, cbBTC, and other assets through 31 rapid withdrawals in approximately 12 minutes. This incident highlights how durable nonce-based delayed execution can decouple signer intent from on-chain execution, bypassing the temporal assumptions that multisig security implicitly relies on.

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

Weekly Web3 Security Incident Roundup | Mar 23 – Mar 29, 2026

This BlockSec weekly security report covers eight DeFi attack incidents detected between March 23 and March 29, 2026, across Ethereum and BNB Chain, with total estimated losses of approximately $1.53M. Incidents include a $679K flawed burn mechanism exploit on the BCE token, a $512K spot-price manipulation attack on Cyrus Finance's PancakeSwap V3 liquidity withdrawal, a $133.5K flash-loan-driven referral reward manipulation on a TUR staking contract, and multiple integer overflow, reentrancy, and accounting error vulnerabilities in DeFi protocols. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.

Newsletter -  March 2026
Security Insights

Newsletter - March 2026

In March 2026, the DeFi ecosystem experienced three major security incidents. Resolv Protocol lost ~$80M due to compromised privileged infrastructure keys, BitcoinReserveOffering suffered ~$2.7M from a double-minting logic flaw, and Venus Protocol incurred ~$2.15M following a donation attack combined with market manipulation.