Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Generated binary cannot load libdyninstAPI_RT.so and libAflDyninst.so [fixed] #12

Open
zhangysh1995 opened this issue Sep 12, 2019 · 0 comments

Comments

@zhangysh1995
Copy link

I followed the instructions to instrument my binary successfully, but it complained when I tried to run the program:

[zhangys@chcpu12a afl-dyninst]$ export DYNINSTAPI_RT_LIB=/home/zhangys/local/lib/libdyninstAPI_RT.so

[zhangys@chcpu12a afl-dyninst]$ ./afl-dyninst -i ../../benchmarks/binary/lavam_binary/base64 -o base64_inst
Skipping library: libAflDyninst.so
Skipping library: libAflDyninst.cpp
Instrumenting module: base64
Skipping library: ld-linux-x86-64.so.2
Skipping library: libc.so.6
Inserting init callback.
Saving the instrumented binary to base64_inst...
All done! Happy fuzzing!

[zhangys@chcpu12a afl-dyninst]$ ./base64_inst 
./base64_inst: error while loading shared libraries: libdyninstAPI_RT.so: cannot open shared object file: No such file or directory

[zhangys@chcpu12a afl-dyninst]$ ./base64_inst 
./base64_inst: error while loading shared libraries: libAflDyninst.so: cannot open shared object file: No such file or directory

[zhangys@chcpu12a afl-dyninst]$ ls
afl-dyninst      afl-dyninst.o  base64_inst        libAflDyninst.so  Makefile  README.txt
afl-dyninst.cpp  AUTHORS        libAflDyninst.cpp  LICENSE           rand.b64

I found that, I need to:

  • put export DYNINSTAPI_RT_LIB=xxx into ~/.bashrc
  • put libAflDyninst.so to environment variable LD_LIBRARY_PATH, fixed the second one
export DYNINSTAPI_RT_LIB=/home/zhangys/local/lib/libdyninstAPI_RT.so

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/zhangys/fuzzing/moflow/afl-dyninst
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant