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