HexHive / FirmFuzz

Automated IoT firmware fuzzing framework.
76 stars 7 forks source link

NOTE Since this framework performs a lot of system-level configuration changes to operate it is highly recommended to create an environment for this inside a VM.

Setup instructions

Run instructions

Using FirmFuzz on a firmware filesystem is a three-step process:

Instructions for each of these steps is provided below.

Filesystem extraction

Firmware Emulation

Fuzzing

Before running, the fuzzer certain setup needs to be carried out.

Fuzzer setup

sudo apt-get install python-pip python-dev 
libffi-dev libssl-dev libxml2-dev 
libxslt1-dev libjpeg8-dev zlib1g-dev g++

sudo pip install "mitmproxy==0.18.2"
sudo pip install "numpy"
sudo pip install "selenium==3.4.3"

# Install mitmdump v0.18.2

# Install geckodriver(v0.18.0) and put it in `/usr/local/bin`

Create memory snapshot

Before running the firmware image for fuzzing, we create a memory snapshot to revert to in case the firmware reaches an inconsistent state during fuzzing You can use the following instructions to do so:

- Once the emulation reaches the stable state, run the following commands to
  save snapshot of the stable state
    - `ctrl-a and then c` to get into QEMU monitor mode
    - `savevm 1` to save the stable snapshot of the image

- Exit the emulation

Run the fuzzer