如何使用afl-gcc编译openssl

时间:2018-12-28 05:18:07

标签: compilation openssl american-fuzzy-lop

我需要使用afl-fuzz编译openssl 1.0.1f版本,然后在应用程序中使用它来查找令人讨厌的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中的gcc替换了afl-gcc,但没有结果。

有人可以在所有有关openssl和afl-fuzz的博客中进行解释吗,我只找到了这些命令。

谢谢。

1 个答案:

答案 0 :(得分:0)

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

class User { constructor(private id: number) { }}
function ctor<TIn, T>(ctor: new (a: TIn) => T): (value: TIn) => T{
    return value => new ctor(value)
}
[10, 11].map(ctor(User));

谢谢。