airbus-seclab / AFLplusplus-blogpost

Blogpost about optimizing binary-only fuzzing with AFL++
https://airbus-seclab.github.io/AFLplusplus-blogpost
GNU General Public License v2.0
61 stars 5 forks source link

fatal error: custom_mutator_helpers.h: No such file or directory #1

Open zhu1024 opened 9 months ago

zhu1024 commented 9 months ago

I successfully compiled AFL++ and followed the instructions to the letter. When I execute the make -C src command, I get the following error:

make -C mutator all make[1]: Entering directory '/home/test/Documents/git_dir/AFLplusplus-blogpost/src/mutator' make -C ../../google-fuzzing/proto/asn1-pdu all make[2]: Entering directory '/home/test/Documents/git_dir/AFLplusplus-blogpost/google-fuzzing/proto/asn1-pdu' g++ -c -Wall -fPIC *.cc -I../../../libprotobuf-mutator -I../../../libprotobuf-mutator/build/external.protobuf/include make[2]: Leaving directory '/home/test/Documents/git_dir/AFLplusplus-blogpost/google-fuzzing/proto/asn1-pdu' g++ -O2 -Wall -Wextra -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -fPIE -pie -fPIC -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-z,separate-code -Wno-unused-parameter -Wno-unused-function -c custom_mutator.cpp -I../../libprotobuf-mutator/build/external.protobuf/include -I../../libprotobuf-mutator -I../../libprotobuf-mutator/src -I../../google-fuzzing/proto/asn1-pdu -I../../AFLplusplus/include -I../../AFLplusplus/custom_mutators/examples In file included from custom_mutator.cpp:2: custom_mutator.h:5:10: fatal error: custom_mutator_helpers.h: No such file or directory 5 | #include "custom_mutator_helpers.h" | ^~~~~~ compilation terminated. make[1]: [Makefile:13: mutator] Error 1 make[1]: Leaving directory '/home/test/Documents/git_dir/AFLplusplus-blogpost/src/mutator' make: [Makefile:12: libcustom_mutator] Error 2 make: Leaving directory '/home/test/Documents/git_dir/AFLplusplus-blogpost/src'

I tried repeating this many times and got this error: custom_mutator_helpers.h: No such file or directory. Can anyone answer this question? Thank you.

JRomainG commented 9 months ago

Hi, thank you for the issue. The missing custom_mutator_helpers.h file is supposed to be part of the AFL++ repository. However, it seems like it was removed in a recent commit. You should probably checkout the exact AFL++ commit used for this blogpost:

$ cd AFLplusplus
$ git checkout 4063a3eb4c4099e37aef4f1d96e8b80d58d65fe2

Alternatively, you could simply copy the deleted file in the mutator folder

zhu1024 commented 9 months ago

Hi, thank you for the issue. The missing custom_mutator_helpers.h file is supposed to be part of the AFL++ repository. However, it seems like it was removed in a recent commit. You should probably checkout the exact AFL++ commit used for this blogpost:

$ cd AFLplusplus
$ git checkout 4063a3eb4c4099e37aef4f1d96e8b80d58d65fe2

Alternatively, you could simply copy the deleted file in the mutator folder

When cloning a repository using git checkout, compiling AFL++ will prompt that some of the git links are inaccessible. Solved the problem by copying the file, thanks for the reply.