首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将美国模糊Lop(美国模糊Lop)与openssl结合使用

如何将美国模糊Lop(美国模糊Lop)与openssl结合使用
EN

Unix & Linux用户
提问于 2015-06-04 05:15:08
回答 2查看 2.6K关注 0票数 2

我试图在Ubuntu中使用afl和openssl。afl-fuzz的一种正常用法是:

代码语言:javascript
复制
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,它应该是这样的:

代码语言:javascript
复制
afl-gcc ./config
make //-- not sure of this :)
afl-fuzz -i test -o findings <exe_name>

其中"test“是带有openssl测试用例的文件夹。

我的问题是openssl的"exe_name“参数是什么?如果我的代码是错的,请纠正我。谢谢

EN

回答 2

Unix & Linux用户

发布于 2015-07-03 23:25:58

我完全确定您所说的“openssl的"exe_name”参数“是什么意思,但是:

代码语言:javascript
复制
afl-fuzz -i test -o findings ~/path/to/binary/to/fuzz @@

将在~/path/to/binary/to/fuzz上模糊二进制文件,用从test中的种子文件中生成的变异测试用例代替@@

票数 0
EN

Unix & Linux用户

发布于 2018-12-28 08:08:59

不能像现在这样使用openssl二进制文件。您需要编写一个separete程序,它将使用openssl库,然后用afl模糊它的exe。

整个过程都会这样

下载openssl

代码语言:javascript
复制
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.alibcrypto.a文件。

成功编译openssl之后,在示例应用程序中使用它,比如sample.c,然后编译这个文件

代码语言:javascript
复制
4. afl-gcc sample.c -o sample libssl.a libcrypto.a -ldl

最后执行模糊5. afl-fuzz -i测试案例-o testcases -m none -/-m

您可以查看来了解一些信息,甚至可以找到示例文件。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/207442

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档