Digital Asset Series: Poly Network Hack 2023
Credit: SLK.ai

Digital Asset Series: Poly Network Hack 2023

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:?

  • A master wallet for each one of the underlying Layer-1 networks (e.g., one for Bitcoin, one for Ethereum, …) each of them containing a certain amount of funds.?
  • A set of smart contracts that interpret and execute users’ instructions (e.g. “please exchange this amount of Bitcoin that I am sending to you into Ether tokens”) by calling functions on the related above wallets.?
  • A blockchain layer (the Poly network) where the above smart contracts run.?


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

No alt text provided for this image
Credit: DEDAUB

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.?


No alt text provided for this image
ResearchGate: Sample Merkle Tree


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

要查看或添加评论,请登录

Ts. Dr. Suresh Ramasamy CISSP,CISM,GCTI,GNFA,GCDA,CIPM的更多文章

  • Is digitalisation lost?

    Is digitalisation lost?

    Whether you're at a CxO seminar or speaking to CIO/CTO/CDO, you'll find digitalization being a key focus, in fact KPI…

  • Holidays and BYOE

    Holidays and BYOE

    This was an article I wanted to write last year while on vacation, but unfortunately got delayed and I forgot about it!…

  • 2024 - wrapped up

    2024 - wrapped up

    This is what I have produced for everyone's consumption this year. There is a bet below at the next section.

    3 条评论
  • Is CyberSecurity supposed to be expensive?

    Is CyberSecurity supposed to be expensive?

    Credits – This article is the result of an adhoc discussion between Vinod Ramachandran , Sivanathan Subramaniam and…

    1 条评论
  • Handling passwords in 2024 and beyond - NIST approach

    Handling passwords in 2024 and beyond - NIST approach

    Note: I previously wrote about passwords and how some changes in the industry had occured here -…

  • Addendum 1 - Lebanon Attack Case Study

    Addendum 1 - Lebanon Attack Case Study

    NOTE: This article is a continuation of Case Study on the Lebanon Pager Attack Today, I decided to continue on the case…

  • Case Study - Lebanon Pager attack

    Case Study - Lebanon Pager attack

    Trigger Warning: Explosive and Casualties Shocking news came out of Lebanon on reports of people experiencing explosion…

    7 条评论
  • Malaysian Internet - Issue of DNS Blocking

    Malaysian Internet - Issue of DNS Blocking

    Note; The author (me) was the person (for the longest time, since the beginning of DNS blocking in Malaysia) was the…

    9 条评论
  • Managing Professional Relationships - Bank Balance Approach

    Managing Professional Relationships - Bank Balance Approach

    In the previous article, we looked at how relationships can be categorised, taking clue from nature. in this article…

  • Human Relationships - Part 1

    Human Relationships - Part 1

    This set of article is a break from my usual cyber security based contents. I decided to write on this topic, observing…

社区洞察

其他会员也浏览了