Poly Network Hacker Attack Analysis: Contract Vulnerabilities Lead to Cross-Chain Fund Theft

robot
Abstract generation in progress

Analysis of the Hacker Attack Incident on Poly Network

Recently, the cross-chain interoperability protocol Poly Network was attacked by a Hacker, drawing widespread attention in the industry. A team of security experts conducted an in-depth analysis of the incident and concluded that the attackers did not implement the attack through private key leakage, but instead exploited a contract vulnerability to modify critical parameters.

Attack Core

The attacker successfully modified the keeper address of the EthCrossChainData contract by passing carefully crafted data to the verifyHeaderAndExecuteTx function of the EthCrossChainManager contract. This operation granted the attacker the permission to withdraw funds from the contract.

Attack Details

  1. The key to the attack lies in the verifyHeaderAndExecuteTx function of the EthCrossChainManager contract, which can execute specific cross-chain transactions through the _executeCrossChainTx function.

  2. The owner of the EthCrossChainData contract is the EthCrossChainManager contract, so the latter can call the putCurEpochConPubKeyBytes function of the former to modify the keeper.

  3. The attacker used the verifyHeaderAndExecuteTx function, passing in specially crafted data, which caused the _executeCrossChainTx function to perform an operation that modified the keeper address.

  4. After successfully replacing the keeper address, the attacker can construct transactions to extract any amount of funds from the contract.

Attack Process

  1. The attacker first called the putCurEpochConPubKeyBytes function through the verifyHeaderAndExecuteTx function of the EthCrossChainManager contract, changing the keeper.

  2. Subsequently, the attacker utilized the new keeper permissions to execute multiple fund withdrawal operations.

  3. After the attack is completed, the normal transactions of other users are rejected due to the modification of the keeper.

  4. Similar attack patterns have also been replicated on the Ethereum network.

Conclusion

The core of this attack lies in the fact that the keeper of the EthCrossChainData contract can be modified by the EthCrossChainManager contract, and the verifyHeaderAndExecuteTx function of the latter can execute data provided by users. The attacker exploited this mechanism by constructing specific data to successfully modify the keeper address, thereby gaining control over the funds in the contract.

This event highlights once again the importance of security audits for smart contracts, especially in complex scenarios such as cross-chain operations, where a comprehensive and rigorous examination of contract logic is needed to prevent potential security risks.

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
  • 9
  • Share
Comment
0/400
WenMoonvip
· 07-18 14:18
Just be played for suckers, huh.
View OriginalReply0
ShibaMillionairen'tvip
· 07-18 12:53
Seeing another scam project really makes me laugh.
View OriginalReply0
GmGnSleepervip
· 07-15 15:01
There are vulnerabilities everywhere; it's better to just sleep.
View OriginalReply0
CryptoAdventurervip
· 07-15 15:01
Another wave of suckers has been played for suckers.
View OriginalReply0
BearMarketSurvivorvip
· 07-15 15:00
Another Ponzi scheme has collapsed.
View OriginalReply0
BlockchainFoodievip
· 07-15 14:51
tastes like a badly cooked smart contract soup... needs more security seasoning fr
Reply0
EthMaximalistvip
· 07-15 14:46
Who wrote this lock?
View OriginalReply0
DataChiefvip
· 07-15 14:41
Another contract has been breached, huh.
View OriginalReply0
Rugman_Walkingvip
· 07-15 14:32
These people are really greedy.
View OriginalReply0
View More
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)