Breakdown: How the hacker stole 80k ETH from the Solana Wormhole bridge

Breakdown: How the hacker stole 80k ETH from the Solana Wormhole bridge
фото показано с : cryptoslate.com

2022-2-3 16:00

One of the worst hacks against the Solana blockchain happened on Wednesday when a hacker managed to transfer 80,000 ether (ETH), over $214 million at the moment of writing, out of the Solana system and into the Ethereum blockchain through the Wormhole bridge – a service providing the ability to transfer funds between the different blockchains.

Explained in a tweet thread by the pseudonymous Twitter profile smartcontracts, the hacker finalized the exploit by transferring the 80,000 ETH out of the Wormhole smart contract on Ethereum in a single transaction. As it turned out, this was just the final move in a series of hacks that enabled the hacker to steal the funds. 

“Although it’s dramatic, this transaction is just the very end of an interesting series of events. I had to start working my way backward to figure out how this was even possible,” smartcontracts tweets.

Guardians signed off a false transfer

Wormhole is a so-called bridge, a smart contract, on Ethereum in this case, that provides a way to move crypto assets between different blockchains. According to smartcontracts, from a high-level viewpoint, Wormhole specifically has a set of co-called guardians that sign off on transfers between the blockchains.

The Wormhole guardians had somehow signed off on this 80,000 ETH transfer as if it was 100% legitimate.

“The transaction that pulled out 80,000 ETH was actually the attacker transferring 80,000 ETH from Solana to Ethereum. I originally thought that the contract might have incorrectly validated the signatures on the transfer, but the signatures [were] completely checked out.”

According to smartcontracts, the first breakthrough and partial explanation came from a transaction on Solana which somehow minted 120,000 “Wormhole ETH”, wrapped ether on Solana, out of nowhere. Since the hacker was able to mint Wormhole ETH on Solana, he was able to correctly withdraw it back to Ethereum.

“Solana is kinda weird”

Examining the hacker’s transaction history, there’s a transaction that came right before the minting of the 120,000 Wormhole ETH. In this transaction, the hacker mints only 0.1 Wormhole ETH, as if the hacker was testing the function with a small amount.

A further examination of the hacker’s transaction history reveals that the hacker did make a deposit of 0.1 ETH from Ethereum into Solana. Though the attacker did not make an ETH deposit of 120,000 ETH into the Wormhole smart contract on Ethereum, there’s something interesting about this deposit.

As smartcontract explains in his tweet, the transactions that minted Wormhole ETH on Solana were triggering a Wormhole smart contract function called “complete_wrapped“. One of the parameters that this function takes is a “transfer message”, basically a message signed by the guardians of the bridge that says which token to mint and how much.

“Solana is kinda weird, so these parameters are actually smart contracts themselves. But the important thing is how these “transfer message” contracts get created. Here’s the transaction that made the 0.1 ETH transfer message,” smartcontracts tweets.

Who’s checking the checkers?

This “transfer message” contract is created by triggering a function called “post_vaa“. The most important thing is that post_vaa checks if the message is valid by checking the signatures from the guardians. That part seems reasonable enough, smartcontracts says, but it’s this signature checking step that broke everything.

The “post_vaa” function doesn’t actually check the signatures. Instead, in typical Solana fashion, there’s another smart contract that gets created by calling the “verify_signatures” function. One of the inputs to the “verify_signatures” function is a Solana built-in “system” program which contains various utilities the contract can use.

Within “verify_signatures”, the Wormhole program attempts to check that the execution that happened right before this function was triggered, was that the Secp256k1 signature verification function was executed.

“This verification function is a built-in tool that’s supposed to verify that the given signatures are correct. So the signature verification has been outsourced to this program. But here’s where the bug comes in,” smartcontracts tweets.

The Wormhole contracts used the function load_instruction_at to check that the Secp256k1 function was called first, but the load_instruction_at function was deprecated relatively recently because it does not check that it’s executing against the actual system address!

Game over

According to smartcontracts, the caller is supposed to provide as input the system address to the program being executed, but the hacker provided a different system address.

Here’s that system address being used as the input for the “verify_signatures” for the legitimate deposit of 0.1 ETH:

Correct system address input

But here’s the “verify_signatures” transaction for the fake deposit of 120k ETH:

False system address input 

That’s not the system address!

“Using this “fake” system program, the attacker could effectively lie about the fact that the signature check program was executed. The signatures weren’t being checked at all!,” smartcontracts tweets.

“After that point, it was game over. The attacker made it look like the guardians had signed off on a 120k deposit into Wormhole on Solana, even though they hadn’t. All the attacker needed to do now was to make their “play” money real by withdrawing it back to Ethereum. And one withdrawal of 80k ETH + 10k ETH later (everything in the bridge on Ethereum), everything was gone.”

The post Breakdown: How the hacker stole 80k ETH from the Solana Wormhole bridge appeared first on CryptoSlate.

Similar to Notcoin - TapSwap on Solana Airdrops In 2024

origin »

Solana (SOL) на Currencies.ru

$ 162.49 (+0.98%)
Объем 24H $3.137b
Изменеия 24h: -0.55 %, 7d: 5.81 %
Cегодня L: $157.81 - H: $162.49
Капитализация $72.927b Rank 5
Цена в час новости $ 95.79 (69.63%)

solana eth hacker bridge wormhole breakdown transfer

solana eth → Результатов: 47


Solana опередила Ethereum по числу транзакций

Эфириум (ETH) занимает первое место в рейтинге блокчейнов по количеству развернутых децентрализованных приложений (DApps). Однако сеть Solana смогла обойти ETH по активности пользователей, говорится в отчете команды Nansen.

2022-9-21 15:55


Solana и NEAR прогнозируют взрывной год

Гигант инвестиций в цифровые активы Pantera Capital даёт оптимистичный прогноз на 2022 год для таких конкурентов Ethereum (ETH), как Solana (SOL) и Near. В последнем письме инвесторам партнёр Pantera Пол Верадитакит заметил, что конкурирующие платформы смарт-контрактов отбирают рыночную долю Ethereum, которая в настоящее время составляет 63% от общей заблокированной стоимости в децентрализованных финансах (DeFi) (на […] Материал Solana и NEAR прогнозируют взрывной год появился сначала на WHATTONEWS – Новости криптовалют.

2022-1-24 13:15


Фото:

Airbnb Crypto Payment Plans — Odds-On Solana, Cardano, XRP, Shiba Inu Making The List

Co-founder and CEO of Airbnb, Brian Chesky, has confirmed that his company is already underway with plans to integrate crypto payments into its platform. The planned crypto adoption will follow the likes of AMC Theatres, which now accept payments for movies in Bitcoin (BTC), Litecoin (LTC), Ethereum (ETH), and Bitcoin Cash (BCH), and Shiba Inu […]

2022-1-6 19:51


Почему на этом этапе покупка Ethereum более перспективна, чем Solana

Блокчейн Solana перетянул у Cardano (ADA) статус одного из главных конкурентов Ethereum. На фоне впечатляющего роста криптовалюта SOL начала наступать на пятки ETH, прочно заняв место в пятёрке лучших криптовалют.

2021-11-21 13:27


Фото:

Конкуренты Ethereum — в «одной лодке» с этим альткоином

Рауль Пэл рассказал о своем видении динамики рынка криптовалют. Бывший топ-менеджер Goldman Sachs, Рауль Пэл, считает, что динамика целого ряда конкурирующих с Ethereum альткоинов —  Cardano (ADA), Solana (SOL), Avalanche (AVAX) и Terra (LUNA) — зависит от динамики цены самого ETH.

2021-11-8 13:18


Попытка выхода ETH из консолидации и много альткойнов — Технический обзор от 1 сентября 2021

Краткосрочный торговый диапазон под сопротивлением $50 тыс. в BTC/USD, надвигающийся прорыв последнего сопротивления в ETH/USD и целый ряд альткойнов — Solana, Terra, ChainLink, Avalanche, и индекс DeFi — в новом обзоре от Cred и DonAlt, авторов рассылки Technical Roundup.

2021-9-1 06:06


Биткойн маячит последователям тренда — Технический обзор от 18 августа 2021

На этой неделе Cred и DonAlt, авторы рассылки Technical Roundup, обсуждают, как мейджоры (BTC/USD, ETH/USD) добрались до уровней сопротивления. Также речь пойдёт о прорывах некоторых альткойнов, в частности XRP, Solana и Aave.

2021-8-18 01:03


Технический обзор | 19 мая 2021

Пробой на старшем таймфрейме в паре BTC/USD и критический уровень поддержки на дневном таймфрейме в ETH/USD в очередном отчете Cred и DonAlt, авторов рассылки Technical Roundup. Из альткойнов, придерживаясь консервативного подхода и учитывая, что крупнейшие криптоактивы находятся у ключевых уровней, мы решили ограничиться рассмотрением основных ТА структур в BNB/USD и обновлением графиков Aave/BTC и Solana/BTC, […]

2021-5-19 04:14


Технический обзор | 5 мая 2021

На этой неделе Cred и DonAlt, авторы рассылки Technical Roundup, обсуждают боковое движение курса биткойна к доллару на фоне мощного ралли ETH. Из альткойнов сегодня в программе Litecoin/BTC и Solana/BTC, а также пара прорывов к доллару — Binance Coin/USD и THORChain/USD.

2021-5-5 05:28


Solana (SOL) is ‘Uniquely Positioned’ to Snatch Market Share from Ethereum & ETH Killers, says VC

With a market cap of $4.3 billion, SOL is the 24th largest crypto asset, trading around $16.12, up 20% in the past 24 hours and 800% YTD. Over the weekend, Sino Global Capital, which invests in blockchain projects, shared their research on why they are bullish on Solana, a high-performance blockchain that was chosen by […] The post Solana (SOL) is ‘Uniquely Positioned’ to Snatch Market Share from Ethereum & ETH Killers, says VC first appeared on BitcoinExchangeGuide.

2021-3-22 17:31