Back to Blog

Web3のセキュリティ:プロアクティブな脅威防止

January 28, 2023
5 min read

はじめに

過去3年間、DeFiエコシステムではいくつかのセキュリティインシデントが観測されています。これらの脅威に対抗するため、コミュニティでは静的コード監査、スマートコントラクトスキャンツール、動的ファジングなどのコード中心の手法が採用されています。これらは有効性を示していますが、コード中心のアプローチだけではセキュリティ問題やプロジェクトユーザーの資産を完全に解決することはできないと我々は主張します。脆弱なコントラクトが複数の信頼できるコード監査会社によって監査されている事例は数多く存在します

我々は、既存のコード中心のアプローチに加えて、脅威に対抗するための、より能動的な脅威防止ソリューションが存在すべきだと信じています。このアイデアについて2021年末に社内で検討し、2022年初頭にIronDomeというシステムを開発しました。それ以来、BlockSec社内でこのシステムを導入しています。2022年、IronDomeは複数の攻撃を阻止し、500万ドル以上のユーザー資産を救済しました。これには、2022年4月にSaddle Financeへのエクスプロイトを防ぎ、380万ドルを救済した事例も含まれます。

本ブログでは、IronDomeのシステムアーキテクチャと成功事例について詳しく説明します。また、システムの限界と、将来の脅威防止の方向性についての洞察も議論します。

ハイレベルシステムアーキテクチャ

IronDomeの基本的な考え方は、Ethereumのペンディングプールを監視し、トランザクション事前実行システムMopsusを通じて攻撃トランザクションを検出し、救済トランザクションを自動的に合成して脆弱な資産を安全なアカウントに移動させることで攻撃を阻止し、FlashBotによる攻撃トランザクションのフロントランニングを行うことです。以下の図はアーキテクチャを示しています。

システムアーキテクチャの概要
システムアーキテクチャの概要

Mempool監視

IronDomeは、カスタマイズされたGethクライアントを通じてメモリプール内のペンディングトランザクションを監視します。重要な点は、システムがトランザクションを迅速に監視し、できるだけ多くのトランザクションを監視する必要があることです。

攻撃検出

各ペンディングトランザクションは、攻撃検出モジュールに渡されます。これらのトランザクションはまだチェーン上にないため、トランザクション事前実行エンジンMopsusを活用してこれらのトランザクションを事前実行し、トランザクションの実行時状態と結果に基づいて攻撃(悪意のある)トランザクションを検出します。

救済Tx合成

攻撃トランザクションに対して、IronDomeは救済トランザクションとその補助コントラクトを自動的に合成します。救済トランザクションは、攻撃トランザクションと同様の方法で脆弱なコントラクトを「エクスプロイト」しますが、利益を攻撃者が管理するアカウントではなく、我々の安全なアカウント(マルチシグアカウント)に転送します。例えば、攻撃コントラクトと同様の補助コントラクトを自動的にデプロイできますが、トークン転送先アドレスを我々の安全なアカウントに置き換えます。もちろん、一部の攻撃トランザクションには、より複雑なアプローチが必要になります。

救済トランザクションは、攻撃トランザクションより先にチェーン上に記録される必要があります。現在のシステムでは、この目的のためにFlashBotを利用しています。まず、他の誰にも救済Txが傍受されないようにする必要があります。次に、救済トランザクションをブロックの最上位に配置するための戦略を取ることができます。

代表的な成功事例

IronDomeは2022年初頭に導入されました。このシステムは、複数の攻撃を検出・阻止することに成功しています。この表は、成功事例の一部をまとめたものです。

以下のタイムラインは、2022年4月末にSaddle Financeのために、我々のシステムが380万ドルを救済した経緯を示しています。特に、我々のシステムは、攻撃トランザクションを検出し、救済Txを自動的に合成する全プロセスを1秒未満で完了しました。救済された全資金はSaddle Financeに返還されました。元のハックTxはこちらで、我々の救済Txは以下のリンクで確認できます。

倫理的考慮事項

我々はシステムにおいてセキュリティ倫理を真摯に受け止めています。我々のシステムは、ユーザー資産を救済するために脆弱なコントラクトを「エクスプロイト」しますが、この行為に倫理的な問題はないと考えています。

  • 第一に、我々のシステムは脆弱なコントラクトを積極的にエクスプロイトしていません。ペンディング中の攻撃トランザクションを検出した場合にのみ反応し、同様のトランザクションを自動的に合成して攻撃トランザクションを阻止します。攻撃トランザクションを最初に作成することはありません。
  • 第二に、影響を受けたプロトコルと積極的にコミュニケーションを取り、救済した資金を返還しています。

限界

IronDomeはその有効性を示していますが、システムにはまだいくつかの限界があります。以下にこれらの限界を説明し、能動的な脅威防止のさらなる方向性について議論します。

  • 第一に、我々のシステムはメモリプール内のペンディングTxを監視します。攻撃者がFlashBotのようなプライベートトランザクションサービスを利用した場合、攻撃トランザクションはメモリプールに存在せず、検出されません。この問題に対処するため、プライベートトランザクションサービスプロバイダーと連携し、攻撃トランザクションを検出しブロックすること(我々のシステムと同様の方法で悪意のあるトランザクションを検出する)を求めています。さらに、我々のシステムがペンディングツールで攻撃Txを阻止できない場合でも、チェーン上の攻撃Txを検出し、さらなる攻撃トランザクションを防ぐために救済Txを送信することができます。多くのケースでは、攻撃トランザクションは複数存在することに注意してください。
  • 第二に、セキュリティは軍拡競争です。攻撃者が救済トランザクションの合成のハードルを上げている事例を目にしています。例えば、攻撃トランザクションを複数に分割し、利益の送金先アドレスを曖昧にすることができます。これらの問題は解決可能ですが、軍拡競争は止まらないと考えています。これらの問題に対処するためのソリューションに取り組んでいます。
  • 第三に、救済トランザクションを攻撃Txよりも先にチェーン上に記録する方法は、依然として未解決の問題です。一部の入札戦略は、救済Txがブロックに含められる可能性を高めることができますが、100%の保証はありません。

参考文献と further reading

[1] How to Make the BlockChain Attack “Blockable” | by BlockSec

[2] The Block: Stablecoin DEX Saddle Finance hacked for $10 million

[3] Lend Exploit Post-Mortem — HomeCoin (mirror.xyz)

[4] Equalizer Finance on Twitter: “We have recovered the funds from the vaults on Ethereum and BSC. Now the team is working on recovering the funds from the Polygon and Optimism chains. A big thank you to @BlockSecTeam who managed to block the attackers, protect and return the assets!” / Twitter

[5] FSWAP on Twitter: “The details of the attack on FSWAP liquidity progress” / Twitter

[6] https://forta.org/blog/blocksec-and-forta-work-to-secure-web3-beyond-audits/

[7] https://forta.org/blog/the-future-of-threat-prevention-in-web3/

Sign up for the latest updates
The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis
Security Insights

The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis

This BlockSec deep-dive analyzes the KelpDAO $290M rsETH cross-chain bridge exploit (April 18, 2026), attributed to the Lazarus Group, tracing a causal chain across three layers: how a single-point DVN dependency enabled the attack, how DeFi composability cascaded the damage through Aave V3 lending markets to freeze WETH liquidity exceeding $6.7B across Ethereum, Arbitrum, Base, Mantle, and Linea, and how the crisis forced decentralized governance to exercise centralized emergency powers. The article examines three parameters that shaped the cascade's severity (LTV, pool depth, and cross-chain deployment count) and provides an exclusive technical breakdown of Arbitrum Security Council's forced state transition, an atomic contract upgrade that moved 30,766 ETH without the holder's signature.

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026

This BlockSec weekly security report covers four attack incidents detected between April 13 and April 19, 2026, across multiple chains such as Ethereum, Unichain, Arbitrum, and NEAR, with total estimated losses of approximately $310M. The highlighted incident is the $290M KelpDAO rsETH bridge exploit, where an attacker poisoned the RPC infrastructure of the sole LayerZero DVN to fabricate a cross-chain message, triggering a cascading WETH freeze across five chains and an Arbitrum Security Council forced state transition that raises questions about the actual trust boundaries of decentralized systems. Other incidents include a $242K MMR proof forgery on Hyperbridge, a $1.5M signed integer abuse on Dango, and an $18.4M circular swap path exploit on Rhea Finance's Burrowland protocol.

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026

This BlockSec weekly security report covers four DeFi attack incidents detected between April 6 and April 12, 2026, across Linea, BNB Chain, Arbitrum, Optimism, Avalanche, and Base, with total estimated losses of approximately $928.6K. Notable incidents include a $517K approval-related exploit where a user mistakenly approved a permissionless SquidMulticall contract enabling arbitrary external calls, a $193K business logic flaw in the HB token's reward-settlement logic that allowed direct AMM reserve manipulation, a $165.6K exploit in Denaria's perpetual DEX caused by a rounding asymmetry compounded with an unsafe cast, and a $53K access control issue in XBITVault caused by an initialization-dependent check that failed open. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.