Explained: Eclipse Attack
A blockchain is roughly composed of four modules in terms of its hierarchy:
- Consensus engine
- Scripting and virtual execution environment
- Transactions, block and chain logics
- Peer-to-peer network
Most research on associated topics has engrossed on the consensus engine (to improve transaction throughput) and the scripting language (to make blockchains more useful), leaving the properties of peer-to-peer network largely unexplored.
The security properties of a blockchain actually hinges on the peer-to-peer network. Research on eclipse attack was started by Ethan Heilman, Alison Kendler, Aviv Zohar, and Sharon Goldberg in 2015. Their research illustrated the first attack against Bitcoin’s peer-to-peer network by controlling hundreds of nodes, which is modeled as an unstructured random graph in their research paper. Another interesting research paper titled “Low-Resource Eclipse Attacks on Ethereum’s Peer-to-Peer Network” demonstrated the feasibility of launching eclipse attacks against Ethereum’s P2P network layer (which is usually modeled as a structured graph like Kademlia DHT) using only two machines. Eclipse attacks demonstrate the need for cross-layer design when one builds a complicated P2P system.
Eclipse Attacks
A P2P system, like limewire, is a computing or networking circulated request architecture that dividers tasks or workloads among peers deprived of the need for a central coordinating server or stable hosts. Peers communicate through Gossip protocols:
- Peer A is online & connects with peer B, which is pre-configured;
- Peer A consults peer B > learns the existence of peer C and D > connects with these new peers;
- Peer A broadcasts a new message to B, C and D. Once B, C, and D receive the broadcast, they will then send it to E, F, G, H…and so on.
Peer A’s view of the entire network solely depends on B, C and D. During an attack, peer A is essentially isolated from the rest of the network and its view can be manipulated by the attacker. This is what we call an Eclipse attack, a simple way to attack P2P systems including blockchains.
The cost of launching an ellipse attack is high when each peer is always listening and talking to other peers (an ideal state), because the hacker needs to control the entire network in order to hack the P2P system. Due to practical considerations, each peer only exchanges information with a small group of peers in reality. Thus, the cost to hack the system is not as high. The rationale behind Ethereum’s choice of making the outgoing connections to be 13 instead of 8 like Bitcoin is to make the overall security of the ethereum network more robust.
Nevertheless, there are still pitfalls in the Ethereum P2P network makes that allows a hacker to launch an eclipse attack.