🎉 [Gate 30 Million Milestone] Share Your Gate Moment & Win Exclusive Gifts!
Gate has surpassed 30M users worldwide — not just a number, but a journey we've built together.
Remember the thrill of opening your first account, or the Gate merch that’s been part of your daily life?
📸 Join the #MyGateMoment# campaign!
Share your story on Gate Square, and embrace the next 30 million together!
✅ How to Participate:
1️⃣ Post a photo or video with Gate elements
2️⃣ Add #MyGateMoment# and share your story, wishes, or thoughts
3️⃣ Share your post on Twitter (X) — top 10 views will get extra rewards!
👉
Poly Network Hacker Attack Analysis: Contract Vulnerabilities Lead to Cross-Chain Fund Theft
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
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.
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.
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.
After successfully replacing the keeper address, the attacker can construct transactions to extract any amount of funds from the contract.
Attack Process
The attacker first called the putCurEpochConPubKeyBytes function through the verifyHeaderAndExecuteTx function of the EthCrossChainManager contract, changing the keeper.
Subsequently, the attacker utilized the new keeper permissions to execute multiple fund withdrawal operations.
After the attack is completed, the normal transactions of other users are rejected due to the modification of the keeper.
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.