summaryrefslogtreecommitdiff
path: root/config/default.rules
diff options
context:
space:
mode:
authorjvoisin2018-03-09 17:37:51 +0100
committerjvoisin2018-03-09 17:37:51 +0100
commit9f8293d686c8cfe66a6bad147896399c70d97bb3 (patch)
tree703b07a9fd74045b1c66140b3046074d1cae56ab /config/default.rules
parentfd60cd5c1ef701710bccc407272f72b9e9ac3f7c (diff)
Improve the performances of our default rules
Diffstat (limited to 'config/default.rules')
-rw-r--r--config/default.rules28
1 files changed, 19 insertions, 9 deletions
diff --git a/config/default.rules b/config/default.rules
index a5ea3d1..fb53708 100644
--- a/config/default.rules
+++ b/config/default.rules
@@ -36,13 +36,22 @@ sp.disable_function.function("function_exists").param("function_name").value_r("
36sp.disable_function.function("is_callable").param("var").value_r("(?:eval|exec|system)").drop(); 36sp.disable_function.function("is_callable").param("var").value_r("(?:eval|exec|system)").drop();
37 37
38# Ghetto sqli hardening 38# Ghetto sqli hardening
39sp.disable_function.function_r("mysqli?_query").param("query").value_r("/\\*").drop(); 39sp.disable_function.function("mysql_query").param("query").value_r("/\\*").drop();
40sp.disable_function.function_r("mysqli?_query").param("query").value_r("--").drop(); 40sp.disable_function.function("mysql_query").param("query").value_r("--").drop();
41sp.disable_function.function_r("mysqli?_query").param("query").value_r("#").drop(); 41sp.disable_function.function("mysql_query").param("query").value_r("#").drop();
42sp.disable_function.function_r("mysqli?_query").param("query").value_r(";.*;").drop(); 42sp.disable_function.function("mysql_query").param("query").value_r(";.*;").drop();
43sp.disable_function.function_r("mysqli?_query").param("query").value_r("benchmark").drop(); 43sp.disable_function.function("mysql_query").param("query").value_r("benchmark").drop();
44sp.disable_function.function_r("mysqli?_query").param("query").value_r("sleep").drop(); 44sp.disable_function.function("mysql_query").param("query").value_r("sleep").drop();
45sp.disable_function.function_r("mysqli?_query").param("query").value_r("information_schema").drop(); 45sp.disable_function.function("mysql_query").param("query").value_r("information_schema").drop();
46
47sp.disable_function.function("mysqli_query").param("query").value_r("/\\*").drop();
48sp.disable_function.function("mysqli_query").param("query").value_r("--").drop();
49sp.disable_function.function("mysqli_query").param("query").value_r("#").drop();
50sp.disable_function.function("mysqli_query").param("query").value_r(";.*;").drop();
51sp.disable_function.function("mysqli_query").param("query").value_r("benchmark").drop();
52sp.disable_function.function("mysqli_query").param("query").value_r("sleep").drop();
53sp.disable_function.function("mysqli_query").param("query").value_r("information_schema").drop();
54
46sp.disable_function.function("PDO::query").param("query").value_r("/\\*").drop(); 55sp.disable_function.function("PDO::query").param("query").value_r("/\\*").drop();
47sp.disable_function.function("PDO::query").param("query").value_r("--").drop(); 56sp.disable_function.function("PDO::query").param("query").value_r("--").drop();
48sp.disable_function.function("PDO::query").param("query").value_r("#").drop(); 57sp.disable_function.function("PDO::query").param("query").value_r("#").drop();
@@ -52,8 +61,9 @@ sp.disable_function.function("PDO::query").param("query").value_r("sleep\\s*\\("
52sp.disable_function.function("PDO::query").param("query").value_r("information_schema").drop(); 61sp.disable_function.function("PDO::query").param("query").value_r("information_schema").drop();
53 62
54# Ghetto sqli detection 63# Ghetto sqli detection
55sp.disable_function.function_r("mysqli?_query").ret("FALSE").drop(); 64sp.disable_function.function("mysql_query").ret("FALSE").drop();
56sp.disable_function.function_r("PDO::query").ret("FALSE").drop(); 65sp.disable_function.function("mysqli_query").ret("FALSE").drop();
66sp.disable_function.function("PDO::query").ret("FALSE").drop();
57 67
58#File upload 68#File upload
59sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); 69sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop();