使用afl-fuzz的QEMU模式测试chome

来源:互联网 发布:知乎 神农架木鱼镇住宿 编辑:程序博客网 时间:2024/06/05 15:14

webkit的源码编译简直是要疯了,调了两天还是不行,于是放弃了源码模糊测试的途径

截个图以备下次心情好再来搞一搞


于是转向qemu模式

The feature is implemented with a fairly simple patch to QEMU 2.3.0. The
simplest way to build it is to run ./build_qemu_support.sh. The script will
download, configure, and compile the QEMU binary for you.

QEMU is a big project, so this will take a while, and you may have to
resolve a couple of dependencies (most notably, you will definitely need
libtool and glib2-devel).

Once the binaries are compiled, you can leverage the QEMU tool by calling
afl-fuzz and all the related utilities with -Q in the command line.

说明文档说的很清楚,直接运行qemu_mode下边的build_qemu_support.sh将会完成QEMU的安装和配置,然后就可以愉快的在原有的测试命令上加上-Q以qemu模式进行测试了。

跑第一把的时候不出意外会遇到内存不足直接退出的情况,这是因为afl-fuzz默认200M的运行内存来进行测试,然后chrome貌似200M不够用。

找几个测试用例,截图如下:

然后就可以键入命令跑起来了

afl-fuzz -i afl_in -o afl_out -m 1024 -Q ./chrome
会有警告信息,因为测试用例选的不好或是其他原因,但是好不容易跑起来,我会在乎这些吗!



于是乎开始跑,晚上离开实验室前开始跑得,第二天早上来看,跑了七个多小时就停了。。。停了。。。停了。。。

而且毛都没跑出来一个

瞬间崩溃呀有木有!

然后想尝试不插入指令直接模糊测试这个可能会慢死的模式,然而直接报超时,我也很无奈。。。


然后无意中在root状态下发现,chrome运行时有个-no-sandbox选项,于是乎再尝试一遍,正在跑,也不知道能不能出啥东西。

afl-fuzz -i afl_in -o afl_out -m 1024 -Q ./chrome -no-sandbox

跑一跑试一下


备注:chrome在ubuntu14.04下安装后可执行文件目录为

/opt/google/chrome




阅读全文
0 0
原创粉丝点击