shellphish / fuzzer

A Python interface to AFL, allowing for easy injection of testcases and other functionality.
BSD 2-Clause "Simplified" License
641 stars 130 forks source link

Error creating fuzzer #21

Closed x62275 closed 7 years ago

x62275 commented 7 years ago

I followed "Install the CRS" instructions. Next I did: workon cgc, then attempted to run shellphuzz on a simple binary: ../angr-dev/fuzzer/shellphuzz -i -c 4 mybinary. The following error immediately appeared.

[*] Creating fuzzer... ERROR | 2017-08-31 16:44:15,218 | fuzzer.fuzzer | AFL Error: Pipe at the beginning of core_pattern execute 'echo core | sudo tee /proc/sys/kernel/core_pattern' AFL Warning: We probably want the fork() children to run first execute 'echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first'

Traceback (most recent call last): File "../angr-dev/fuzzer/shellphuzz", line 69, in create_dictionary=not args.no_dictionary, stuck_callback=stuck_callback, time_limit=args.timeout File "../angr-dev/fuzzer/fuzzer/fuzzer.py", line 97, in init Fuzzer._perform_env_checks() File "../angr-dev/fuzzer/fuzzer/fuzzer.py", line 595, in _perform_env_checks raise InstallError(err) fuzzer.fuzzer.InstallError: AFL Error: Pipe at the beginning of core_pattern execute 'echo core | sudo tee /proc/sys/kernel/core_pattern' AFL Warning: We probably want the fork() children to run first execute 'echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first'

Exception AttributeError: "'Fuzzer' object has no attribute 'procs'" in <bound method Fuzzer.del of <fuzzer.fuzzer.Fuzzer object at 0x7f183b326f50>> ignored

zardus commented 7 years ago

Please read the content of that exception:

execute 'echo core | sudo tee /proc/sys/kernel/core_pattern'
AFL Warning: We probably want the fork() children to run first
execute 'echo 1 | sudo tee /proc/sys/kernel/sched_child_runs_first'

Aside from this (which must be resolved on the host machine before you can fuzz), my suggestion is to save your sanity and use the docker container: docker run -it shellphish/mechaphish.

x62275 commented 7 years ago

You just saved me a lot of time.