Skip to content

Getting Started

Tyson Smith edited this page Apr 16, 2021 · 15 revisions

Prerequisites

Python3 and Pip are required, Git is optional. Python 2 is no longer supported.

Install & Setup

Setup working directories

CODE=~/code/
mkdir $CODE
mkdir $CODE/browsers
cd $CODE

Download and setup Grizzly

Install from PyPI. Simple install, useful if you plan to use grizzly.reduce, grizzly.replay and create custom Adapters.

python3 -m pip install grizzly-framework

- or -
Install from GitHub. Get the latest development code. Maybe unstable. Useful if you plan to work on core Grizzly features.

git clone https://github.com/MozillaSecurity/grizzly.git grizzly
python3 -m pip install -e grizzly --user

Get a Firefox build

Download an ASan fuzzing build via fuzzfetch - recommended.

python3 -m pip install fuzzfetch --user
python3 -m fuzzfetch --asan --name firefox --fuzzing -o $CODE/browsers/

- or -
Download a build from Firefox-CI and unpack to $CODE/browsers/firefox.
- or -
Building Firefox is also an option.

Custom prefs.js file

This step is optional since Grizzly will automatically generate a pref.js file if one is not provided.

Generate prefs via prefpicker - recommended.

python3 -m pip install prefpicker --user
python3 -m prefpicker browser-fuzzing.yml $CODE/prefs.js

Running 'no-op' example adapter

cd grizzly
python3 -m grizzly $CODE/browsers/firefox/firefox no-op

If everything is working correctly Firefox should launch with a single tab (the fuzzing harness) and a second tab should open and close rapidly. The 'no-op' adapter is meant to be an example and does not really do much. Hit Ctrl+C to stop Grizzly at any time.

The next step is creating an adapter.