【问题标题】:How to compile openssl with afl-gcc如何使用 afl-gcc 编译 openssl
【发布时间】:2018-12-28 05:18:06
【问题描述】:

我需要用 afl-fuzz 编译 openssl 1.0.1f 版本,然后在应用程序中使用它来查找 heartbleed bug。到目前为止我已经做到了; 转到 openssl1.0.1f 目录并运行以下命令

./config CC="afl-gcc" CXX="afl-g++"
./config no-shared no-idea no-mdc2 no-rc5 no-comp enable-tlsext no-ssl2
 make depend
 make && make install

一切正常,但在编译期间,我看到gcc -I 命令编译文件而不是afl-gcc,并且我在使用afl-fuzz 编译的简单程序中看到它最后没有看到Instrumentation 详细信息。我不确定 openssl 是用 gcc 还是 afl-gcc 编译的。我还在 Makefile 中用afl-gcc 替换了gcc,但没有结果。

谁能解释一下所有关于openssl和afl-fuzz的博客,我只找到了这些命令。

谢谢。

【问题讨论】:

  • 您能否添加您使用的确切的wget 命令?以便帖子是独立的。
  • 2 个 config 命令?你可能想要:CC="afl-gcc" CXX="afl-g++" ./config no-shared no-idea no-mdc2 no-rc5 no-comp enable-tlsext no-ssl2.

标签: compilation openssl american-fuzzy-lop


【解决方案1】:

在手动更改 Makefile 后,我犯了一个简单的错误,即调用 ./configure。每个 ./configure 命令都会覆盖以前的 Makefile。所以我的步骤应该按照以下顺序。

./config no-shared no-idea no-mdc2 no-rc5 no-comp enable-tlsext no-ssl2
make depend
Manually replace every occurrence of `gcc`to `afl-gcc` in Makefile 
make && make install

谢谢。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-13
    • 1970-01-01
    • 2013-04-16
    • 1970-01-01
    • 2012-07-03
    • 1970-01-01
    相关资源
    最近更新 更多