Poly Network attacked: smart contracts vulnerability leads to cross-chain security incident

robot
Abstract generation in progress

Cross-chain Protocol Security Vulnerability Analysis: Analysis of the Poly Network Attack Incident

Recently, a hacker attack targeting the cross-chain interoperability protocol Poly Network has attracted wide attention in the industry. According to the security team's analysis, this attack was not due to the leakage of the keeper's private key, but rather the attacker cleverly exploited a vulnerability in the smart contract.

Attack Core

The key to the attack lies in the verifyHeaderAndExecuteTx function within the EthCrossChainManager contract. This function can execute specific cross-chain transactions through the _executeCrossChainTx function. Since the owner of the EthCrossChainData contract is the EthCrossChainManager contract, the latter is able to call the former's putCurEpochConPubKeyBytes function to modify the contract's keeper.

Attack Process

  1. The attacker passes carefully crafted data through the verifyHeaderAndExecuteTx function.

  2. This data makes the _executeCrossChainTx function call the putCurEpochConPubKeyBytes function of the EthCrossChainData contract.

  3. Through the above operations, the attacker successfully changed the keeper role to the specified address.

  4. After completing the keeper replacement, the attacker can arbitrarily construct transactions to withdraw any amount of funds from the contract.

Attack Impact

After the attack occurred, other users' normal transactions were rejected due to the modification of the keeper. This situation has occurred on multiple blockchain networks, including Binance Smart Chain and Ethereum.

Security Insights

  1. The permission management of smart contracts is crucial, especially when it comes to modifying permissions for key roles (such as keepers).

  2. The security of cross-chain operations needs special attention, as they often involve complex interactions and high-value assets.

  3. The design of contract functions should strictly limit the scope of executable operations to avoid vulnerabilities that can be exploited by attackers.

  4. Regular security audits and vulnerability assessments are crucial for identifying and fixing potential issues.

This incident reminds us once again that security is always the primary concern in the rapidly evolving blockchain ecosystem. For developers and project teams, continuously improving security measures and enhancing code quality are key to protecting user assets.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 5
  • Share
Comment
0/400
DefiSecurityGuardvip
· 07-29 04:55
mmm typical keeper address exploit... seen this coming tbh. cross-chain always = honeypot waiting to happen
Reply0
BlockchainBouncervip
· 07-26 16:18
Another sucker is in trouble.
View OriginalReply0
WenAirdropvip
· 07-26 16:12
Both bad at something and love to pretend
View OriginalReply0
BearMarketMonkvip
· 07-26 16:08
Being hit again, let's watch the show.
View OriginalReply0
DAOdreamervip
· 07-26 16:08
Security audits are done lazily, and management permissions are laid back.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)