"Porting Syzkaller to ReactOS" GSoC 2020 Project by @freakston
Go to file
2020-08-04 11:28:54 +05:30
.github/workflows Create main.yml 2020-06-18 09:10:43 +05:30
dashboard dashboard/app, syz-ci: upload target OS/arch to dashboard 2017-09-19 17:00:26 +02:00
docs update ReactOS doc 2020-06-18 09:34:34 +05:30
executor add syscall descriptions 2020-06-17 11:00:24 +05:30
Godeps vendor: update all packages 2017-08-08 10:54:24 +02:00
pkg fix execprog threaded=0 2020-06-09 16:36:40 +05:30
prog all: initial support for fuchsia 2017-09-20 21:19:29 +02:00
sys add syscall descriptions 2020-06-17 11:00:24 +05:30
syz-ci dashboard/app, syz-ci: upload target OS/arch to dashboard 2017-09-19 17:00:26 +02:00
syz-fuzzer syz-fuzzer: port to windows 2017-09-27 18:59:50 +02:00
syz-hub syz-manager: don't save/send to dashboard repros from hub 2017-08-07 16:40:18 +02:00
syz-manager vm/gce: windows support 2017-09-27 18:59:50 +02:00
tools sys/windows: add more descriptions 2017-09-27 20:17:09 +02:00
vendor vendor/golang.org/x/net/context/: fix fmt with Go 1.8 2017-08-10 14:35:07 +02:00
vm vm/gce: windows support 2017-09-27 18:59:50 +02:00
.clang-format buildbot: add .travis.yml 2017-07-28 13:25:48 +02:00
.gitignore sys: check in generated files 2017-06-13 15:55:31 +02:00
.travis.yml travis: another guess at right packages and syntax 2017-09-20 15:30:01 +02:00
AUTHORS Parse incdir "incdir" in syscall description file to add custom include directories. (#180) 2017-06-26 10:52:47 +02:00
CONTRIBUTORS Add Isolated VM 2017-07-18 09:57:38 +02:00
LICENSE initial commit 2015-10-12 10:16:57 +02:00
Makefile sys/windows: add more descriptions 2017-09-27 20:17:09 +02:00
README.md Update README.md 2020-08-04 11:28:54 +05:30

syzkaller - unsupervised coverage-guided kernel fuzzer

Instructions to set up syzkaller for ReactOS.

Getting ReactOS

  1. Download the MSVC(i386) build of ReactOS that supports Syzkaller binaries from Github actions page :

    https://github.com/reactos/reactos/pull/2930/checks
    
  2. Optionally you can build it yourself by cloning the my fork for ReactOS checking out the Syzkaller branch.

    https://github.com/Freakston/reactos/tree/syzkaller
    
    https://reactos.org/wiki/Building_ReactOS
    

Setting up ReactOS on qemu

  1. Create the qemu image using the following command

    qemu-img create -f qcow2 ReactOS.img 8192M
    

    Here 8192M is the size of image.

  2. Boot and install

    qemu -L . -m 1024 -cdrom ReactOS.iso -hda ReactOS.img -boot d -localtime -serial file:ReactOS.log
    

    Here we are creating a machine with 1Gb of RAM.


NOTE: Detailed instructions can be found here : ReactOS-wiki


Building Syzkaller

  1. Clone the fork of Syzkaller that has support for ReactOS.
    git clone https://github.com/reactos/syzkaller
    
  2. Instal Go version 1.10
    https://golang.org/dl/
    
  3. Make a copy of above cloned sources in the go path as follows.
    $GOPATH/src/github.com/google/syzkaller
    

NOTE: The above step is required since we are using an older commit of current master.


  1. Building Syz-Stress.
    cd tools/syz-stress/
    GOOS=windows GOARCH=386 go build -o syz-stress.exe stress.go
    
  2. Syz-executor (assumes cl cross-compiler is in PATH, preferably MSVC)
    cl executor\executor_windows.cc -o syz-executor.exe \
    kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib \
    shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
    winmm.lib rpcrt4.lib Crypt32.lib imm32.lib Urlmon.lib Oleaut32.lib \
    Winscard.lib Opengl32.lib Mpr.lib Ws2_32.lib Bcrypt.lib Ncrypt.lib \
    Synchronization.lib Shell32.lib Rpcns4.lib Mswsock.lib  Mincore.lib \
    Msimg32.lib RpcRT4.lib Rpcrt4.lib lz32.lib
    

NOTE: Alternatively you an download the latest build of syz-executor form here: https://github.com/reactos/syzkaller/actions


Running Syzkaller

Copy over Syz-stress and executor to the VM and place them in the same folder. Open a command prompt, change to the directory and use the following command to start fuzzing.

syz-stress.exe -threaded=0

Disclaimer

This is not the official Repo Official