about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-12-30 10:49:00 +0100
committervanhauser-thc <vh@thc.org>2023-12-30 10:49:00 +0100
commit1eb54c4c3eb4ab4bc12f7f1f80f5ece15b238ef0 (patch)
tree5fd6f5afa5aa3717ca88ccfe48f0106daae9b7b7 /src
parent98a2a334de15ed08d82c76bfa97d1f22c81f9a7d (diff)
downloadafl++-1eb54c4c3eb4ab4bc12f7f1f80f5ece15b238ef0.tar.gz
finish injection implementation
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index dd990e71..17949fd7 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1749,6 +1749,34 @@ int main(int argc, char **argv_orig, char **envp) {
 
   }
 
+  // Marker: ADD_TO_INJECTIONS
+  if (getenv("AFL_LLVM_INJECTIONS_ALL") || getenv("AFL_LLVM_INJECTIONS_SQL") ||
+      getenv("AFL_LLVM_INJECTIONS_LDAP") || getenv("AFL_LLVM_INJECTIONS_XSS")) {
+
+    OKF("Adding injection tokens to dictionary.");
+    if (getenv("AFL_LLVM_INJECTIONS_ALL") ||
+        getenv("AFL_LLVM_INJECTIONS_SQL")) {
+
+      add_extra(afl, "'\"\"'", 4);
+
+    }
+
+    if (getenv("AFL_LLVM_INJECTIONS_ALL") ||
+        getenv("AFL_LLVM_INJECTIONS_LDAP")) {
+
+      add_extra(afl, "*)(1=*))(|", 10);
+
+    }
+
+    if (getenv("AFL_LLVM_INJECTIONS_ALL") ||
+        getenv("AFL_LLVM_INJECTIONS_XSS")) {
+
+      add_extra(afl, "1\"><\"", 5);
+
+    }
+
+  }
+
   OKF("Generating fuzz data with a length of min=%u max=%u", afl->min_length,
       afl->max_length);
   u32 min_alloc = MAX(64U, afl->min_length);