Back to Blog

币安智能链上私有交易服务的安全与隐私顾虑

September 20, 2022

私有交易服务背景

私有交易服务旨在保护用户交易,而无需将交易广播到链上。该服务可以通过保护用户免受三明治攻击来帮助构建健康的生态系统。例如,攻击者无法监听待定池以抢跑其他交易。此外,私有交易服务还可以缓解 MEV 机器人之间的 Gas 费战争。这是因为 MEV 机器人可以利用此类服务,而不是在将提高 Gas 价格的待定工具中竞争,这使得普通交易难以被打包。

Flashbots 是以太坊上知名的私有服务提供商,并拥有关于该系统如何工作的优秀文档。它还提供私有交易数据的清晰 API。BNB48 在币安智能链(BSC)上提供了类似的服务(增强型 RPC)。

私有交易已被攻击者滥用

然而,私有交易服务可能被攻击者滥用,以便快速将攻击交易(未被 noticed)打包到链上。

最近,我们在 BSC 上看到了一笔“有趣的”交易。攻击者滥用了 BNB48 的私有交易服务来隐藏其攻击交易(攻击利润约为“15 万美元”)。从下面的截图可以发现,这笔交易是由 BNB48 验证者以“15 Gwei”的 Gas 价格打包的。

不幸的是,我们没有找到可以查询 BNB48 私有交易服务已打包交易的公共服务。但是,我们高度怀疑是这种情况,原因如下:

  • 根据 BNB48 的文档,要使用增强型 RPC,交易发送者需要将 Gas 价格设置为 15 Gwei。当然,仍然存在一种小概率情况,即攻击者没有使用 BNB48 私有交易服务,而是碰巧使用了普通的 RPC 端点进行交易,并将 Gas 价格设置为“15 Gwei”。
  • 此外,攻击者的合约有一个代码限制,即攻击交易只能在 BNB48 验证者上执行(见下图)。

从 Gas 价格和代码逻辑来看,我们高度怀疑这笔交易滥用了 BNB48 私有交易服务。

攻击者的 IP 已被泄露

有趣的是,受害者声称他/她已成功识别出攻击交易的 IP 地址和时间。然后,受害者在链上发送了一条消息,要求攻击者归还资金。

攻击者在了一系列交易中归还了资金[ 1 | 2 | 3 | 4 | 5 | 6].

这就引出了一个问题,即*如果攻击交易滥用了 BNB48 私有交易服务(通过发送交易到 BNB48 RPC 端点),攻击者的 IP 地址如何能够被识别和泄露?*基于资金已归还的结果,消息中的 IP 地址和地理位置应该是真实的。

私有交易服务的安全/隐私问题

我们认为私有交易服务是生态系统中的关键实体,因为它保护交易不被广播和免受三明治攻击。然而,它也带来了其他安全/隐私问题。

  • 如何防止攻击者滥用私有交易服务仍然是一个开放性问题。在私有交易服务中是否需要过滤服务仍然在社区中存在争议。我们目前正在开发一个系统,以帮助私有交易服务提供商监控攻击服务(了解攻击是有价值的)。
  • 如何保护使用私有交易服务的用户的隐私?例如,接受私有交易的端点可以记录发送者的信息,例如 IP 地址和时间。这些信息是否得到良好保护尚不清楚。

关于 BlockSec

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

迄今为止,公司已为 MetaMask、Uniswap Foundation、Compound、Forta 和 PancakeSwap 等 300 多家尊贵客户提供服务,并在两轮融资中获得了来自 Matrix Partners、Vitalbridge Capital 和 Fenbushi Capital 等知名投资者的数千万美元。

官方网站:https://blocksec.com/

官方推特账号:https://twitter.com/BlockSecTeam

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.