• Stars
    star
    198
  • Rank 196,898 (Top 4 %)
  • Language
    Haskell
  • License
    GNU General Publi...
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An experimental grammar fuzzer in Haskell using QuickCheck

QuickFuzz

QuickFuzz, a tool written in Haskell designed for testing un- expected inputs of common file formats on third-party software, taking advantage of off-the-shelf, well known fuzzers. Unlike other generational fuzzers, QuickFuzz does not require to write specifications for the file formats in question since it relies on existing file-format-handling libraries available on the Haskell code repository. There is more information in its website.

CircleCI

Example

In this example, we uncover a null pointer dereference in gif2webp from libwebp 0.5:

$ QuickFuzz gentest gif "./gif2webp @@ -o /dev/null" -l 1 -u 10 -f radamsa
...
Test case number 4481 has failed. 
Moving to outdir/QuickFuzz.68419739009.4481.3692945303624111961.1.gif
...

We found a crash. We can inspect it manually to verify it is a null pointer issue:

$ ./gif2webp outdir/QuickFuzz.68419739009.4481.3692945303624111961.1.gif
==10953== ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 
(pc 0x000000403ff9 sp 0x7fffffffd6e0 bp 0x7fffffffded0 T0)
AddressSanitizer can not provide additional info.
#0 0x403ff8 (examples/gif2webp+0x403ff8)
#1 0x7ffff437af44 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21f44)
#2 0x401b18 (examples/gif2webp+0x401b18)
==10953== ABORTING

Finally, we can shrink the crashing input to obtain a smaller file:

$ QuickFuzz gentest gif "./gif2webp @@ -o /dev/null" -l 1 -s 3692945303624111961 -f radamsa -r
Test case number 1 has failed. 
Moving to outdir/QuickFuzz.68997856397.1.3692945303624111961.1.gif
Shrinking over bytes has begun...
Testing shrink of size 48
Testing shrink of size 47
...
Testing shrink of size 15
Shrinking finished
Reduced from 48 bytes to 16 bytes
After executing 554 shrinks with 33 failing shrinks. 
Saving to outdir/QuickFuzz.68997856397.1.3692945303624111961.1.gif.reduced
Finished!

Installation

We support Stack to compile and install QuickFuzz. Before starting with it, make sure you have libgmp-dev installed otherwise ghc will fail to compile. Also, zlib.h is required to compile QuickFuzz (some packages require it). For instance, in Ubuntu/Debian:

# apt-get install zlib1g-dev libgmp-dev libtinfo-dev

After installing stack, you should:

$ git clone https://github.com/CIFASIS/QuickFuzz --depth 1
$ cd QuickFuzz
$ install_fuzzers.sh
$ stack setup

Because QuickFuzz generates a lot of dependencies that may not be necessary to test an specific category of files, we modularized the project with different activation flags. Currently we have 7 flags:

Flag Supported formats
image svg, png, gif, tiff, jpeg
arch tar, zip
doc html, css, pdf, ps, eps, xml
code c, js, py, go, lua, evm
media wav
net http
pki asn1, crl, x509
bnfc cf, grammer format

For instance, to compile only with image generation (Bmp, Gif, Png, Ico, ..):

$ stack install --flag QuickFuzz:image

Because of a Stack issue, you must install alex and happy manually before enabling the code flag:

$ stack install alex happy

Cabal Installation

Direct cabal installation is not recommended nor supported.

Authors

Students

  • Franco Costantini
  • Lucas Salvatore

Former Members

Mailing list

You can join the QuickFuzz mailing group to get notifications of new features and releases. To join, you can send an empty email to [email protected].

More Repositories

1

VDiscover

A tool to predict vulnerability discovery of binary only programs
Python
186
star
2

neural-fuzzer

Python
90
star
3

nosy-newt

Nosy Newt is a simple concolic execution tool for exploring the input space of a binary executable program based in Triton
Python
60
star
4

dense-sptam

Dense S-PTAM
C++
60
star
5

gnss-stereo-inertial-fusion

GNSS-Stereo-Inertial SLAM implementation that fuses GNSS, visual and inertial measurements using a tightly-coupled approach.
C++
36
star
6

slam_agricultural_evaluation

Shell
33
star
7

splitting_gan

Code for Class-Splitting Generative Adversarial Networks
Python
32
star
8

qss-solver

Modeling and simulation tool for continuous and hybrid systems.
C
28
star
9

object-detection-sptam

Online Object Detection and Localization on Stereo Visual SLAM System
Jupyter Notebook
25
star
10

OS-fuzzing

Using Machine Learning to predict the outcome of a zzuf fuzzing campaign
Python
24
star
11

exploiting-gan-internal-capacity

Code for reproducing experiments in "Exploiting GAN Internal Capacity for High-Quality Reconstruction of Natural Images"
Python
16
star
12

dataset-processing

Tools to process the Weed removing robot dataset
Python
15
star
13

wganvo

WGANVO: Monocular Visual Odometry based on WGAN
Python
9
star
14

megadeth

MEga DErivation with Template Haskell
Haskell
8
star
15

modelicacc

Modelica C Compiler implemented in C++ to develop and test novel algorithms for large scale models.
C++
8
star
16

distributed-sptam

Distributed S-PTAM
C++
8
star
17

basalt-with-persistent-map

C++
5
star
18

spp_estimation

Seed-per-pod estimation for plant breeding using deep learning
Python
5
star
19

power-devs

PowerDEVS is an integrated tool for hybrid systems modeling and simulation based on the DEVS formalism.
C++
5
star
20

sb-graph

Set Based Graph Library
C++
4
star
21

ghc-cm

Prototype GHC with Class Morphisms
Haskell
4
star
22

curso-herramientas

Curso de Herramientas de Machine Learning para el Polo Tecnológico
Python
4
star
23

vdiscover-workshop

Python
2
star
24

ORB_SLAM3

C++
2
star
25

svo-2.0

C++
2
star
26

okvis_ros

C++
1
star
27

grotloc

Ground Truth for Loop Closure (GroTLoC)
Python
1
star
28

weed_robot_simulation

Dockerfile
1
star
29

bug-report-scripts

Python
1
star
30

basalt_ros

Shell
1
star
31

certificate

Haskell
1
star
32

rovio

C++
1
star
33

rebvo

MATLAB
1
star
34

FLVIS

C++
1
star
35

msckf_vio

C++
1
star
36

r-vio

C++
1
star
37

VINS-Fusion

C++
1
star
38

Kimera-VIO-ROS

C++
1
star
39

StereoLoopDetector

Code for the article "Addressing the challenges of loop detection in agricultural environments" published in the Journal of Field Robotics, 2024.
1
star