about summary refs log tree commit diff
path: root/frida_mode/src/entry.c
diff options
context:
space:
mode:
authorWorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com>2021-07-06 18:30:50 +0100
committerGitHub <noreply@github.com>2021-07-06 19:30:50 +0200
commit4a02118fdae1ed0bd2cb74a775e7bc0d82d91a81 (patch)
treedc95c8417d58348f6e9ec1a1bbaa3d0a3bbbd358 /frida_mode/src/entry.c
parent2a433f90c456b19cf9aa39384540f618c6eeb1a8 (diff)
downloadafl++-4a02118fdae1ed0bd2cb74a775e7bc0d82d91a81.tar.gz
Deferred exclusion support (#1008)
* Deferred exclusion support

* Changes to support different hook libraries for QEMU and FRIDA

* Changes to collect more stats

Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/src/entry.c')
-rw-r--r--frida_mode/src/entry.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/frida_mode/src/entry.c b/frida_mode/src/entry.c
index e95b923b..1d3b3e43 100644
--- a/frida_mode/src/entry.c
+++ b/frida_mode/src/entry.c
@@ -4,12 +4,15 @@
 
 #include "entry.h"
 #include "instrument.h"
+#include "persistent.h"
+#include "ranges.h"
 #include "stalker.h"
 #include "util.h"
 
 extern void __afl_manual_init();
 
-guint64 entry_point = 0;
+guint64  entry_point = 0;
+gboolean entry_reached = FALSE;
 
 static void entry_launch(void) {
 
@@ -50,6 +53,16 @@ static void entry_callout(GumCpuContext *cpu_context, gpointer user_data) {
 void entry_prologue(GumStalkerIterator *iterator, GumStalkerOutput *output) {
 
   UNUSED_PARAMETER(output);
+  OKF("AFL_ENTRYPOINT reached");
+
+  if (persistent_start == 0) {
+
+    entry_reached = TRUE;
+    ranges_exclude();
+    stalker_trust();
+
+  }
+
   gum_stalker_iterator_put_callout(iterator, entry_callout, NULL, NULL);
 
 }