Back to Blog

BlockSec 视角:Jump “反向攻击” 漏洞是否真实存在?

Code Auditing
March 1, 2023
7 min read

近期,有关“利用 Oasis 多签进行反向攻击,从 MakerDao 金库转移资金”的事件备受关注。同时,我们也收到了一些关于 BlockSec 是否是此次操作背后“白帽黑客”的询问,因为我们曾于 2 月 18 日参与了“反向攻击”,协助 Platypus 挽回了 240 万美元的损失。我们在此澄清,BlockSec 与 Jump 事件中的任何操作均无关。 经过详细分析(感谢 Dan Smith 在 BlockWorks 上发表的精彩分析),我们认为 Jump “反向攻击”的操作方式与 Platypus 事件存在根本性差异。

此外,根据 Oasis 的声明,此次“反向攻击”是由于管理员多签访问存在漏洞所致。

Oasis 声明截图
Oasis 声明截图

然而,根据我们的分析,“反向攻击”的关键步骤是:

  • 禁用延迟执行。这是由 Oasis 多签钱包所拥有的 Service Registry 合约的所有者执行的。
  • 更改关键角色的注册合约地址,包括 AutomationBot 合约的 AUTOMATION_EXECUTOR,以及 CloseCommand 合约的 MCD_VIEW 和 MULTIPLY_PROXY_ACTIONS。这使得 Oasis 多签钱包能够直接调用 AutomationBot 执行关闭命令,而其实际执行的操作被替换为转移攻击者金库的新操作。

我们的分析表明,这些关键步骤并非源于声称的管理多签访问漏洞。

免责声明:本博客基于链上交易和公开信息撰写。如有任何问题或评论,请随时通过 [email protected] 与我们联系。

整体流程

在此次操作中涉及了多个地址,我们在以下 Google 表格中列出了一部分:

https://docs.google.com/spreadsheets/d/1k0PEci8wQ16X7JT7KRq9SvhaCA2yerJcqLn6EfAoPZs/edit?usp=sharing

具体而言,Jump “反向攻击”的高层思路如下:

  1. 攻击者的 Maker 金库可以通过 Oasis AutomationBot 智能合约进行管理,因为攻击者启用了 Oasis 提供的自动化买卖服务。
  2. AutomationBot 只能由具有 AUTOMATION_EXECUTOR 角色的地址进行操作。该地址是 Oasis Service Registry 合约中的一个配置项,可以由 Oasis 多签钱包进行更新。然而,Oasis Service Registry 合约的配置更新具有延迟执行机制,可以被 Oasis 多签钱包禁用。
  3. AutomationBot 实际执行的合约和函数也同样可以在 Oasis Service Registry 中进行配置。

因此,Oasis 多签钱包首先禁用了 Oasis Service Registry 合约的延迟执行,然后更改了 Oasis Service Registry 合约中的配置,将 AUTOMATION_EXECUTOR 角色设置为自身(多签钱包)。此更改立即生效。随后,多签钱包调用 AutomationBot 执行一个可以接管攻击者 Maker 金库(转移和赠与)的命令。由于 AutomationBot 可以管理攻击者的金库,整个操作得以成功。

我们认为,此过程与 Platypus 事件存在根本性差异。在 Platypus 事件中,我们发现了一个攻击者合约中的漏洞,并将其告知了 Platypus。随后,Platypus 利用该攻击者合约的漏洞,转移了属于他们自己的资金。然而,在 Jump 事件中,Oasis 多签禁用了延迟执行机制,更新了可以完全改变合约行为的关键配置,并利用 AutomationBot 的管理角色,代表攻击者操作 Maker 金库。

接下来,我们将详细阐述 Jump “反向攻击”的整个过程。

详细步骤

此次操作涉及多个协议和参与方,包括 Jump、Oasis、Wormhole 攻击者和 Maker。请注意,Maker 在此次操作中并未采取任何行动。

具体来说,攻击者创建了 Maker 金库(3010030179),并使用 ETH 作为抵押品,从金库中借入 DAI。攻击者还利用 Oasis 提供的自动化买卖服务来管理 Maker 金库的抵押率。

为了使用 Oasis 自动化服务,Oasis 提供的一个名为 AutomationBot 的智能合约需要被添加到金库的管理列表中。这意味着 AutomationBot 可以控制攻击者创建的 Maker 金库。之后,AutomationBot 可以操纵金库,并将金库的抵押品和债务转移到另一个由 Jump 控制的金库中。这就是“反向攻击”的基本过程。请注意,要调用 AutomationBot,交易需要从在 ServiceRegistry 合约中注册为 AUTOMATION_EXECUTOR 的地址发起。

步骤 1:将地址 04e1 添加到 Oasis 多签钱包

该交易将地址 04e1 添加到 Oasis 多签钱包中。该钱包目前有 12 个地址,需要 4 个签名者确认。

Oasis 多签钱包截图
Oasis 多签钱包截图

步骤 2:禁用 Oasis Service Registry 的延迟执行

此交易通过调用 changeRequiredDela(0) 来禁用 Oasis Service Registry 的延迟执行。请注意,Oasis Service Registry 是一个存储关键配置信息的智能合约,AutomationBot 将使用这些信息。通常,关键配置的更改会有一个延迟执行机制,例如在“反向攻击”中使用的 updateNamedService。通常,延迟执行是一种透明度的安全机制,以便关键信息的更新不会立即生效,从而让其他人有机会再次审查。

请注意,调用 changeRequiredDelay 的执行受到延迟执行的限制(因为对 reqDelay 的更改尚未生效)。

ServiceRegistry.sol 截图
ServiceRegistry.sol 截图
ServiceRegistry.sol 截图
ServiceRegistry.sol 截图

步骤 3:执行反向攻击

此交易执行了反向攻击。让我们深入了解 BlockSec 开发的交易分析工具 Phalcon 的执行跟踪输出。

请注意,此交易由 04e1 地址发起,并通过 Oasis 多签钱包执行,这意味着该操作至少由四名签名者签署。

步骤 3.1 禁用延迟执行

如跟踪所示,延迟被再次设置为零。这是为了应用步骤 2 中禁用的延迟执行操作。

反向攻击执行跟踪截图
反向攻击执行跟踪截图

步骤 3.2:创建两个合约并更新服务注册表

创建了两个新合约,将用作 MCD_VIEW 和 MULTIPLY_PROXY_ACTIONS 合约。

  • MCD_VIEW:0xceca8d8410797bc6c575fd8ba957708d1e85ed36
  • MULTIPLY_PROXY_ACTIONS:0xcaef24016d0fba2c1a9427371e0d79c5781b6ea8

然后,将这两个合约更新到 Oasis 服务注册表合约中。

反向攻击执行跟踪截图
反向攻击执行跟踪截图

步骤 3.3:更改 Automation Executor

反向攻击执行跟踪截图
反向攻击执行跟踪截图

Oasis 多签钱包被注册为 ServiceRegistry 合约中的 AUTOMATION_EXECUTOR。这一点至关重要,因为只有具有此角色的已注册合约才能调用 AutomationBot 合约。

AutomationBot.sol 截图
AutomationBot.sol 截图
AutomationBot.sol 截图
AutomationBot.sol 截图

步骤 3.4:要求 AutomationBot 关闭攻击者的金库

关键流程始于 AutomationBot 的 execute 函数。详细的执行函数通过参数传递。

要理解整个过程,我们首先看这个函数。

AutomationBot.sol 截图
AutomationBot.sol 截图

高级逻辑是,机器人首先从金库中提取 DAI(第 268 行),然后调用具体的命令合约在金库上执行(由 cdpId 指定)(第 274 至 278 行)。在此过程中,命令地址是 CloseCommand 合约。之后,需要进行 isExecutionCorrect 检查。

以下是 CloseCommand 合约的 execute 函数。它使用 KEY MULTIPLY_PROXY_ACTIONS 从服务注册表合约中获取实际的执行者合约地址。请注意,MULTIPLY_PROXY_ACTIONS 对应的合约地址已更新为新的地址。因此,CloseCommand 的实际执行可以被控制,以执行新合约中的任意操作。

CloseCommand.sol 截图
CloseCommand.sol 截图
CloseCommand.sol 截图
CloseCommand.sol 截图

请记住,在 CloseCommand 上调用 isExecutionCorrect 是为了检查执行是否成功(AutomationBot.sol 的第 278 行)。由于 view 地址已更新,viewerContract.getVaultInfo(cdpId) 的返回值可以是任意值,从而通过第 24 行(CloseCommand.sol)的检查。

在查看了代码后,让我们来看执行跟踪。从跟踪中我们可以看到,automationBot 调用了 CloseCommand 合约。CloseCommand 合约可以调用被替换的 MULTIPLY_PROXY_ACTIONS 合约来创建一个新金库(30231),将金库 30100(攻击者的)转移到 30231(新创建的金库),并将新金库 30231 赠予 Oasis 多签钱包。对攻击者的另一个金库(30179)也执行了类似的操作。

反向攻击执行跟踪截图
反向攻击执行跟踪截图

步骤 3.5 恢复状态

反向攻击执行跟踪截图
反向攻击执行跟踪截图

恢复服务注册表中更改的条目,并重新启用延迟执行。

步骤 3.6 将金库赠予地址 1536

现在,新的金库(30231 和 30232)由 Oasis 多签钱包控制。然后,在这些交易 TX1 TX2 中,金库被赠予了 0x15364305a06ba3ac6ba13dfe97ca0bad639adf41。然后,该地址可以通过支付金库中的债务来提取抵押品(以太坊)。由于抵押率很高(金库 30100 约为 293%),支付债务并提取抵押品可以收回约 12 万以太坊,而只需支付金库 30100 的约 7600 万债务。读者可以参考 Maker 协议文档 以获取有关这些操作的更多信息。

反向攻击执行跟踪截图
反向攻击执行跟踪截图

关于 BlockSec

BlockSec 是一家开创性的区块链安全公司,由一群全球知名的安全专家于 2021 年创立。公司致力于为新兴的 Web3 世界增强安全性和可用性,以促进其大规模采用。为此,BlockSec 提供智能合约和 EVM 链 安全审计 服务,用于安全开发和主动阻止威胁的 Phalcon 平台,用于资金追踪和调查的 MetaSleuth 平台,以及供 Web3 构建者在加密世界中高效冲浪的 MetaSuites 扩展。

截至目前,公司已为 MetaMask、Uniswap Foundation、Compound、Forta 和 PancakeSwap 等 300 多家尊贵客户提供服务,并在两轮融资中从 Matrix Partners、Vitalbridge Capital 和 Fenbushi Capital 等知名投资者那里获得了数千万美元的资金。

官方网站:https://blocksec.com/ 官方 Twitter 账号:https://twitter.com/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.

Best Security Auditor for Web3

Validate design, code, and business logic before launch. Aligned with the highest industry security standards.

BlockSec Audit