Skip to content

Latest commit

 

History

History
 
 

bsod-afl

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

bsod-afl

Requires KVM-VMI setup for VM introspection.

Building

$ mkdir build && cd build
$ cmake ..

Prepare target

  1. Extract addresses of control flow instructions from your target with extract-breakpoints.py.
  2. Implement a harness for the target according to harness.c and copy it to the guest VM.

Fuzzing

  1. Start QEMU with introspection enabled by adding the following parameters.
-chardev socket,path=/tmp/introspector,id=chardev0,reconnect=10
-object secret,id=key0,data=some
-object introspection,id=kvmi,chardev=chardev0,key=key0"
  1. When the VM is booted, load the target module inside the guest and retrieve the load address.
# insmod module.ko
# cat /proc/modules
  1. Start bsod-afl on host.
$ afl-fuzz -i input -o output -t 9999 -- ./bsod-afl --socket /tmp/introspector --json <kernel profile> --input @@ --module <module addr> --breakpoints <breakpoints file> --coverage block
  1. Start harness in guest.
$ ./harness