Proof of concept implementation of fuzzing workload using AFL as the fuzzer and Terraform to codify infrastructure
- Download and install
Terraform
following the Installation Guide - Edit
terraform.tfvars
as required - Deploy infrastructure by running the plan
terraform init
terraform validate
terraform apply
To destroy the infrastructure
terraform destroy
The Terraform script creates a bunch of resources in AWS. The resources basically are
- EC2 instances for deploying fuzzer containers
- EFS storage as shared storage across all instances
- VPC
- Internet Gateway
- Subnet and Route
- Security Group
- EFS Storage
- EFS Mount Target (NFS)
- IAM Role for attaching to EC2 instances
- IAM Policy for allowing access to ECR
- 1 x EC2 instance for
master
- N x EC2 instances for
slaves
The setup uses multi-machine fuzzing to achieve scale. The sync-dir
is on a shared network file system, something which is not recommended by the AFL author due to lock-up issues with NFS. As workaround, we are using -f
option to have AFL create the input file in /tmp
. Only internal fuzzer state and crashes are shared over NFS.