PeachCI
├── subjects: contains folders for different protocol implementations
│ └── FTP
│ └── lightftp
│ └── Dockerfile: for building the Docker image specific to the target server
│ └── run.sh: main script to run the experiment inside a Docker container
│ └── other necessary files (e.g.scripts)
├── fuzzers: contains folders for different generation-based fuzzing tool
│ └── Peach
│ └── Dockerfile: for building the Docker image specific to the fuzzing tool
│ └── run.sh: main script to fuzzing inside a Docker container
│ └── other necessary files (e.g.scripts)
├── pits: folders for different Pit files -- The naming of the pit file must match the protocol implementation.
│ └── lightftp.xml
│ └── dnsmasq.xml
└── scripts: contains all scripts for running experiments and analyzing results
├── execution
│ └── exec_common.sh: main script to run fuzzing experiments
└── analysis: How to use Prometheus and Grafana
└── README.md: this file
git clone https://github.com/csu-wingmate/PeachCI.git
cd PeachCI
export CIPATH=$(pwd)
export PATH=$PATH:$CIPATH/scripts/execution:$CIPATH/scripts/analysis
setup.sh
cd $CIPATH
cd fuzzers/Peach
docker build . -t peachcd $CIPATH
cd subjects/FTP/lightftp
docker build . -t lightftp- 1st argument (PROTOCOL) : name of the protocol Implementation(e.g., lightftp)
- 2nd argument (RUNS) : number of runs, one isolated Docker container is spawned for each run
- 3rd argument (SAVETO) : path to a folder keeping the results
- 4th argument (FUZZER) : fuzzer name (e.g., peach)
- 5th argument (TIMEOUT) : time for fuzzing in seconds
- 6th argument (OPTION) : configurations for the fuzzers (you can choose whether or not to use)
The following commands run 4 instances of Peach to simultaneously fuzz LightFTP for 5 minutes.
cd $CIPATH
mkdir results-lightftp
exec_common.sh lightftp 4 results-lightftp peach 300A successful script execution will produce output similar to this:
Waiting for all containers to stop: f2afb7663d5c 3e6692142351 c58f1648052b 6730a78e6055
PEACH: Collecting results and save them to results-lightftp
PEACH: Collecting results from container f2afb7663d5cSuccessfully copied 3.07kB to /home/cwl/PeachCI/results-lightftp/peach_1_logs
PEACH: Collecting results from container 3e6692142351Successfully copied 3.07kB to /home/cwl/PeachCI/results-lightftp/peach_2_logs
PEACH: Collecting results from container c58f1648052bSuccessfully copied 3.58kB to /home/cwl/PeachCI/results-lightftp/peach_1_branch
PEACH: Collecting results from container 6730a78e6055Successfully copied 3.58kB to /home/cwl/PeachCI/results-lightftp/peach_2_branch
PEACH: I am done!
All results are stored in tar files within the folder created in Step-2 (results-lightftp). This includes directories named similarly to peach-1-branch and peach-1-logs, where peach-1-branch contains the collected branch coverage data and peach-1-logs contains the log files from the Peach testing process, including the number of test runs and potential bug reports. The data collected in Step 3 on branch coverage counts, potential vulnerabilities, etc. can be used for plotting. We used Prometheus to collect the data and Grafana for visualising data such as code coverage over time.
snap start grafanaLaunch Grafana and access the Grafana website at localhost:3000 (login with the username and password both set to ‘admin’). In the settings, select Prometheus as the data source for collection, and import our dashboard template to utilize our custom dashboard.
This is an example of the generated code coverage report, potential vulnerabilities, and fuzzing iteration times.

PeachCI includes scripts for building and running all fuzzers on all targets with pre-configured parameters. To build all targets for all fuzzers, run the script build_all.sh. To execute the fuzzers, use the script exec_all.sh.
To add a new protocol and/or a new target server for a supported protocol, follow the folder structure outlined above and complete the following steps, using LightFTP as an example:
The folder for LightFTP server is located at subjects/FTP/lightftp.
Refer to the existing folder structure for LightFTP
subjects/FTP/LightFTP
├── Dockerfile (required): based on this, a target-specific Docker image is built (See Step-1 in the tutorial)
└── run.sh (required): main script to run experiment inside a container
All the required files (i.e., Dockerfile, run.sh) follow some templates so that one can easily follow them to prepare files for a new target.
To add a new fuzzer, follow the folder structure outlined above and complete the following steps, using PeachStar as an example:
The folder for PeachStar is located at fuzzers/PeachStar.
Refer to the existing folder structure for PeachStar
fuzzers/PeachStar
├── Dockerfile (required): based on this, a Docker image is built (See Step-1 in the tutorial)
└── run.sh (required): main script to run experiment inside a container
All the required files (i.e., Dockerfile, run.sh) follow some templates so that one can easily follow them to prepare files for a new fuzzer.