Nomad was drained for over $150M in one of the most chaotic hacks seen. | NFT CULTURE | NFTs & Crypto Art



What was the cause and how often does this happen?

It all started when’s tweet in the ETH Security Telegram channel. Although I had no idea what was going on at the time, just the sheer volume of assets leaving the bridge was clearly a bad sign.

One of the biggest gotchas is how many people followed the hackers copy/paste code on doxxed wallets essentially admitting to theft or some explanation on why they participated in the plundering of Nomad. 

At first, we thought there was a mistake with the decimals on the token. We checked and there has been a “send 0.01 WBTC, get 100 WBTC back” promotion in general; however, the action on our Moonbeam transaction was 0.01 WBTC so it’s not a misconfiguration

https://moonscan.io/tx/0xcca9299c739a1b538150af007a34aba516b6dade1965e80198be021e3166fe4c https://etherscan.io/tx/0xa5fe9d044e4f3e5aa5bc4c0709333cd2190cba0f4e7f16bcf73f49f83e4a5460

What’s worse is that the transaction to bridge in the WBTC didn’t actually prove anything. It simply called `process` directly. It would be extremely Not Good if you were able to process messages without proving first at this point, as there are two possibilities for the format:

Either the proof had been submitted separately in an earlier block, or there was something extremely wrong with the Replica contract. However, there was absolutely no indication that anything had been proven recently.

This left only one possibility – there was a fatal flaw within the Replica contract. But how? A quick look suggests that the message submitted must come from an acceptable root.

Unfortunately, this time around the hackers had a tiny side effect of auto-proving every message they sent. This is why the hack was so chaotic – you didn’t need to know about Solidity or Merkle Trees to be affected by this.

All you had to do was find a transaction that worked, give it your address instead of the other person’s and then re-broadcast it.

  tl;dr a routine upgrade had the effect of allowing messages to be spoofed on the Nomad network. This was exploited by attackers to make a copy/paste transaction and quickly drain the bridge in an attempt to steal funds from other users.

Shout out to @samsczsun for the original thread that was rewritten here.





Source link


Like it? Share with your friends!

Comments

comments