fix frida mode

This commit is contained in:
vanhauser-thc 2021-04-28 12:57:29 +02:00
parent dde0538b48
commit da65eef572
4 changed files with 10 additions and 8 deletions

View File

@ -5,7 +5,7 @@ SRC_DIR:=$(PWD)src/
INCLUDES:=$(wildcard $(INC_DIR)*.h)
SOURCES:=$(wildcard $(SRC_DIR)**/*.c) $(wildcard $(SRC_DIR)*.c)
BUILD_DIR:=$(PWD)build/
CFLAGS+=-fPIC -D_GNU_SOURCE -Wno-prio-ctor-dtor
CFLAGS+=-fPIC -D_GNU_SOURCE -Wno-prio-ctor-dtor -fcommon -Wl,--allow-multiple-definition
FRIDA_BUILD_DIR:=$(BUILD_DIR)frida/
FRIDA_TRACE:=$(BUILD_DIR)afl-frida-trace.so
@ -71,8 +71,8 @@ $(FRIDA_TRACE): $(GUM_DEVIT_LIBRARY) $(GUM_DEVIT_HEADER) $(SOURCES) $(QEMU_INC_A
-I $(ROOT) \
-I $(ROOT)include \
-I $(INC_DIR) \
$(ROOT)instrumentation/afl-compiler-rt.o.c \
-lpthread -ldl -lresolv -lelf
$(ROOT)instrumentation/afl-compiler-rt.o.c
# -lpthread -ldl -lresolv -lelf
cp -v $(FRIDA_TRACE) $(ROOT)

View File

@ -1,5 +1,9 @@
#include "frida-gum.h"
#ifndef _PERSISTENT_H
#define _PERSISTENT_H
#include "frida-gum.h"
#include "config.h"
typedef struct arch_api_regs api_regs;
@ -24,3 +28,4 @@ gboolean persistent_is_supported(void);
void persistent_prologue(GumStalkerOutput *output);
#endif

View File

@ -1,6 +1,6 @@
#include <elf.h>
#include <fcntl.h>
#include <linux/limits.h>
#include <limits.h>
#include <stdio.h>
#include <sys/mman.h>
#include <unistd.h>

View File

@ -9,9 +9,6 @@
#include "util.h"
int __afl_sharedmem_fuzzing = 0;
afl_persistent_hook_fn hook = NULL;
guint64 persistent_start = 0;
guint64 persistent_count = 0;
void persistent_init(void) {