AFL for Smart Contracts

AFLSol Tool

The source code can be downloaded here.

Installation Instructions: (MacOs/Linux)

I. Pre-requisites:

NodeJs

If you haven’t installed NodeJS yet, run the following commands

# Install nvm

# Install latest node
nvm install node

Solcjs

# Install solcjs
npm i -g solc

II. Install aflsol

npm i -g aflsol

III. Usage

1. How to fuzz

  1. Create Project folder
cd [your_project_folder]
# create 2 folders: contracts and testcases under[your_project_folder]
aflsol init
  1. Copy .abi and .bin file of your contract to contracts/ folder.
  2. Run fuzz in your project folder, for example: your abi file name is fuzzer.abi
cd [your_project_folder]
aflsol fuzz fuzzer.abi 600 # 600 is duration in seconds

You should see some thing like this in your console:

2. Aflsol important options

aflsol –help: display all options supported in aflsol.

aflsol init: create working folders for aflsol.

aflsol fuzz [abi file] [duration in second]