Tracking Peer Connections - A Defense Architecture Against Eclipse Attack
- Ekleen kaur
- Venkata Shiva Reddy Manchala
Bitcoin is the most powerful cryptocurrency, yet it doesn’t guarantee the honesty of its peers. It is vulnerable to different kinds of attacks, so is the network really safe? The network needs to be safeguarded from such adversaries.
In a peer-to-peer blockchain network, like bitcoin, the nodes in the network trust their peers to share the information of the longest blockchain and process transactions. But when an attacker who has control over a substantial number of IP addresses eclipses all connections to a victim bitcoin node, he can exploit the victim for attacks on bitcoin’s mining and consensus system. Upon inspecting the eclipse attack’s design, we present a novel attack mitigation architecture that prevents the attack before it could possibly happen. From the peer-node information gossiped on the blockchain network to make connections we use an N-ary tree to keep track of these connections. Assuming each node has an equal probability of being an attacker, the protocol deterministically thwarts the new connections to peers rooting back to the same parent. We prove the effectiveness of our protocol design as a powerful defense strategy against the eclipse attack by artificially simulating a small-scale version of blockchain network and analyzing its close resemblance to the real-world Bitcoin network. We launch an eclipse attack on this simulated network, where we anticipate and avert the attack by inhibiting connections to malicious nodes. Upon following our strategy, the attacker cannot make sufficient botnet connections to the victim necessary for the eclipse attack to succeed.
- Maven application
- Source language: Java
- uses Akka actor model for P2P network
- Here is the link to docker image file of the implmentation
Download and extract the docker image tar file from the link above and execute the image. Open bash and follow these instructions...
Change the directory:
cd /usr/src/app
Run the program by executing the command:
mvn compile exec:exec
The program prompts for the following inputs:

The following is the execution screenshots of the program at start of simulation:
End of simulation after a node is eclipsed:

The program runs indefinitely if no victim node gets eclipsed and needs to be explicitly terminated.
The source code contains two configurations where we can choose to either print the logs to STDOUT or a log file.

