三殊犬安全事件分析

三殊犬安全事件分析

7月21日,我们的DeFiRanger系统报告了几笔可疑交易。经过人工分析,我们确认这些交易是针对Sanshu Inu的攻击。具体来说,Sanshu Inu的Memstake合约被滥用deflation机制所攻击。 接下来,我们将通过多笔攻击交易来阐述攻击过程。

攻击流程

下图列出了攻击者(0x333)发起的一些交易。

攻击包含四个步骤,其中最关键的是第二步,它利用了ERC20代币的通缩机制来操纵Memstake智能合约的奖励计算。

  • 步骤1(准备):攻击者创建了两个攻击合约,第一个合约用于质押2049B的KEANU第二个是攻击合约。

  • 步骤2(操纵):攻击者首先通过闪电贷(《理解闪电贷及其在DeFi生态系统中的应用:迈向第一步》(SBC 2021))从uniswapV2 借入大量KEANU代币,然后使用步骤1中创建的第二个智能合约将代币存入/从中提取。由于KEANU具有通缩机制,每次交易会销毁2%的代币,因此实际存入Memestake的代币数量小于Memestake合约维护的user.amount值。攻击者重复此过程,使得Memestake中的KEANU代币数量减少到很小的数量(1e-07)。请参见交易0x00ed和下图。

  • 步骤3(获利):攻击者调用 Memestake.updatePool() 来更新 accMfundPerShare。该值依赖于KEANU代币的数量(在第二步中被操纵)。然后,攻击者获得了大量的Mfund(约6100万)。 有关更多详细信息,请参阅交易0xa945
  • 步骤4(兑换为WETH):攻击者将MFund和KEANU兑换为WETH,并通过Tornado.Cash洗钱。攻击者获得了55.9484578158357 ETH的利润。

杂项

有趣的是,攻击的第二/第三步与Flashbots有关。第二步用38 ETH购买KEANU(0x00ed)。该交易受到“沙盒攻击”(通过Flashbots)的攻击——这使得攻击者本人也成为了“沙盒攻击”的受害者。第三步(0xa945)在uniswap上出售MFund,这创造了一个套利机会,被Flashbots的搜索者捕获。

关于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/

官方Twitter账号:https://twitter.com/BlockSecTeam

Sign up for the latest updates
Weekly Web3 Security Incident Roundup | Feb 9 – Feb 15, 2026

Weekly Web3 Security Incident Roundup | Feb 9 – Feb 15, 2026

During the week of February 9 to February 15, 2026, three blockchain security incidents were reported with total losses of ~$657K. All incidents occurred on the BNB Smart Chain and involved flawed business logic in DeFi token contracts. The primary causes included an unchecked balance withdrawal from an intermediary contract that allowed donation-based inflation of a liquidity addition targeted by a sandwich attack, a post-swap deflationary clawback that returned sold tokens to the caller while draining pool reserves to create a repeatable price-manipulation primitive, and a token transfer override that burned tokens directly from a Uniswap V2 pair's balance and force-synced reserves within the same transaction to artificially inflate the token price.

Top 10 "Awesome" Security Incidents in 2025

Top 10 "Awesome" Security Incidents in 2025

To help the community learn from what happened, BlockSec selected ten incidents that stood out most this year. These cases were chosen not only for the scale of loss, but also for the distinct techniques involved, the unexpected twists in execution, and the new or underexplored attack surfaces they revealed.

#10 Panoptic Incident: XOR Linearity Breaks the Position Fingerprint Scheme

#10 Panoptic Incident: XOR Linearity Breaks the Position Fingerprint Scheme

On August 29, 2025, Panoptic disclosed a Cantina bounty finding and confirmed that, with support from Cantina and Seal911, it executed a rescue operation on August 25 to secure roughly $400K in funds. The issue stemmed from a flaw in Panoptic’s position fingerprint calculation algorithm, which could have enabled incorrect position identification and downstream fund risk.