diff options
| author | jvoisin | 2018-03-09 17:37:51 +0100 |
|---|---|---|
| committer | jvoisin | 2018-03-09 17:37:51 +0100 |
| commit | 9f8293d686c8cfe66a6bad147896399c70d97bb3 (patch) | |
| tree | 703b07a9fd74045b1c66140b3046074d1cae56ab | |
| parent | fd60cd5c1ef701710bccc407272f72b9e9ac3f7c (diff) | |
Improve the performances of our default rules
| -rw-r--r-- | config/default.rules | 28 |
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(" | |||
| 36 | sp.disable_function.function("is_callable").param("var").value_r("(?:eval|exec|system)").drop(); | 36 | sp.disable_function.function("is_callable").param("var").value_r("(?:eval|exec|system)").drop(); |
| 37 | 37 | ||
| 38 | # Ghetto sqli hardening | 38 | # Ghetto sqli hardening |
| 39 | sp.disable_function.function_r("mysqli?_query").param("query").value_r("/\\*").drop(); | 39 | sp.disable_function.function("mysql_query").param("query").value_r("/\\*").drop(); |
| 40 | sp.disable_function.function_r("mysqli?_query").param("query").value_r("--").drop(); | 40 | sp.disable_function.function("mysql_query").param("query").value_r("--").drop(); |
| 41 | sp.disable_function.function_r("mysqli?_query").param("query").value_r("#").drop(); | 41 | sp.disable_function.function("mysql_query").param("query").value_r("#").drop(); |
| 42 | sp.disable_function.function_r("mysqli?_query").param("query").value_r(";.*;").drop(); | 42 | sp.disable_function.function("mysql_query").param("query").value_r(";.*;").drop(); |
| 43 | sp.disable_function.function_r("mysqli?_query").param("query").value_r("benchmark").drop(); | 43 | sp.disable_function.function("mysql_query").param("query").value_r("benchmark").drop(); |
| 44 | sp.disable_function.function_r("mysqli?_query").param("query").value_r("sleep").drop(); | 44 | sp.disable_function.function("mysql_query").param("query").value_r("sleep").drop(); |
| 45 | sp.disable_function.function_r("mysqli?_query").param("query").value_r("information_schema").drop(); | 45 | sp.disable_function.function("mysql_query").param("query").value_r("information_schema").drop(); |
| 46 | |||
| 47 | sp.disable_function.function("mysqli_query").param("query").value_r("/\\*").drop(); | ||
| 48 | sp.disable_function.function("mysqli_query").param("query").value_r("--").drop(); | ||
| 49 | sp.disable_function.function("mysqli_query").param("query").value_r("#").drop(); | ||
| 50 | sp.disable_function.function("mysqli_query").param("query").value_r(";.*;").drop(); | ||
| 51 | sp.disable_function.function("mysqli_query").param("query").value_r("benchmark").drop(); | ||
| 52 | sp.disable_function.function("mysqli_query").param("query").value_r("sleep").drop(); | ||
| 53 | sp.disable_function.function("mysqli_query").param("query").value_r("information_schema").drop(); | ||
| 54 | |||
| 46 | sp.disable_function.function("PDO::query").param("query").value_r("/\\*").drop(); | 55 | sp.disable_function.function("PDO::query").param("query").value_r("/\\*").drop(); |
| 47 | sp.disable_function.function("PDO::query").param("query").value_r("--").drop(); | 56 | sp.disable_function.function("PDO::query").param("query").value_r("--").drop(); |
| 48 | sp.disable_function.function("PDO::query").param("query").value_r("#").drop(); | 57 | sp.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*\\(" | |||
| 52 | sp.disable_function.function("PDO::query").param("query").value_r("information_schema").drop(); | 61 | sp.disable_function.function("PDO::query").param("query").value_r("information_schema").drop(); |
| 53 | 62 | ||
| 54 | # Ghetto sqli detection | 63 | # Ghetto sqli detection |
| 55 | sp.disable_function.function_r("mysqli?_query").ret("FALSE").drop(); | 64 | sp.disable_function.function("mysql_query").ret("FALSE").drop(); |
| 56 | sp.disable_function.function_r("PDO::query").ret("FALSE").drop(); | 65 | sp.disable_function.function("mysqli_query").ret("FALSE").drop(); |
| 66 | sp.disable_function.function("PDO::query").ret("FALSE").drop(); | ||
| 57 | 67 | ||
| 58 | #File upload | 68 | #File upload |
| 59 | sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); | 69 | sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); |
