Back to Blog

阻止 TransitSwap 攻击:行业首例“反击”挽回 30 万美元

November 21, 2022
4 min read

自 BlockSec 于 2021 年首次亮相以来,我们一直认为仅靠代码审计无法解决 Web3 安全问题。因此,我们一直在投入探索 Web3 安全的新范式。为此,我们创建了 Phalcon,这是世界上第一个加密货币黑客阻止系统。

在 Phalcon 推出之前,该系统已在内部运行 2 年,成功阻止了 20 多起黑客攻击,并挽救了价值超过 2000 万美元的资产,其中包括为 Saddle Finance 挽回 380 万美元,为 Platypus 挽回 240 万美元,为 ParaSpace 挽回 500 万美元,等等。

在本系列文章中,我们将展示我们 Phalcon 系统的代表性成功案例。今天,让我们来看看行业首例“反击黑客”事件,挽回了 30 万美元。

我们如何为 TransitSwap(和 BabySwap)追回被盗资金

攻击与防御之间不断演变的较量,反映了现实世界的多元和多彩。我们的经验表明,主动威胁预防并非单一的独特技能;相反,它是一种系统性的方法,结合了各种安全技术和努力。

这个故事突出了网络安全的错综复杂,让我们回顾一下我们在 BSC 上与 BabySwap 和 TransitSwap 攻击相关的经验。有关详细分析,请参阅 我们之前的报告

Transit Swap 发布更新
Transit Swap 发布更新

2022 年 10 月 1 日 UTC 时间 14:47,我们的内部系统识别了一笔 攻击交易。在调查过程中,我们发现该交易是由一个机器人账户发起的,该账户抢先执行了 原始攻击。该账户的特征是前面有八个零,这表明它是由易受攻击的 Profanity 工具生成的。

机会偏爱有准备的人,我们已经根据 我们之前的努力 开发了一个救援工具,用于恢复易受攻击的 Profanity 地址的私钥。

UTC 时间 16:10,我们的工具仅用 20 分钟就迅速恢复了机器人的私钥。根据我们 标准的救援程序,我们将资金迅速转移到一个安全账户。此举确保了其他可能恢复私钥的人无法访问该账户并危及资金。

然而,我们面临一个障碍:资金位于机器人部署的 合约 中,而不是其 EOA 账户。通过反编译合约,我们识别了一个可用于检索资金的 withdraw 函数(如下图所示)。

我们将代币地址作为第一个参数,零作为第二个参数,执行了 一笔交易,成功地将资金从合约提取到机器人,然后 将其转移到我们的安全账户

几个小时后,我们的系统检测到 TransitSwap 上的另一项攻击。在几笔攻击交易中,有一笔再次被机器人抢先执行。然而,由于机器人部署的合约与之前的不同,用于转出资金的函数也不同。

我们决定将资金归还给被攻击的项目(而不是机器人),原因如下:

  • 首先,机器人通过抢先执行攻击交易获得了资金,我们认为这本身就是一种攻击;
  • 其次,这些资金属于攻击的受害者,即受影响 DeFi 协议的用户。这些用户已经因为 DeFi 协议中的漏洞而遭受了损失,理应从攻击者那里获得资金。

这种系统性的方法在我们应对现实世界安全威胁方面带来了显著的好处,强调了在不断变化的网络安全领域持续学习和适应的重要性。

如何访问服务

  • Phalcon 是一个 SaaS 平台。您可以 登录我们的网站 来探索功能、查看定价并直接订阅。
  • 您还可以 预约演示 以了解更多关于 Phalcon 的信息并获得专家安全建议。

让 Phalcon 为您的协议构建一条防线。它不需要协议方做很多工作,也不会带来额外的风险。它就像一个提供额外安全层的盾牌。立即 预约演示

查看更多 Phalcon 成功案例

关于 Phalcon

Phalcon 是 BlockSec 推出的一款攻击监控和自动化阻止平台。该平台能够准确识别攻击并自动阻止它们。Phalcon 旨在为 Web3 项目提供全面的上线后安全保护,包括持续监控、攻击阻止和紧急响应,从而保护协议提供商、LP 和 DAO 组织参与者的链上资产。

迄今为止,Phalcon 已成功阻止了 20 多起黑客攻击,挽救了价值超过 2000 万美元的资产。即使在早期客户阶段,Phalcon 也获得了顶级 DeFi 协议 Compound 的认可和资助,并为其建立了攻击阻止平台。

网站:https://blocksec.com/phalcon

Twitter:@Phalcon_xyz

电报:https://t.me/BlockSecTeam

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.