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
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.

FATF’s New Stablecoin Report Signals a Shift to Secondary-Market Compliance
Knowledge

FATF’s New Stablecoin Report Signals a Shift to Secondary-Market Compliance

BlockSec interprets FATF’s March 2026 report on stablecoins and unhosted wallets, explains why supervision is shifting toward secondary-market P2P activity, breaks down the report’s main recommendations and red flags, and shows how on-chain monitoring, screening, and cross-chain tracing can help issuers and VASPs respond with stronger, more effective compliance controls.

Weekly Web3 Security Incident Roundup | Mar 16 – Mar 22, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 16 – Mar 22, 2026

This BlockSec weekly security report covers seven DeFi attack incidents detected between March 16 and March 22, 2026, across Ethereum, BNB Chain, Polygon, and Polygon zkEVM, with total estimated losses of approximately $82.7M. The most significant event was the Resolv stablecoin protocol's infrastructure-key compromise, which led to over $80M in unauthorized USR minting and cross-protocol contagion across lending markets. Other incidents include a $2.15M donation attack combined with market manipulation on Venus Protocol, a $257K empty-market exploit on dTRINITY (Aave V3 fork), access control vulnerabilities in Fun.xyz and ShiMama, a weak-randomness exploit in BlindBox, and a redemption accounting flaw in Keom.

Best Security Auditor for Web3

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

BlockSec Audit