Skip to main content

Source: Сointеlеgrаph

Post-Ethereum Merge ETHW’s Proof of Work (PoW) chain has moved on to crack down on claims that it was hit by a network replay attack over the weekend.

Smart contract audit firm BlockSec noted what it described as a replay attack that took place on September 16, in which the attackers collected ETHW tokens by replicating Ethereum proof of stake (PoS) chain call data on the Ethereum PoW forked chain.

According to BlockSec, the root cause of the exploit was that the Omni bridge on the ETHW chain was using an old chain ID and incorrectly validating the correct crosschain message chain ID.

The main and testnets of Ethereum use two identifiers for different purposes, namely the network ID and the chain ID (chainID). Peer-to-peer messages between nodes use a network ID, while transaction signatures use a chain ID. EIP-155 introduced chainID as a means to prevent replay attacks between the ETH and Ethereum Classic (ETC) blockchains.

BlockSec was the first analytics service to flag the replay attack and notify ETHW, who in turn quickly debunked initial claims that the replay attack was carried out on the network. ETHW has made attempts to notify Omni Bridge of the exploit at the contract level:

Analysis of the attack showed that the exploiter started by sending 200 WETH through the Omni bridge on the Gnosis chain, and then replayed the same message on the PoW chain, receiving an additional 200 ETHW. This resulted in depleting the balance of the chain contract deployed on the PoW chain.

Related: Cross-chains in sight: hacks require more effective defense mechanisms

BlockSec’s analysis of the source code of the Omni bridge showed that the logic to validate the chain ID was present, but the verified chain ID used in the contract was extracted from a value stored in a storage named unitStorage.

The team explained that this is an incorrect chain ID obtained using the CHAINID opcode that was proposed by EIP-1344 and exacerbated by the fork that occurred after the Ethereum merger:

“This is probably due to the fact that the code is quite old (using Solidity 0.4.24). The code works fine all the time until the fork of the PoW chain.”

This allowed attackers to collect ETHW and possibly other tokens owned by the bridge on the PoW chain and trade them on marketplaces that list the respective tokens. contacted BlockSec to find out the value extracted during the exploit.

After the successful Merge Ethereum event, during which the smart contract blockchain switched from PoW to PoS, a group of miners decided to continue the PoW chain through a hard fork.

Source: Сointеlеgrаph

Leave a Reply