Hello everyone
This week I was able to make good progress on my project:
I started by learning about geth with the official documentation, and I studied in depth the codebase of geth, mainly the implementation of devp2p.
I have set up a private network of two geth nodes, one with the original version of geth and one with my modified version of geth.
So I modified geth and started with the ping message of the discv4: Ping Packet (0x01). The message contains the following information:
packet-data = [version, from, to, expiration, enr-seq ...]
version = 4
from = [sender-ip, sender-udp-port, sender-tcp-port]
to = [recipient-ip, recipient-udp-port, 0]
The devp2p specifications say this :
Implementations should ignore any mismatches in version.
So I did a first test to see the reaction between nodes. I changed version 4 with a random number in my custom geth node.
There were no unexpected behaviors; mismatches in the version were ignored.
Geth also has a set of tools, including the devp2p tool, which allows sending messages directly to a node. I also modified the tool in addition to the node by adding an additional command to send a custom ping.
I then decided to move forward with the fuzzing book and developed a basic go fuzzer. The fuzzer simply returns random inputs.
I integrated the random fuzzer on the ping message in my modified version of geth in order to modify the version field no longer manually but through a fuzzer.
So I have the basics of my project, now it is necessary to test this, but with different implementations of ethereum.
To achieve this I used Kurtosis, so I was able to create a private network with different implementations of ethereum :
The results are the same as before; the nodes manage to connect to each other and ignore the mismatched version of the ping message.
I also started to prepare for my project presentation scheduled for Tuesday, August 29.
To sum up, I was able to lay the foundations of my project by having a testing environment that works and a modified version of Geth that sends fuzzed messages via the devp2p.
Now I will have to study the devp2p specifications more to try to identify what to target when fuzzing messages and also deepen my knowledge of fuzzing to develop more fuzzers and develop fuzzers adapted to the situation.
I must also finish the preparations for my project presentation on August 29th.
I've created a repo for the custom Geth here :