使用 AFL++

问题描述

我想用 afL++/二进制模糊测试做一些实验。我安装了它并运行 build_qemu_support.sh,但如果我尝试对二进制文件进行模糊测试,仍然会出现错误消息。

命令:

afl-fuzz -Q -i /usr/tests/ -o /usr/tests/output -- ./bin/apt -d @@

输出

[+] Loaded environment variable AFL_SKIP_cpuFREQ with value 1  
[+] Loaded environment variable AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES with value 1 afl-fuzz++3.13a based on afl by Michal Zalewski and a large online community  
[+] afL++ is maintained by marc "van Hauser" Heuse,Heiko "hexcoder" Eißfeldt,Andrea Fioraldi and Dominik Maier  
[+] afL++ is open source,get it at https://github.com/AFLplusplus/AFLplusplus  
[+] NOTE: This is v3.x which changes defaults and behavIoUrs - see README.md  
[+] No -M/-S set,autoconfiguring for "-S default"  
[*] Getting to work...  
[+] Using exponential power schedule (FAST)  
[+] Enabled testcache with 50 MB  
[*] Checking core_pattern...  
[+] You have 4 cpu cores and 1 runnable tasks (utilization: 25%).  
[+] Try parallel jobs - see /usr/local/share/doc/afl/parallel_fuzzing.md.  
[*] Setting up output directories...  
[+] Output directory exists but deemed OK to reuse.  
[*] Deleting old session data...  
[+] Output dir cleanup successful.  
[*] Checking cpu core loadout...  
[+] Found a free cpu core,try binding to #0.  
[*] Scanning '/usr/tests/'...  
[*] Scanning '/usr/tests//output'...  
[*] Scanning '/usr/tests//output/default'...  
[*] Scanning '/usr/tests//output/default/crashes'...  
[*] Scanning '/usr/tests//output/default/hangs'...  
[*] Scanning '/usr/tests//output/default/queue'...  
[+] Loaded a total of 4 seeds.  
[*] Creating hard links for all input files...  
[*] Validating target binary...  
[-] PROGRAM ABORT : Program './bin/apt' not found or not executable  
         Location : check_binary(),src/afl-fuzz-init.c:2579 

怎么了?

解决方法

错误提示找不到 ./bin/apt。当您想模糊 apt 时,请改用 ./usr/bin/apt