1

I need to compile openssl 1.0.1f version with afl-fuzz and then use it in an application to find heartbleed bug. I have done so far; Go to openssl1.0.1f directory and run following command

./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

Everything works fine but during compilation I see gcc -I commands compiling files rather than afl-gcc and I donot see Instrumentation details at the end as I see it in simple programs I compile with afl-fuzz. I am not sure openssl has compiled with gcc or afl-gcc. I have also replaced gcc with afl-gcc in Makefile but no result.

Can someone please explain as in all blogs about openssl and afl-fuzz, I have found these commands only.

Thanks.

aneela
  • 1,457
  • 3
  • 24
  • 45
  • 1
    can you please add the exact `wget` command you used? so that the post is self contained. – OrenIshShalom Dec 28 '18 at 08:12
  • 1
    2 *config* commands? You probably wanted: `CC="afl-gcc" CXX="afl-g++" ./config no-shared no-idea no-mdc2 no-rc5 no-comp enable-tlsext no-ssl2`. – CristiFati Dec 28 '18 at 10:15

1 Answers1

1

I was making a simple mistake of calling ./configure after manually making changes to Makefile. Each ./configure command overwrites previous Makefile. So my step should be in following order.

./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

Thanks.

aneela
  • 1,457
  • 3
  • 24
  • 45