vusec / vuzzer64

This implements a 64-bit version of vusec/vuzzer fuzzing tool.
Apache License 2.0
175 stars 51 forks source link

Installation / Running Problems (+ Dockerfile maybe?) #3

Open cedrickrause opened 5 years ago

cedrickrause commented 5 years ago

Hey there, I have to get this fuzzer running for a university project group where we are trying to compare different fuzzers under the same conditions.

So far I have had great problems while installing it, even though I believe to have managed to make it work by copying files from all over the places manually and commenting some stuff out.

Now when I try to run it on the 'who' example it gave me some errors that directories are missing. I copied them from the 32-bit version and didn't get the errors again. Until now where it is looking for /fuzzer-code/outd/bbc.out . There is no such file and there is no such file in the 32-bit version. Can you tell me how to fix that problem?

Also: It would be great if there was a way for you to provide a Dockerfile for the fuzzer for us to play around with.

Best regards

EDIT: I am using pin 2.14 since I couldn't find 2.13 anywhere on the internet. Hopefully that is not causing the problems.

tosanjay commented 5 years ago

bbc.out file is created by the pintool (bbcounts.so). So my guess is that your pintool is not working. You can check this by running only the pintool (for the argument to this pintool, please have a look at the config.py file, line 89. Also, there should be a pinlog file, which may also contain some useful info. Let me know if this does not work. As far as docker file is concerned, we'll try creating it. Thank you for this feedback :)

cedrickrause commented 5 years ago

Ok so I am not exactly sure about how to do that. From the line in that config file I was trying to figure out the command. /path-to-pin/pin -tool_exit_timeout 1 -t {what to put here?} -o {./outd/bbc.out?} -x 0 -libc 0 -l {what to put here?}

It would be great if you could help me with that.

tosanjay commented 5 years ago

you are almost there.. -t should be followed by the path of the pintool that you created by compiling bbcounts.cpp. if everything went well, you should have a directory "obj-intel64 in your fuzzer-code directory. in that directory, you have the pintool. So after -t, you should have path-to-vuzzer64/fuzzer-code + "/obj-intel64/bbcounts2.so" /path-to-pin/pin -tool_exit_timeout 1 -t path-to-vuzzer64/fuzzer-code/obj-intel64/bbcounts2.so -o bbc.out-x 0 -libc 0 -l '' -- path_to_binanry --arguments_to_binary

Note that for -om you don;t have to give outd/bbc.out as thisis only to run pintool for debugging. So, any file can be given for output. If you are not able to run pintool, then it is a pin problem. let me know if so.

cedrickrause commented 5 years ago

Ok what I tried now is /path-to-pin/pin -tool_exit_timeout 1 -t path-to-vuzzer64/fuzzer-code/obj-intel64/bbcounts2.so -o ./outd/bbc.out -x 0 -libc 0 -l "path-to-vuzzer64/fuzzer-code/bin/who" (I manually put the binaries there, which i copied from the 32bit version) and a lot of derivatives of it (leave out the ", extra parametres etc.) It still gives me the error "E: Missing application name". What am I still doing wrong? Thanks again in advance for your help :)

tosanjay commented 5 years ago

you did not prove the right commandline.

/path-to-pin/pin -tool_exit_timeout 1 -t path-to-vuzzer64/fuzzer-code/obj-intel64/bbcounts2.so -o ./outd/bbc.out -x 0 -libc 0 -l '' -- path-to-vuzzer64/fuzzer-code/bin/who - please note the after -l we have two single quotes to denote an empty string.

cedrickrause commented 5 years ago

Okay, I got a step further.

Now I get a Sementation fault. So it is a problem with my pin?

tosanjay commented 5 years ago

Could be the case. try running only "who" without pin and see if you get the segfault. if you get segfault, then your who is problematic.

cedrickrause commented 5 years ago

Running who without pin works fine. Could it be because I have pin 2.14, since I couldnt find 2.13 on the internet? Or is it more likely to be a configuration / installation problem?

pratikbhd commented 5 years ago

@cedkras Hey, did you get anywhere with solving this issue. I am currently facing similar issues that you initially had and am stuck on how to proceed with them.

Fayozbek commented 5 years ago

hi, I have an installation problem

~/vuzzer64/fuzzer-code$ make makefile:13: path_to_pin_directory/source/tools/Config/makefile.config: No such file or directory makefile:15: /Config/makefile.default.rules: No such file or directory make: *** No rule to make target '/Config/makefile.default.rules'. Stop.

cponcelets commented 4 years ago

For those who are facing such kind of problems.

Pin 2.14 does not support "recent" Ubuntu releases without the option ("-ifeellucky"). (ref: https://chunkaichang.com/tool/pin-notes/)

You have to add the option when running pin (in run_2.sh and run_bb.sh).