Back to Blog

PolyNetworkハッキングの初期分析

Code Auditing
August 11, 2021

PolyNetworkがハッキングされ、3億ドル以上が盗難されました。攻撃者は複数のチェーンで攻撃を実行しました。本ブログでは、ハッキングの可能性のある理由を分析するために、イーサリアム上の攻撃トランザクション(0xd8c1f7424593ddba11a0e072b61082bf3d931583cb75f7843fc2a8685d20033a)を使用します。初期分析によると、可能性のある理由として、クロスチェーンメッセージに署名するために使用される秘密鍵の漏洩、または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
Building a Secure Stablecoin Payment Network: BlockSec Partners with Morph
Partnership

Building a Secure Stablecoin Payment Network: BlockSec Partners with Morph

BlockSec has partnered with Morph as an official audit partner for the $150M Morph Payment Accelerator. By offering exclusive discounts on smart contract audits and penetration testing, BlockSec provides institutional-grade security to payment builders, ensuring a safe and resilient foundation for the future of global stablecoin payments.

Weekly Web3 Security Incident Roundup | Mar 9 – Mar 15, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 9 – Mar 15, 2026

This BlockSec weekly security report covers eight DeFi attack incidents detected between March 9 and March 15, 2026, across Ethereum and BNB Chain, with total estimated losses of approximately $1.66M. Incidents include a $1.01M AAVE incorrect liquidation caused by oracle misconfiguration, a $242K exploit on the deflationary token MT due to flawed trading restrictions, a $149K exploit on the burn-to-earn protocol DBXen from `_msgSender()` and `msg.sender` inconsistency, and a $131K attack on AM Token exploiting a flawed delayed-burn mechanism. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.

Venus Thena (THE) Incident: What Broke and What Was Missed

Venus Thena (THE) Incident: What Broke and What Was Missed

On March 15, 2026, an attacker bypassed the THE (Thena) supply cap on Venus Protocol (BNB Chain) through a donation attack, inflating a collateral position to 3.67x the intended limit and borrowing ~$14.9M in assets. Both sides lost money on-chain: Venus was left with ~$2.15M in bad debt after 254 liquidation bots competed across 8,048 transactions, while the attacker retained only ~$5.2M against a $9.92M investment. This deep dive examines what broke across three lines of defense (exposure limits, collateral valuation, and liquidation) and the monitoring gaps that left months of on-chain warning signals unacted upon.

Best Security Auditor for Web3

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

BlockSec Audit