Back to Blog

BlockSec如何追回被盗资金:三个典型案例的技术视角

February 20, 2023
4 min read

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万美元

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

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

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

我们已将资金转移到官方TransitFinance Funds Receiver地址

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

Saddle Finance:挽回380万美元

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

以下时间线展示了[我们的系统如何在2022年4月底为Saddle Finance挽回380万美元](https://www.theblock.co/linked/144491/stablecoin-dex-saddle-finance-hacked-for-10-million)。特别是,我们的系统在不到一秒的时间内完成了检测攻击交易并自动合成救援交易的整个过程。我们将所有追回的资金退还给了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
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.

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026

This BlockSec weekly security report covers four DeFi attack incidents detected between April 6 and April 12, 2026, across Linea, BNB Chain, Arbitrum, Optimism, Avalanche, and Base, with total estimated losses of approximately $928.6K. Notable incidents include a $517K approval-related exploit where a user mistakenly approved a permissionless SquidMulticall contract enabling arbitrary external calls, a $193K business logic flaw in the HB token's reward-settlement logic that allowed direct AMM reserve manipulation, a $165.6K exploit in Denaria's perpetual DEX caused by a rounding asymmetry compounded with an unsafe cast, and a $53K access control issue in XBITVault caused by an initialization-dependent check that failed open. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.