This repository contains artifacts used by S2E as part of Codejitsu's entry in DARPA's Cyber Grand Challenge.
Recipes tell S2E how to generate input so that the input can exploit the binary
Type 1 and Type 2 vulnerabilities.
Recipes are used by S2E's Recipes plugin.
Recipes are now generated by s2e-env. Please refer to the s2e-env documentation for more details.
Various CGC-related scripts.
The samples folder contains various pre-compiled CGC binaries that you can use for testing.
You can build the samples on your host in a docker container as follows:
-
Check that you have a working S2E environment. We assume later that it is located in
$S2EDIR. If you do not have one, initialize it usings2e init. This will automatically fetch all required sources. Refer to the S2E documentation for more details.Note: you may also clone the
decreeandguest-imagesrepositories separately. -
Build the
linux-build-i386cgcdocker image. This image is created automatically when building the CGC VM image. Ifdocker imagesdoes not listlinux-build-i386cgc, rebuild the CGC VM images usings2e image_build cgc_debian-9.2.1-i386. -
Clone the CGC samples repository. These instructions assume that it is located in
$CGCDIR.git clone https://github.com/CyberGrandChallenge/samples.git
-
Build the samples
cd $CGCDIR docker run -ti --rm -w $(pwd) -v $HOME:$HOME linux-build-i386cgc /run_as.sh $(id -u) $(id -g) \ $S2EDIR/source/s2e/decree/scripts/build-cgc-samples.sh $S2EDIR/decree/samples
Note: the command above assumes that
$CGCDIRand$S2EDIRare subdirectories of your$HOME. If this is not the case, modify thedocker runcommand so that it also mounts$CGCDIRand$S2EDIRat the same locations in the docker image.