Battelle / afl-unicorn

afl-unicorn lets you fuzz any piece of binary that can be emulated by Unicorn Engine.

Home Page:https://medium.com/@njvoss299/afl-unicorn-fuzzing-arbitrary-binary-code-563ca28936bf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run the simple example provided

samohyes opened this issue · comments

Thanks for your work! I come into some problems here.

So after I build the unicorn mode, it says this,
[+] Unicorn Python bindings installed successfully
[*] Testing unicorn-mode functionality by running a sample test harness under afl-unicorn
[-] Error: Unicorn mode doesn't seem to work!

And for the simple mode you provided, it gave me this.
orlog@hero:~/Documents/afl-unicorn/unicorn_mode/samples/simple$ afl-fuzz -U -m none -i sample_inputs/ -o results/ -- python simple_test_harness.py @@
afl-fuzz 2.52b by lcamtuf@google.com
[+] You have 4 CPU cores and 2 runnable tasks (utilization: 50%).
[+] Try parallel jobs - see /usr/local/share/doc/afl/parallel_fuzzing.txt.
[] Checking CPU core loadout...
[+] Found a free CPU core, binding to #0.
[
] Checking core_pattern...
[] Checking CPU scaling governor...
[
] Setting up output directories...
[] Scanning 'sample_inputs/'...
[+] No auto-generated dictionary tokens to reuse.
[
] Creating hard links for all input files...
[] Validating target binary...
[
] Attempting dry run with 'id:000000,orig:sample1.bin'...
[*] Spinning up the fork server...

[-] Hmm, looks like the target binary terminated before we could complete a
handshake with the injected code. Perhaps there is a horrible bug in the
fuzzer. Poke lcamtuf@coredump.cx for troubleshooting tips.

[-] PROGRAM ABORT : Fork server handshake failed
Location : init_forkserver(), afl-fuzz.c:2258
I tested this on ubuntu 16.04. Can you give me some advice?

I see. I have to use a fresh new ubuntu 16.04.

Hi all,
I've got exact same error on my Ubuntu 16.04.5 machine. Anyone know why it's append? Can you please explain how can I get the example to work?

Thanks,
Gal.

Edit:
Alright, I managed to get the example to work on 16.04.0. Is there a way to run it on the latest 16.04.05? does any understand why it is not working?

I've same error on my Ubuntu 16.04.5 machine.

commented

I've same error on my Ubuntu 20.04.3 LTS machine.

I've same error on my Ubuntu 18.04.6 LTS machine and my Ubuntu 16.04.6 machine.

Edit: I finished it inspired by #17. Just re-execute unicorn_mode/build_unicorn_support.sh and find that [-] Error: Python setup-tools not found. Run 'sudo apt-get install python-setuptools'., then install with the orders as followed:

wget --no-check-certificat https://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz
tar zxf setuptools-2.0.tar.gz
cd setuptools-2.0
sudo python2.7 setup.py install