Back to Blog

PolyNetworkハックの初期分析

Code Auditing
August 11, 2021
3 min read

PolyNetworkがハッキングされ、3億ドル以上が盗難されました。攻撃者は複数のチェーンで攻撃を実行しました。このブログでは、ハッキングの可能性のある理由を分析するために、イーサリアム上の攻撃トランザクション(0xd8c1f7424593ddba11a0e072b61082bf3d931583cb75f7843fc2a8685d20033a)を使用します。初期分析によると、可能性のある理由の1つは、クロスチェーンメッセージに署名するために使用される秘密鍵が漏洩したか、PolyNetworkの署名プロセスにバグがあり、それが細工されたメッセージに署名するために悪用されたことです。

免責事項:このブログには、イーサリアム上のオンチェーンデータに基づいた初期分析の結果のみが含まれています。Poly Networkからの追加情報なしでは、調査結果を確認することはできません。

更新 2021/08/12:追加情報によると、攻撃の原因はキーパーが攻撃者によって変更されたため(秘密鍵の漏洩によるものではない)であることが示されています。キーパーを変更するためのトランザクションがそもそも実行できた理由についてのさらなる分析を行いました。

トランザクションとコールトレース

トランザクション分析システムを使用してトレースを復元します。

攻撃者 -> EthCrossChainManager -> EthCrossChainData -> LockProxy -> managerProxyContractforLockProxy

  • 0xc8a65fadf0e0ddaf421f28feab69bf6e2e589963:攻撃者
  • 0x838bf9e95cb12dd76a54c9f9d2e3082eaf928270:EthCrossChainManager
  • 0xcf2afe102057ba5c16f899271045a0a37fcb10f2:EthCrossChainData
  • 0x250e76987d838a75310c34bf422ea9f1ac4cc906:LockProxy
  • 0x5a51e2ebf8d136926b9ca7b59b60464e7c44d2eb:LockProxyのmanagerProxyContract

関数シグネチャ:

  • d450e04c (verifyHeaderAndExecuteTx)
  • 69d48074 (getCurEpochConPubKeyBytes)
  • 5ac40790 (getCurEpochStartHeight)
  • 0586763c (checkIfFromChainTxExist)
  • e90bfdcf (markFromChainTxExist(uint64,bytes32))

攻撃の主なプロセス

攻撃の主なプロセスは、攻撃者が署名されたデータをverifyHeaderAndExecuteTx()関数に渡したことです。この関数はデータをデコードし、データに署名するために使用された署名を検証します。このプロセスが成功すると、メッセージで指定されたメソッド(およびコントラクトアドレス)が実行されます。この攻撃中、スマートコントラクト0x250e76987d838a75310c34bf422ea9f1ac4cc906のunlock関数が呼び出され、Feiが攻撃者に転送されました。

要約すると、この攻撃はverifyHeaderAndExecuteTx関数に有効なパラメータが渡されたことが原因です。そして、パラメータは署名検証プロセスを通過できます。その後、メッセージで指定されたトランザクションが実行されます(ソフトウェアセキュリティにおける任意のコマンド実行のようなものです)。

このプロセスをよりよく理解するために、コールトレースの重要な値を復元します。

関数:verifyHeaderAndExecuteTx:

verifySig

unlock

LockProxyのmanagerProxyContractの変数は、unlock関数の呼び出し元アドレスの値と一致します。

結論

復元された値から、次のことがわかりました。

  1. 攻撃者はverifyHeaderAndExecuteTx関数に有効な署名付きメッセージを提供しました。
  2. LockProxyスマートコントラクトのonlyManagerContract修飾子はバイパスされていません。

これら2つの観察結果に基づいて、次のことを疑っています。

  1. 攻撃者がメッセージに署名するための正当なキーを所有している可能性があり、これは署名キーが漏洩したことを示唆しています。

または

  1. PolyNetworkの署名プロセスにバグがあり、それが細工されたメッセージに署名するために悪用された可能性があります。

ただし、調査結果を確認するためのオフチェーンデータがさらにありません。この分析がさらなる調査に役立つことを願っています。

クレジット:Yufeng Hu, Siwei Wu, Lei Wu, Yajin Zhou @BlockSec

Twitter:https://twitter.com/BlockSecTeam

Sign up for the latest updates
Newsletter - April 2026
Security Insights

Newsletter - April 2026

In April 2026, the DeFi ecosystem experienced three major security incidents. KelpDAO lost ~$290M due to an insecure 1-of-1 DVN bridge configuration exploited via RPC infrastructure compromise, Drift Protocol suffered ~$285M from a multisig governance takeover leveraging Solana's durable nonce mechanism, and Rhea Finance incurred ~$18.4M following a business logic flaw in its margin-trading module that allowed circular swap path manipulatio

~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly
Security Insights

~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly

This BlockSec weekly security report covers eight attack incidents detected between April 20 and April 26, 2026, across Ethereum, Avalanche, Sui, Base, HyperLiquid, and MegaETH, with total estimated losses of approximately $7.04M. The highlighted incident is the $1.3M GiddyDefi exploit, where the attacker did not break any cryptography or use a flash loan but simply replayed an existing on-chain EIP-712 signature with the unsigned `aggregator` and `fromToken` fields swapped out for a malicious contract, demonstrating how partial signature coverage turns any historical signature into a generic permit. Other incidents include a $3.5M Volo Vault operator key compromise on Sui, a $1.5M Purrlend privileged-role takeover, a $413K SingularityFinance oracle misconfiguration, a $142.7K Scallop cross-pool index injection, a $72.35K Kipseli Router decimal mismatch, a $50.7K REVLoans (Juicebox) accounting pollution, and a $64K Custom Rebalancer arbitrary-call exploit.

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.

Best Security Auditor for Web3

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

BlockSec Audit