每个人。 我在qemu模式下使用AFL。而且我已经编写了这个小二进制文件来测试所有内容。
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <dlfcn.h>
int main(int argc, char **argv){
typedef int (*pf_t)(char*);
void* handle;
char* error;
char mystring[100];
fgets(mystring,sizeof(mystring),stdin);
printf("mystring: %s\n",mystring);
handle = dlopen("libdiag.so",RTLD_NOW);
if(!handle){
fprintf(stderr,"%s\n",dlerror());
exit(1);
}
dlclose(handle);
return 0;
}
如果我不添加dlopen(),一切都会很好。但是,如果我添加它,则afl将在此处停止。 我正在使用的命令是“ afl-fuzz -i in -o out -Q ./a.out”
afl-fuzz 2.49b by <lcamtuf@google.com>
[+] You have 8 CPU cores and 3 runnable tasks (utilization: 38%).
[+] Try parallel jobs - see docs/parallel_fuzzing.txt.
[*] Checking CPU core loadout...
[+] Found a free CPU core, binding to #1.
[*] Checking CPU scaling governor...
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning 'in'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Validating target binary...
[*] Attempting dry run with 'id:000000,orig:aahat.jpg'...
[*] Spinning up the fork server...
[+] All right - fork server is up.
我不知道为什么。我只知道有人说afl qemu模式的dlopen有问题。我想知道有人可以给我一些建议吗?谢谢!