Back to Blog

BlockSec:Jump “反向利用” 漏洞探析——真的存在吗?

Code Auditing
March 1, 2023
7 min read

近期,“跳涨”利用Oasis多签合约转移MakerDao Vault资金的“反向利用”引起了广泛关注。与此同时,我们收到了几起关于BlockSec是否是此次操作的“白帽”的询问,因为我们曾参与帮助Platypus在2月18日救回240万美元的“反向利用”我们在此澄清,BlockSec并未参与Jump事件中的任何操作。 经过详细分析(感谢Dan Smith在BlockWorks上发表的精彩分析),我们认为Jump“反向利用”的运作方式与Platypus事件存在根本区别。

此外,据Oasis声明,该“反向利用”是由于admin多签访问中存在漏洞所致

Oasis声明截图
Oasis声明截图

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

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

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

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

整体流程

在本次操作中涉及了多个地址,我们在以下Google文档中列出了一些:

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

具体来说,Jump“反向利用”的高层思路如下。

  1. 由于Exploiter启用了Oasis提供的自动化买卖服务,其Maker Vaults可以由Oasis AutomationBot智能合约管理。

  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执行一个可以接管Exploiter Maker Vaults(转移和给予)的命令。由于AutomationBot可以管理Exploiter的Vaults,整个操作得以成功。

我们认为此过程与Platypus事件存在根本区别,在该事件中,我们发现了攻击者合约中的一个漏洞并与Platypus分享。[然后Platypus利用攻击者合约转移了属于他们自己的资金](https://app.blocksec.com/explorer/tx/avalanche/0x5e3eb070c772631d599367521b886793e13cf0bc150bd588357c589395d2d5c3)。然而,在Jump事件中,Oasis多签禁用延迟执行机制,更新了可以完全改变合约行为的关键配置,并利用AutomationBot的管理角色代表Exploiter操作Maker Vaults。

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

详细步骤

该操作涉及多个协议和方,包括Jump、Oasis、Wormhole Exploiter和Maker。请注意,Maker在操作过程中未采取任何行动。

具体而言,Exploiter创建了Maker Vaults(30100和30179),并使用ETH作为抵押品,从Vault中借入DAI。Exploiter还利用Oasis提供的自动化买卖服务来管理Maker Vault的抵押率。

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

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

[此交易](https://app.blocksec.com/explorer/tx/eth/0x1c50b75828613d94082c64affb9fb03e2d0566353b38d304a1a9963161b1b1dc)将地址04e1添加到了Oasis多签钱包。该钱包目前有12个地址,需要四个签名者确认。

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

[此交易](https://app.blocksec.com/explorer/tx/eth/0x08b0f18305dd7a4baa99f07aac5ab36893ffbdb2efcf807b0ac37ef16df49422)通过调用changeRequiredDela(0)禁用了Oasis Service Registry的延迟执行。请注意,Oasis Service Registry是一个智能合约,存储着AutomationBot将使用的关键配置信息。通常,配置更改会有一个延迟执行机制来处理关键操作,例如在“反向利用”中使用的updateNamedService。通常,延迟执行是一种透明化的安全机制,这样关键信息的更新就不会立即生效,其他人可以进行二次检查。

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

ServiceRegistry.sol
ServiceRegistry.sol

步骤3:执行反向利用

[此交易](https://app.blocksec.com/explorer/tx/eth/0x4f4117317a9f69915cbd060dc649c91bdc2963ea326ede46b14a2d8ef9007617)执行了反向利用。让我们深入分析BlockSec开发的交易分析工具Phalcon输出的执行跟踪。

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

步骤3.1 禁用延迟执行

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

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

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

  • MCD_VIEW: 0xceca8d8410797bc6c575fd8ba957708d1e85ed36
  • MULTIPLY_PROXY_ACTIONS: 0xcaef24016d0fba2c1a9427371e0d79c5781b6ea8

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

步骤3.3:更改自动化执行器

Oasis多签被注册为ServiceRegistry合约中的AUTOMATION_EXECUTOR。这是必需的,因为只有拥有此角色的注册合约才能调用AutomationBot合约。

AutomationBot.sol
AutomationBot.sol
AutomationBot.sol
AutomationBot.sol

步骤3.4:要求AutomationBot关闭Exploiter的Vault

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

为了理解整个过程,我们首先看一下这个函数。

AutomationBot.sol
AutomationBot.sol

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

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

CloseCommand.sol
CloseCommand.sol
CloseCommand.sol
CloseCommand.sol

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

在分析完代码后,让我们看一下执行跟踪。从跟踪中可以看出,automationBot调用了CloseCommand合约。CloseCommand合约可以调用已替换的MULTIPLY_PROXY_ACTIONS合约来打开一个新的Vault(30231),将Vault 30100(Exploiter的)转移到30231(新创建的),并将新Vault 30231给予Oasis Multisig Wallet。对Exploiter的另一个Vault(30179)也执行了类似的操作。

步骤3.5 恢复状态

恢复Service Registry中更改的条目,并重新启用延迟执行。

步骤3.6 将Vaults给予地址1536

现在新的Vaults(30231和30232)由Oasis Multisig Wallet控制。然后,在这些交易[TX1 TX2](https://app.blocksec.com/explorer/tx/eth/0x920e63573a3226402ab5c1758a1266e88018b6d346c9c3bd51f1285eb86ecb29)中,Vaults被给予了0x15364305a06ba3ac6ba13dfe97ca0bad639adf41。然后该地址可以支付Vault中的债务并提取抵押品(以太坊)。由于抵押率很高(Vault 30100约为293%),支付并提取抵押品可以收回约12万以太坊,而支付Vault 30100约7600万的债务。读者可以参考Maker协议文档了解更多关于这些操作的信息

关于BlockSec

BlockSec是一家开创性的区块链安全公司,成立于2021年,由一群全球杰出的安全专家组成。公司致力于为新兴的Web3世界增强安全性和可用性,以促进其大规模采用。为此,BlockSec提供智能合约和EVM链[安全审计](https://blocksec.com/code-audit)服务,用于安全开发和主动阻止威胁的[Phalcon](https://blocksec.com/phalcon)平台,用于资金追踪和调查的[MetaSleuth](https://metasleuth.io/)平台,以及为Web3构建者在加密世界高效冲浪的[MetaSuites](https://blocksec.com/metasuites)扩展。

迄今为止,公司已服务超过300家知名客户,如MetaMask、Uniswap Foundation、Compound、Forta和PancakeSwap,并在两轮融资中从Matrix Partners、Vitalbridge Capital和Fenbushi Capital等顶尖投资者那里获得了数千万美元的投资。

官方网站:[https://blocksec.com/](https://blocksec.com/)

官方Twitter账号:[https://twitter.com/BlockSecTeam](https://twitter.com/BlockSecTeam)

Sign up for the latest updates
~$15.9M Lost: Trusted Volumes & More | BlockSec Weekly
Security Insights

~$15.9M Lost: Trusted Volumes & More | BlockSec Weekly

This BlockSec bi-weekly security report covers 11 notable attack incidents identified between April 27 and May 10, 2026, across Sui, Ethereum, BNB Chain, Base, Blast, and Berachain, with total estimated losses of approximately $15.9M. Three incidents are analyzed in detail: the highlighted $1.14M Aftermath Finance exploit on Sui, where a signed/unsigned semantic mismatch in the builder-fee validation allowed an attacker to inject a negative fee that was converted into positive collateral during settlement; the $5.87M Trusted Volumes RFQ authorization mismatch on Ethereum; and the $5.7M Wasabi Protocol infrastructure-to-contract-control compromise across multiple EVM chains.

Newsletter - April 2026
Security Insights

Newsletter - April 2026

In April 2026, the DeFi ecosystem experienced three major security incidents. KelpDAO lost ~$290M due to an insecure 1-of-1 DVN bridge configuration exploited via RPC infrastructure compromise, Drift Protocol suffered ~$285M from a multisig governance takeover leveraging Solana's durable nonce mechanism, and Rhea Finance incurred ~$18.4M following a business logic flaw in its margin-trading module that allowed circular swap path manipulatio

~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly
Security Insights

~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly

This BlockSec weekly security report covers eight attack incidents detected between April 20 and April 26, 2026, across Ethereum, Avalanche, Sui, Base, HyperLiquid, and MegaETH, with total estimated losses of approximately $7.04M. The highlighted incident is the $1.3M GiddyDefi exploit, where the attacker did not break any cryptography or use a flash loan but simply replayed an existing on-chain EIP-712 signature with the unsigned `aggregator` and `fromToken` fields swapped out for a malicious contract, demonstrating how partial signature coverage turns any historical signature into a generic permit. Other incidents include a $3.5M Volo Vault operator key compromise on Sui, a $1.5M Purrlend privileged-role takeover, a $413K SingularityFinance oracle misconfiguration, a $142.7K Scallop cross-pool index injection, a $72.35K Kipseli Router decimal mismatch, a $50.7K REVLoans (Juicebox) accounting pollution, and a $64K Custom Rebalancer arbitrary-call exploit.

Best Security Auditor for Web3

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

BlockSec Audit