Forked Chains: Blocksec Launches Collaborative Testing Tool

BlockSec funding round

Blockchain security tech firm BlockSec has sent off a new tool stash that empowers cooperative testing on confidential chains “forked from arbitrary (transaction) positions” and block numbers on the Ethereum mainnet. The “Phalcon Fork” is the developer and security researcher-focused toolkit. The Phalcon Fork’s goal is to give developers and security researchers more control over work on test nets like transaction testing, analysis, and debugging. BlockSec touts the ease with which it can “fork arbitrary (transaction) positions and block numbers” and retain certain “services and states” from the Ethereum mainnet as the source of this additional control in the user manual.

Instant-time snapshots of DeFi contracts make it easier to troubleshoot

Phalcon Fork has the following advantages over conventional solutions like Goerli: keep services and states from the mainnet, which makes it easier to quickly integrate and troubleshoot with other DeFi contracts.  With the tool stash, clients can likewise use elements, for example, previews, empowering them to save certain blockchain positions, and return to them voluntarily during their testing processes. The snapshots basically record the exchanges being executed and conveyed by the client at a given time.

The snapshot feature is especially useful in two scenarios

If the user wants to run the test script multiple times, they can simply go back to the original snapshot and run the script again. Else if the user wants to save some state and come back to them later, they can build a snapshot and later come back to that snapshot,” the manual states.

Phalcon Fork supports Fork Network Ether to enable private transactions on Ethereum mainnet

Phalcon Fork also has a built-in faucet, allowing users to purchase free Fork Network Ether (ETH) and conduct transactions on his private chain. To interact directly with the chain and execute transactions, Phalcon Fork provides a Remote Procedure Call (RPC) node called Fork RPC. It can be integrated into Ethereum virtual machine-compatible development frameworks such as Hardhat, Foundry, Remix, or added to MetaMask. Currently, users can only fork from Ethereum mainnet, but future support for additional blockchains such as Binance Smart Chain and Arbitrum have been hinted at.

Skyward Finance Suffered $3 Million Breach on Near Protocol

Skyward Finance Breach

Skyward Finance, a launchpad startup using Near Protocol, had $3 million stolen by an unidentified hacker in an unexpected breach. The Skyward Finance team recognized the scam and stated that a contractual vulnerability has been used to empty the Skyward Treasury. Skyward Finance is an initial DEX offering (IDO) system that empowers equitable token distribution for companies using the Near Protocol.

Skyward Finance Breach Recognized by BlockSec

BlockSec, a security company, claims that the vulnerability was used in only one transaction. The attacker retrieved over 1.1 million bundled Near tokens ($3 million) in a cycle from IDO’s treasury contract during this operation.

Anyone who wished to redeem Skyward Finance tokens for wrapped Near tokens could use the contract, which was an open contract and could be used by anyone who wanted to redeem Skyward Finance tokens. According to sources, BlockSec discovered a flaw in the contract’s token-redemption operation that neglected to verify redundant token account IDs.

Exploitation Process

Sanket Naikwadi, a community moderator for Aurora Lab, posted the information on Twitter. He said that the vulnerability was discovered by a member of the Near Protocol group who goes by the name Nearscout.

The sequence of tweets regarding the exploiting stated that the Skyward organization and Ref finance, a community-led multi-purpose decentralized finance (DeFi) network developed on the Near Protocol, have been informed of the depletion, according to the sequence of tweets on the vulnerability. According to reports, the exploiter started the drain by purchasing numerous skyward tokens on ref finance.

In addition, Naikwadi noted that the hacker has already removed NEAR from dozens of wallets, warning holders of SKYWARD Tokens to exchange their tokens elsewhere and stop communicating with Skyward Finance.

The incidence occurs as the number of cryptocurrency hacks rises. Over $650 million in damages were caused by as many as 44 scams in only one month.

BlockSec Discovers Replay Attack Using ETHPoW Tokens

Ethereum Replay Attack

After the Ethereum Merge, the proof-of-work (PoW) chain ETHW took action to dispel rumors that it had been the victim of an on-chain replay assault over the weekend. The replay attack, as disclosed by smart contract auditing company BlockSec, occurred on September 16 and included attackers harvesting ETHW tokens by replaying call data from Ethereum’s proof-of-stake (PoS) chain on the forked Ethereum PoW chain.

According to BlockSec, the Omni cross-chain bridge on the ETHW chain utilized an outdated chainID and wrongly verified the cross-chain message’s chainID, which was the primary source of the vulnerability.

BlockSec Identifies Replay Attack

A network ID and a chain ID (chainID) are the two identifiers used by Ethereum’s Mainnet and test networks for various purposes. Network ID is used for peer-to-peer messaging between nodes, whereas chainID is used for transaction signatures. Replay attacks between ETH and Ethereum Classic (ETC) blockchains were made impossible with the introduction of chainID in EIP-155.

The replay assault was initially identified by BlockSec, which then alerted ETHW. ETHW promptly refuted the first assertions that the replay attack had been conducted on-chain. This exploit was attempted to be reported to Omni Bridge by ETHW at the contract level.

unitStorage – A Verification chainID

The verification chainID used in the agreement took from a value kept in the storage with the designation unitStorage, according to BlockSec’s study of the Omni bridge source code.

The team clarified that this was not the right chainID obtained using the CHAINID opcode introduced by EIP-1344 and made worse by the fork that followed the Ethereum Merge.

Due to this, attackers were capable of stealing ETHW and other tokens owned by the bridge on the PoW chain, which they then sold on exchanges that deal in the relevant tokens.

A group of miners decided to maintain the PoW chain through a hard fork after Ethereum’s successful Merge event, which saw the smart contract network switch from PoW to PoS.

Omni NFT Finance Platform Hacked, Loses $1.4 Million in ETH

Omni flash loan reentrancy attack

In a flash loan reentrancy attack on Sunday, Omni, a non-fungible token (NFT) money market platform, lost roughly 1,300 ETH ($1.43 million), according to PeckShield.

Users can stake their NFTs with Omni in exchange for ether (ETH) tokens, typically from well-known collections like Bored Ape Yacht Club.

The hacker used the Omni protocol’s reentrancy weakness in the attack. Reentrancy is a known issue in Solidity-coded projects that enables a malicious actor to cause a smart contract to call an untrusted contract externally. This external call enters the protocol before the original function, allowing it to repeatedly entered to deplete the protocol’s liquidity.

NFTs Deposited as Collateral

Yajin Zhou, CEO of the blockchain security firm BlockSec, describes the attack process, which claimed that the attacker deposited NFTs from a group called Doodles. These NFTs served as security for a loan of wrapped ETH (WETH). The attacker then withdrew all, but one of the NFTs deposited as collateral, taking advantage of the reentrancy weakness. This operation started a malicious callback function that benefited the attacker. This feature allowed the hacker to purchase more doodles with the borrowed money before paying off the loan.

Doodle NFT

The remaining Doodle NFT from the original collateral is returned to the attacker once the position has been liquidated. The loan position is liquidated because the NFT’s value, which was used as collateral until the callback function was called, was inadequate to pay off the obligation. The attacker can now reenter the market by utilizing the borrowed WETH to purchase additional NFTs before liquidation occurs. The attacker later borrowed more WETH using the Doodles he had purchased with the previous loan as collateral. The hacker could withdraw the NFTs without repaying the loan since Omni did not recognize this new debt situation.