summaryrefslogtreecommitdiff
path: root/config/default.rules
diff options
context:
space:
mode:
Diffstat (limited to 'config/default.rules')
-rw-r--r--config/default.rules28
1 files changed, 20 insertions, 8 deletions
diff --git a/config/default.rules b/config/default.rules
index 82f8b5d..05dd91d 100644
--- a/config/default.rules
+++ b/config/default.rules
@@ -42,6 +42,13 @@ sp.disable_function.function("mail").param("additional_parameters").value_r("\\-
42# Since it's now burned, me might as well mitigate it publicly 42# Since it's now burned, me might as well mitigate it publicly
43sp.disable_function.function("putenv").param("setting").value_r("LD_").drop() 43sp.disable_function.function("putenv").param("setting").value_r("LD_").drop()
44 44
45# This one was burned in Nov 2019 - https://gist.github.com/LoadLow/90b60bd5535d6c3927bb24d5f9955b80
46sp.disable_function.function("putenv").param("setting").value_r("GCONV_").drop()
47
48# Since people are stupid enough to use `extract` on things like $_GET or $_POST, we might as well mitigate this vector
49sp.disable_function.function("extract").param("var_array").value_r("^_").drop()
50sp.disable_function.function("extract").param("extract_type").value("0").drop()
51
45# This is also burned: 52# This is also burned:
46# ini_set('open_basedir','..');chdir('..');…;chdir('..');ini_set('open_basedir','/');echo(file_get_contents('/etc/passwd')); 53# ini_set('open_basedir','..');chdir('..');…;chdir('..');ini_set('open_basedir','/');echo(file_get_contents('/etc/passwd'));
47# Since we have no way of matching on two parameters at the same time, we're 54# Since we have no way of matching on two parameters at the same time, we're
@@ -66,16 +73,16 @@ sp.disable_function.function("exec").param("command").value_r("[$|;&`\\n\\(\\)\\
66sp.disable_function.function("proc_open").param("command").value_r("[$|;&`\\n\\(\\)\\\\]").drop(); 73sp.disable_function.function("proc_open").param("command").value_r("[$|;&`\\n\\(\\)\\\\]").drop();
67 74
68# Prevent runtime modification of interesting things 75# Prevent runtime modification of interesting things
69sp.disable_function.function("ini_set").param("var_name").value("assert.active").drop(); 76sp.disable_function.function("ini_set").param("varname").value("assert.active").drop();
70sp.disable_function.function("ini_set").param("var_name").value("zend.assertions").drop(); 77sp.disable_function.function("ini_set").param("varname").value("zend.assertions").drop();
71sp.disable_function.function("ini_set").param("var_name").value("memory_limit").drop(); 78sp.disable_function.function("ini_set").param("varname").value("memory_limit").drop();
72sp.disable_function.function("ini_set").param("var_name").value("include_path").drop(); 79sp.disable_function.function("ini_set").param("varname").value("include_path").drop();
73sp.disable_function.function("ini_set").param("var_name").value("open_basedir").drop(); 80sp.disable_function.function("ini_set").param("varname").value("open_basedir").drop();
74 81
75# Detect some backdoors via environnement recon 82# Detect some backdoors via environnement recon
76sp.disable_function.function("ini_get").param("var_name").value("allow_url_fopen").drop(); 83sp.disable_function.function("ini_get").param("varname").value("allow_url_fopen").drop();
77sp.disable_function.function("ini_get").param("var_name").value("open_basedir").drop(); 84sp.disable_function.function("ini_get").param("varname").value("open_basedir").drop();
78sp.disable_function.function("ini_get").param("var_name").value_r("suhosin").drop(); 85sp.disable_function.function("ini_get").param("varname").value_r("suhosin").drop();
79sp.disable_function.function("function_exists").param("function_name").value("eval").drop(); 86sp.disable_function.function("function_exists").param("function_name").value("eval").drop();
80sp.disable_function.function("function_exists").param("function_name").value("exec").drop(); 87sp.disable_function.function("function_exists").param("function_name").value("exec").drop();
81sp.disable_function.function("function_exists").param("function_name").value("system").drop(); 88sp.disable_function.function("function_exists").param("function_name").value("system").drop();
@@ -131,3 +138,8 @@ sp.disable_function.function("curl_setopt").param("option").value("81").drop().a
131#File upload 138#File upload
132sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); 139sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop();
133sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop(); 140sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop();
141
142# Logging lockdown
143sp.disable_function.function("ini_set").param("varname").value_r("error_log").drop()
144sp.disable_function.function("ini_set").param("varname").value_r("error_reporting").drop()
145sp.disable_function.function("ini_set").param("varname").value_r("display_errors").drop()