0%

winafl搭建

winafl搭建

对winafl的搭建做个记录.

1.从github上拉取DynamoRIO,这里可以直接下载release编译好的,自己编译需要安装active perl

,不然没法编译,还挺麻烦的.

release:

1
https://github.com/DynamoRIO/dynamorio/releases/

自己编译DynamoRIO,拉取源码

1
git clone https://github.com/DynamoRIO/dynamorio.git

下载安装perl

1
https://www.activestate.com/products/perl/

打开Developer Command Prompt for VS 2019,根据你自己的vs版本

编译32位版本,

1
2
3
mkdir build32 & cd build32
cmake -A Win32 ..
cmake --build . --config RelWithDebInfo

编译64位版本

1
2
3
mkdir build64 & cd build64
cmake -A x64 ..
cmake --build . --config RelWithDebInfo

2.从github上拉取winafl

1
git clone --recursive https://github.com/googleprojectzero/winafl

编译winafl,32位,这里-DDynamoRIO_DIR要更改为刚刚编译好的目录

1
2
3
4
mkdir build32
cd build32
cmake -G"Visual Studio 16 2019" -A Win32 .. -DDynamoRIO_DIR=yourpath dynamorio\build32\cmake
cmake --build . --config Release

64位

1
2
3
4
mkdir build64
cd build64
cmake -G"Visual Studio 16 2019" -A x64 .. -DDynamoRIO_DIR=yourpath dynamorio\build64\cmake
cmake --build . --config Release

如果你的vs是其他版本,要注意编译命令是有些区别的

1
2
3
4
cmake -G "Visual Studio 16 2019" -A Win32   ;x32
cmake -G "Visual Studio 16 2019" -A x64 ;x64 默认架构为Win64
cmake -G "Visual Studio 15 2017" ;x32 默认架构为Win32
cmake -G "Visual Studio 15 2017 Win64" ;x64

编译好的exe在build32\bin\Release目录下.