← Back to Hack Archive

Harmony Horizon Bridge Hack

June 24, 2022$100 millionPrivate Key CompromiseEthereum / Harmony

The Story

On June 24, 2022, Harmony Protocol announced that their Horizon Bridge had been compromised, resulting in the theft of approximately $100 million in various cryptocurrencies. The Horizon Bridge was a cross-chain bridge that allowed users to transfer assets between Harmony's blockchain and Ethereum, Binance Chain, and Bitcoin.

The attack targeted the Ethereum side of the bridge, with the hacker stealing multiple assets including ETH, USDC, WBTC, and other ERC-20 tokens. Despite a $1 million bounty offer to the attacker for the return of funds, the stolen assets were laundered through Tornado Cash, a privacy-focused cryptocurrency mixing service.

The FBI later attributed the attack to the North Korean state-sponsored Lazarus Group, the same entity behind other major cryptocurrency heists, including the Ronin Bridge hack. The theft highlighted growing concerns about cross-chain bridge security, as these bridges had become frequent targets for sophisticated attackers.

Technical Analysis

The Harmony Horizon Bridge hack was distinct from many other bridge exploits as it didn't involve a smart contract vulnerability but rather a compromise of private keys. The bridge used a multisig wallet requiring 2-of-5 signatures to validate transactions, but these keys were insufficiently secured.

Investigation revealed several critical security flaws:

  1. The bridge employed a multi-signature scheme with a low threshold (2-of-5 signatures needed)
  2. The private keys were encrypted and stored in a way that allowed the attacker to decrypt them
  3. No abnormal transaction monitoring system was in place to detect unusual withdrawal patterns

The attack method has been linked to sophisticated social engineering, possibly combined with compromised endpoint security, rather than a blockchain code vulnerability:

// Simplified representation of the vulnerable multisig implementation
contract MultiSigWallet {
    // Only 2 out of 5 signatures needed - too low for high-value bridge
    uint256 public required = 2;
    uint256 public owners = 5;
    
    // Transaction execution function
    function executeTransaction(
        address destination,
        uint value,
        bytes data,
        bytes[] signatures
    ) public {
        // Verify at least 2 valid signatures
        require(
            _validateSignatures(destination, value, data, signatures),
            "Invalid signatures"
        );
        
        // Execute the transaction
        (bool success, ) = destination.call{value: value}(data);
        require(success, "Transaction execution failed");
    }
    
    // ... code omitted for brevity
}

Lessons Learned

  1. Private keys for high-value contracts should be stored in hardware security modules (HSMs)
  2. Multi-signature thresholds should be proportional to the value secured (2-of-5 was insufficient)
  3. Multiple layers of security, including anomaly detection, should be implemented
  4. Regular security audits should include social engineering and endpoint security assessments
  5. Cross-chain bridges should implement circuit breakers to limit loss from key compromises