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
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.