Back to Blog

三州犬セキュリティインシデントの分析

Code Auditing
July 21, 2021

7月21日、弊社のDeFiRangerシステムが、いくつかの不審なトランザクションを報告しました。手動分析の結果、これらのトランザクションはSanshu Inuへの攻撃であると確認しました。具体的には、Sanshu InuのMemstakeコントラクトdeflationメカニズムを悪用されて攻撃されました。 以下に、複数の攻撃トランザクションを用いて攻撃プロセスを説明します。

攻撃フロー

以下の図は、攻撃者 (0x333) によって実行されたトランザクションの一部を示しています。

攻撃は4つのステップで構成されています。最も重要なのは2番目のステップで、ERC20トークンのデフレメカニズムを利用してMemstakeスマートコントラクトの報酬計算を操作します。

  • ステップ1(準備):攻撃者は2つの攻撃コントラクトを作成します。1つ目は2,049BのKEANUを預け入れるコントラクトです。2つ目は攻撃コントラクトです。

  • ステップ2(操作):攻撃者はまず、UniswapV2からのフラッシュローン(フラッシュローンとそのDeFiエコシステムへの応用に関する最初のステップへの道(SBC 2021))を使用して大量のKEANUトークンを借用し、次にステップ1で作成した2番目のスマートコントラクトを使用してMemestakeにトークンを預け入れたり引き出したりします。KEANUにはデフレメカニズムがあり、各トランザクションで2%のトークンがバーンされるため、Memestakeに預け入れられた実際のトークン数は、Memestakeコントラクトが管理する値(user.amount)よりも少なくなります。攻撃者はこのプロセスを繰り返し、Memestake内のKEANUトークン数を非常に小さい値(1e-07)まで減少させます。トランザクション0x00edと以下の図を参照してください。

  • ステップ3(利益の獲得):攻撃者はMemestake.updatePool()を呼び出してaccMfundPerShareを更新します。この値はKEANUトークンの数(ステップ2で操作された数)に依存します。その後、攻撃者は大量のMfund(約61M)を取得します。 詳細については、トランザクション0xa945を参照してください。
  • ステップ4(WETHへの交換):攻撃者はMFundとKEANUをWETHに交換し、Tornado.Cashを通じて資金を洗浄します。攻撃者は55.9484578158357 ETHの利益を得ました。

その他

興味深いことに、攻撃のステップ2/3はFlashbotsに関連しています。ステップ2では、38 ETHでKEANUを購入します(0x00ed)。このトランザクションはサンドウィッチ攻撃(Flashbots経由)を受けており、攻撃者自身がサンドウィッチ攻撃の被害者となっています。ステップ3(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などの著名な投資家から2度の資金調達で数千万米ドルを受け取っています。

公式ウェブサイト:https://blocksec.com/

公式Twitterアカウント:https://twitter.com/BlockSecTeam

Sign up for the latest updates
Drift Protocol Incident: Multisig Governance Compromise via Durable Nonce Exploitation
Security Insights

Drift Protocol Incident: Multisig Governance Compromise via Durable Nonce Exploitation

On April 1, 2026 (UTC), Drift Protocol on Solana suffered a $285.3M loss after an attacker exploited Solana's durable nonce mechanism to delay the execution of phished multisig approvals, ultimately transferring administrative control of the protocol's 2-of-5 Squads governance with zero timelock. With full admin privileges, the attacker created a malicious collateral market (CVT), inflated its oracle price, relaxed withdrawal protections, and drained USDC, JLP, SOL, cbBTC, and other assets through 31 rapid withdrawals in approximately 12 minutes. This incident highlights how durable nonce-based delayed execution can decouple signer intent from on-chain execution, bypassing the temporal assumptions that multisig security implicitly relies on.

Weekly Web3 Security Incident Roundup | Mar 23 – Mar 29, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 23 – Mar 29, 2026

This BlockSec weekly security report covers eight DeFi attack incidents detected between March 23 and March 29, 2026, across Ethereum and BNB Chain, with total estimated losses of approximately $1.53M. Incidents include a $679K flawed burn mechanism exploit on the BCE token, a $512K spot-price manipulation attack on Cyrus Finance's PancakeSwap V3 liquidity withdrawal, a $133.5K flash-loan-driven referral reward manipulation on a TUR staking contract, and multiple integer overflow, reentrancy, and accounting error vulnerabilities in DeFi protocols. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.

Newsletter -  March 2026
Security Insights

Newsletter - March 2026

In March 2026, the DeFi ecosystem experienced three major security incidents. Resolv Protocol lost ~$80M due to compromised privileged infrastructure keys, BitcoinReserveOffering suffered ~$2.7M from a double-minting logic flaw, and Venus Protocol incurred ~$2.15M following a donation attack combined with market manipulation.

Best Security Auditor for Web3

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

BlockSec Audit