Digital Asset Series: Poly Network Hack 2023
Ts. Dr. Suresh Ramasamy CISSP,CISM,GCTI,GNFA,GCDA,CIPM
CISO | Chief Research Officer | Keynote Speaker | Board Member
Not too long ago,in 2021, the cross-chain Poly DeFi network experienced a breach.?Seems like it's happened again!
Preamble
Concept of “cross-chain network”, which is basically an additional abstraction layer on the concept of distributed virtual machine. A cross-chain network allows two different blockchains to “communicate with each other”. Or, to be more precise, allows users of a certain blockchain to perform operations on another blockchain in a distributed and autonomous way. However, exactly because they operate across different blockchains, these networks usually require their own “virtual blockchain” to run smart contracts that govern the communications rules within the underlying networks.?
Poly Network is a cross-chain network that sits on top of different blockchains, including Bitcoin, Ethereum and Elrond. To overly simplify its architecture, Poly can be described by the following components:?
It is common for cross-chain networks, including Poly, to store at any moment large amount of liquidity in their underlying wallets, because there are many users performing cross-chain operations at the same time. Therefore, it is crucial to properly secure the very privileged cross-chain smart contracts that administer these wallets. Unfortunately, this is exactly what did not happen here.??
The 2021 Hack
A smart contract was hacked, containing about USD610 million (in Ether, Binance Coin and USDC) into external wallet. It happened due to a mismanagement of access rights between EthCrossChainManager and the EthCrossChainData.?
The 2023 hack
This year (2023), we see another hack affecting the Poly network (again!).
This happened on July 2, 2023 at 06:47:20 UTC. A sum of USD43 billion was issued and stolen. The actual amount, however, was much lesser due to liquidity issue.?
Poly then paused their smart contract EthCrossChainManager (sounds familiar?), notably on Metis BSC and Ethereum.?
DEDAUB team reconstructing the attack indicated its most likely due to a stolen private key of 3 out of 4 of Poly network's keepers.?
领英推荐
The operation to transfer tokens from the origin chain is called "lock" and the function to retrieve the tokens is called "unlock" in Poly. Using a system called "Consensus Node", Poly deploys EOA that signs off the unlock event on the destination chain, by including the relevant entropy from the origin chain confirming the lock event. Basically a corresponding lock/unlock pair. The header contains the state root of a Merkle tree and is signed together with the state root.?
In the hack, the code was correctly invoked and signed by the 3 centralized keepers. It was also confirned that the keepers were not modified prior to the attack for the span of 2 years, as the list of keepers remains the same and consist of 4 EOA. This confirms the private key compromise.?
Otherwise, there would have been a logic bug affecting the Merkle prover.?
Poly took about 7 hours to respond to the attack. At the same time, the attacker had orchestrated several transaction on multiple chains to exploit this.?
?While technically this is proven, there is no evidence otherwise that the private key is indeed compromised. There is a slight possibility that this may be an off-chain compromise of the software in the 3 out of 4 keepers. Aka phishing attack which resulted in signing a maliciously crafted proof.?
If the keys were indeed compromised, this brings to question the very nature of crypto bridges and it's suitability of controlling so much funds.?
Reference
[1] Gagliardoni, T. (2021). The Poly Network Hack Explained. Retrieved 3 July 2023, from https://research.kudelskisecurity.com/2021/08/12/the-poly-network-hack-explained/
[2] Morales, J. (2023). Poly Network Exploit Used to Mint $34 Billion Worth of Assets on Multiple Chains. Retrieved 3 July 2023, from https://beincrypto.com/poly-network-exploit-hackers/
[3] DeFi platform Poly Network hacked, hackers issue millions of tokens on Metis, Polygon and BSC. (2023). Retrieved 3 July 2023, from https://www.fxstreet.com/cryptocurrencies/news/defi-platform-poly-network-hacked-hackers-issue-millions-of-tokens-on-metis-polygon-and-bsc-202307020655
[4] Dedaub: At the forefront of the smart contract security industry. (2023). Retrieved 3 July 2023, from https://dedaub.com/blog/poly-chain-hack-postmortem
This article was originally published at https://drsuresh.net/articles/poly23