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
~$4.72M Lost: TAC, Transit Finance & More | BlockSec Weekly
Security Insights

~$4.72M Lost: TAC, Transit Finance & More | BlockSec Weekly

This BlockSec weekly security report covers 3 notable attack incidents identified between May 11 and May 17, 2026, across TRON, TON, and Ethereum, with total estimated losses of approximately $4.72M. Three incidents are analyzed in detail: the highlighted $1.88M Transit Finance exploit on TRON, where a deprecated swap bridge contract with lingering token approvals was exploited through arbitrary calldata forwarding; the $2.8M TAC TON-to-EVM bridge exploit caused by missing canonical wallet verification in the jetton deposit flow; and the $46.75K Boost Hook exploit on Ethereum, where spot price manipulation on a Uniswap V4 hook-based perpetual protocol forced the protocol to buy tokens at inflated prices using its own reserves.

~$15.9M Lost: Trusted Volumes, Wasabi & More | BlockSec Weekly
Security Insights

~$15.9M Lost: Trusted Volumes, Wasabi & More | BlockSec Weekly

This BlockSec bi-weekly security report covers 11 notable attack incidents identified between April 27 and May 10, 2026, across Sui, Ethereum, BNB Chain, Base, Blast, and Berachain, with total estimated losses of approximately $15.9M. Three incidents are analyzed in detail: the highlighted $1.14M Aftermath Finance exploit on Sui, where a signed/unsigned semantic mismatch in the builder-fee validation allowed an attacker to inject a negative fee that was converted into positive collateral during settlement; the $5.87M Trusted Volumes RFQ authorization mismatch on Ethereum; and the $5.7M Wasabi Protocol infrastructure-to-contract-control compromise across multiple EVM chains.

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

Best Security Auditor for Web3

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

BlockSec Audit