我试图在Ubuntu中使用afl和openssl。afl-fuzz的一种正常用法是:
afl-gcc test.c //-- this will produce a.out
mkdir testcases
echo "Test case here." > testcases/case1
afl-fuzz -i testcases -o findings ./a.out现在,对于openssl,它应该是这样的:
afl-gcc ./config
make //-- not sure of this :)
afl-fuzz -i test -o findings <exe_name>其中"test“是带有openssl测试用例的文件夹。
我的问题是openssl的"exe_name“参数是什么?如果我的代码是错的,请纠正我。谢谢
发布于 2015-07-03 23:25:58
我完全确定您所说的“openssl的"exe_name”参数“是什么意思,但是:
afl-fuzz -i test -o findings ~/path/to/binary/to/fuzz @@将在~/path/to/binary/to/fuzz上模糊二进制文件,用从test中的种子文件中生成的变异测试用例代替@@。
发布于 2018-12-28 08:08:59
不能像现在这样使用openssl二进制文件。您需要编写一个separete程序,它将使用openssl库,然后用afl模糊它的exe。
整个过程都会这样
下载openssl
1. ./config // If you disable something here like no-comp then you have to run`make depend`.
2. Replace gcc with afl-gcc in Makefile
3. make && make install此过程将使用afl编译openssl,您可以查看如何将工具添加到对象文件中。最后,您将在openssl目录中获得libssl.a和libcrypto.a文件。
成功编译openssl之后,在示例应用程序中使用它,比如sample.c,然后编译这个文件
4. afl-gcc sample.c -o sample libssl.a libcrypto.a -ldl最后执行模糊5. afl-fuzz -i测试案例-o testcases -m none -/-m
https://unix.stackexchange.com/questions/207442
复制相似问题