The first step in fuzzing bitcoind is to create a test bed, a safe place where you can perform fuzzing without hurting anything. Fuzzing should never be performed on production systems, as it’s likely to cause failures or trigger security alarms.
Bitcoin supports the production network (mainnet), a test network (testnet), and a regression test network (regtest). For fuzzing, I used the regtest network, as it allowed me to set up a private, isolated Bitcoin network, perfect for fuzzing.
I began by creating a virtual machine that holds my regtest peers, fleur and viktor. I used Ubuntu 20.04, but any Linux will do. This step is not strictly necessary—you could just create the Docker instances directly on your host OS—but I wanted the extra layer of isolation.
Through the magic of Docker, ports on the virtual machine are mapped to ports on the fleur and viktor containers. When it’s all up and running, it’ll look like this: