about summary refs log tree commit diff
path: root/frida_mode/ts/lib/afl.ts
diff options
context:
space:
mode:
authoreleguevel <eleguevel@quarkslab.com>2023-04-21 12:00:56 +0200
committereleguevel <eleguevel@quarkslab.com>2023-04-21 12:00:56 +0200
commit30495e6bfe4119c9be6597ad0def01e7e0cb8a67 (patch)
tree8334d1fe824d6275a69b0739f596bf4d2b7c2772 /frida_mode/ts/lib/afl.ts
parent4e5f42cab6b8c501eeaf76ec7ca920089f6e0f3a (diff)
downloadafl++-30495e6bfe4119c9be6597ad0def01e7e0cb8a67.tar.gz
frida mode: add dynamic loaded code exclusion
Add the AFL_FRIDA_INST_NO_DYNAMIC_LOAD environment variable and its
associated JS function setInstrumentNoDynamicLoad to prevent the
instrumentation of late dynamic loaded code.

Resolve #1708
Diffstat (limited to 'frida_mode/ts/lib/afl.ts')
-rw-r--r--frida_mode/ts/lib/afl.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/frida_mode/ts/lib/afl.ts b/frida_mode/ts/lib/afl.ts
index 6a2350e7..7d1fac6b 100644
--- a/frida_mode/ts/lib/afl.ts
+++ b/frida_mode/ts/lib/afl.ts
@@ -179,6 +179,13 @@ class Afl {
   }
 
   /**
+   * See `AFL_FRIDA_INST_NO_DYNAMIC_LOAD`
+   */
+  public static setInstrumentNoDynamicLoad(): void {
+    Afl.jsApiSetInstrumentNoDynamicLoad();
+  }
+
+  /**
    * See `AFL_FRIDA_INST_NO_OPTIMIZE`
    */
   public static setInstrumentNoOptimize(): void {
@@ -443,6 +450,11 @@ class Afl {
     "void",
     []);
 
+  private static readonly jsApiSetInstrumentNoDynamicLoad = Afl.jsApiGetFunction(
+    "js_api_set_instrument_no_dynamic_load",
+    "void",
+    []);
+
   private static readonly jsApiSetInstrumentNoOptimize = Afl.jsApiGetFunction(
     "js_api_set_instrument_no_optimize",
     "void",