summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGasper Vozel2021-08-16 11:54:48 +0200
committerGitHub2021-08-16 11:54:48 +0200
commita250aca71f57036ede5b4934d404f3d33f574f98 (patch)
tree1938ea7c8da08b2914b9c9eda48487edf74a0ac7 /config
parent76424299f8dd69990a7812474803fac9ec52b0b2 (diff)
Fix a few typos and inconsistencies in config files
Diffstat (limited to 'config')
-rw-r--r--config/default.rules10
-rw-r--r--config/default_php8.rules6
-rw-r--r--config/rips.rules1
-rw-r--r--config/typo3.rules8
4 files changed, 12 insertions, 13 deletions
diff --git a/config/default.rules b/config/default.rules
index ea65e01..b12653c 100644
--- a/config/default.rules
+++ b/config/default.rules
@@ -22,14 +22,14 @@ sp.disable_xxe.enable();
22# Only allow execution of read-only files. This is a low-hanging fruit that you should enable. 22# Only allow execution of read-only files. This is a low-hanging fruit that you should enable.
23# sp.readonly_exec.enable(); 23# sp.readonly_exec.enable();
24 24
25# Php has a lot of wrappers, most of them aren't usually useful, you should 25# PHP has a lot of wrappers, most of them aren't usually useful, you should
26# only enable the ones you're using. 26# only enable the ones you're using.
27# sp.wrappers_whitelist.list("file,php,phar"); 27# sp.wrappers_whitelist.list("file,php,phar");
28 28
29# Prevent sloppy comparisons. 29# Prevent sloppy comparisons.
30# sp.sloppy_comparison.enable(); 30# sp.sloppy_comparison.enable();
31 31
32# use SameSite on session cookie 32# Use SameSite on session cookie
33# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery 33# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery
34sp.cookie.name("PHPSESSID").samesite("lax"); 34sp.cookie.name("PHPSESSID").samesite("lax");
35 35
@@ -57,7 +57,7 @@ sp.disable_function.function("extract").param("extract_type").value("0").drop()
57# Moreover, there are non-public bypasses that are also using this vector ;) 57# Moreover, there are non-public bypasses that are also using this vector ;)
58sp.disable_function.function("ini_set").param("varname").value_r("open_basedir").drop() 58sp.disable_function.function("ini_set").param("varname").value_r("open_basedir").drop()
59 59
60##Prevent various `include`-related vulnerabilities 60# Prevent various `include`-related vulnerabilities
61sp.disable_function.function("require_once").value_r("\.(inc|phtml|php)$").allow(); 61sp.disable_function.function("require_once").value_r("\.(inc|phtml|php)$").allow();
62sp.disable_function.function("include_once").value_r("\.(inc|phtml|php)$").allow(); 62sp.disable_function.function("include_once").value_r("\.(inc|phtml|php)$").allow();
63sp.disable_function.function("require").value_r("\.(inc|phtml|php)$").allow(); 63sp.disable_function.function("require").value_r("\.(inc|phtml|php)$").allow();
@@ -80,7 +80,7 @@ sp.disable_function.function("ini_set").param("varname").value("memory_limit").d
80sp.disable_function.function("ini_set").param("varname").value("include_path").drop(); 80sp.disable_function.function("ini_set").param("varname").value("include_path").drop();
81sp.disable_function.function("ini_set").param("varname").value("open_basedir").drop(); 81sp.disable_function.function("ini_set").param("varname").value("open_basedir").drop();
82 82
83# Detect some backdoors via environnement recon 83# Detect some backdoors via environment recon
84sp.disable_function.function("ini_get").param("varname").value("allow_url_fopen").drop(); 84sp.disable_function.function("ini_get").param("varname").value("allow_url_fopen").drop();
85sp.disable_function.function("ini_get").param("varname").value("open_basedir").drop(); 85sp.disable_function.function("ini_get").param("varname").value("open_basedir").drop();
86sp.disable_function.function("ini_get").param("varname").value_r("suhosin").drop(); 86sp.disable_function.function("ini_get").param("varname").value_r("suhosin").drop();
@@ -109,7 +109,7 @@ sp.disable_function.function("curl_setopt").param("value").value("2").allow();
109sp.disable_function.function("curl_setopt").param("option").value("64").drop().alias("Please don't turn CURLOPT_SSL_VERIFYCLIENT off."); 109sp.disable_function.function("curl_setopt").param("option").value("64").drop().alias("Please don't turn CURLOPT_SSL_VERIFYCLIENT off.");
110sp.disable_function.function("curl_setopt").param("option").value("81").drop().alias("Please don't turn CURLOPT_SSL_VERIFYHOST off."); 110sp.disable_function.function("curl_setopt").param("option").value("81").drop().alias("Please don't turn CURLOPT_SSL_VERIFYHOST off.");
111 111
112#File upload 112# File upload
113sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); 113sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop();
114sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop(); 114sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop();
115 115
diff --git a/config/default_php8.rules b/config/default_php8.rules
index c024176..2dd328d 100644
--- a/config/default_php8.rules
+++ b/config/default_php8.rules
@@ -23,14 +23,14 @@ sp.disable_xxe.enable();
23# Only allow execution of read-only files. This is a low-hanging fruit that you should enable. 23# Only allow execution of read-only files. This is a low-hanging fruit that you should enable.
24# sp.readonly_exec.enable(); 24# sp.readonly_exec.enable();
25 25
26# Php has a lot of wrappers, most of them aren't usually useful, you should 26# PHP has a lot of wrappers, most of them aren't usually useful, you should
27# only enable the ones you're using. 27# only enable the ones you're using.
28# sp.wrappers_whitelist.list("file,php,phar"); 28# sp.wrappers_whitelist.list("file,php,phar");
29 29
30# Prevent sloppy comparisons. 30# Prevent sloppy comparisons.
31# sp.sloppy_comparison.enable(); 31# sp.sloppy_comparison.enable();
32 32
33# use SameSite on session cookie 33# Use SameSite on session cookie
34# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery 34# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery
35sp.cookie.name("PHPSESSID").samesite("lax"); 35sp.cookie.name("PHPSESSID").samesite("lax");
36 36
@@ -58,7 +58,7 @@ sp.disable_function.function("extract").param("flags").value("0").drop()
58# Moreover, there are non-public bypasses that are also using this vector ;) 58# Moreover, there are non-public bypasses that are also using this vector ;)
59sp.disable_function.function("ini_set").param("option").value_r("open_basedir").drop() 59sp.disable_function.function("ini_set").param("option").value_r("open_basedir").drop()
60 60
61##Prevent various `include`-related vulnerabilities 61# Prevent various `include`-related vulnerabilities
62sp.disable_function.function("require_once").value_r("\.(inc|phtml|php)$").allow(); 62sp.disable_function.function("require_once").value_r("\.(inc|phtml|php)$").allow();
63sp.disable_function.function("include_once").value_r("\.(inc|phtml|php)$").allow(); 63sp.disable_function.function("include_once").value_r("\.(inc|phtml|php)$").allow();
64sp.disable_function.function("require").value_r("\.(inc|phtml|php)$").allow(); 64sp.disable_function.function("require").value_r("\.(inc|phtml|php)$").allow();
diff --git a/config/rips.rules b/config/rips.rules
index 52e3f27..dcb08c1 100644
--- a/config/rips.rules
+++ b/config/rips.rules
@@ -30,4 +30,3 @@ sp.disable_function.filename("/forgot_passwd.php").function("cpg_db_query").var(
30# CVE-2017-1001000 - https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html 30# CVE-2017-1001000 - https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
31sp.disable_function.filename("/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php").function("register_routes").var("_GET[id]").value_r("[^0-9]").drop(); 31sp.disable_function.filename("/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php").function("register_routes").var("_GET[id]").value_r("[^0-9]").drop();
32sp.disable_function.filename("/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php").function("register_routes").var("_POST[id]").value_r("[^0-9]").drop(); 32sp.disable_function.filename("/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php").function("register_routes").var("_POST[id]").value_r("[^0-9]").drop();
33
diff --git a/config/typo3.rules b/config/typo3.rules
index c76cf91..0838b89 100644
--- a/config/typo3.rules
+++ b/config/typo3.rules
@@ -2,7 +2,7 @@
2sp.disable_function.function("chmod").param("mode").filename_r("typo3/sysext/core/Classes/Utility/GeneralUtility.php$").value_r("^[0-9]{2}6$").allow(); 2sp.disable_function.function("chmod").param("mode").filename_r("typo3/sysext/core/Classes/Utility/GeneralUtility.php$").value_r("^[0-9]{2}6$").allow();
3sp.disable_function.function("chmod").param("mode").value_r("^[0-9]{2}[67]$").drop(); 3sp.disable_function.function("chmod").param("mode").value_r("^[0-9]{2}[67]$").drop();
4 4
5##Prevent various `include`-related vulnerabilities 5# Prevent various `include`-related vulnerabilities
6sp.disable_function.function("require_once").value_r("\.php$").allow(); 6sp.disable_function.function("require_once").value_r("\.php$").allow();
7sp.disable_function.function("include_once").value_r("\.php$").allow(); 7sp.disable_function.function("include_once").value_r("\.php$").allow();
8sp.disable_function.function("require").value_r("\.php$").allow(); 8sp.disable_function.function("require").value_r("\.php$").allow();
@@ -27,14 +27,14 @@ sp.disable_function.function("ini_set").param("var_name").value("memory_limit").
27sp.disable_function.function("ini_set").param("var_name").value("include_path").drop(); 27sp.disable_function.function("ini_set").param("var_name").value("include_path").drop();
28sp.disable_function.function("ini_set").param("var_name").value("open_basedir").drop(); 28sp.disable_function.function("ini_set").param("var_name").value("open_basedir").drop();
29 29
30# Detect some backdoors via environnement recon 30# Detect some backdoors via environment recon
31sp.disable_function.function("ini_get").param("var_name").filename_r("typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php$").value("open_basedir").allow(); 31sp.disable_function.function("ini_get").param("var_name").filename_r("typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php$").value("open_basedir").allow();
32sp.disable_function.function("ini_get").param("var_name").filename_r("typo3/sysext/install/Classes/SystemEnvironment/Check.php$").value("open_basedir").allow(); 32sp.disable_function.function("ini_get").param("var_name").filename_r("typo3/sysext/install/Classes/SystemEnvironment/Check.php$").value("open_basedir").allow();
33sp.disable_function.function("ini_get").param("var_name").filename_r("typo3/sysext/install/Classes/SystemEnvironment/SetupCheck.php$").value("allow_url_fopen").allow(); 33sp.disable_function.function("ini_get").param("var_name").filename_r("typo3/sysext/install/Classes/SystemEnvironment/SetupCheck.php$").value("allow_url_fopen").allow();
34sp.disable_function.function("ini_get").param("var_name").filename_r("vendor/guzzlehttp/guzzle/src/functions.php$").value("allow_url_fopen").allow(); 34sp.disable_function.function("ini_get").param("var_name").filename_r("vendor/guzzlehttp/guzzle/src/functions.php$").value("allow_url_fopen").allow();
35sp.disable_function.function("ini_get").param("var_name").value_r("^(?:allow_url_fopen|open_basedir|suhosin)$").drop(); 35sp.disable_function.function("ini_get").param("var_name").value_r("^(?:allow_url_fopen|open_basedir|suhosin)$").drop();
36 36
37#need to be allow for example to execute Scheduled tasks 37# Need to be allow for example to execute Scheduled tasks
38sp.disable_function.function("function_exists").param("function_name").filename_r("vendor/guzzlehttp/guzzle/src/functions.php$").value_r("^(?:curl_multi_exec|curl_exec)$").allow(); 38sp.disable_function.function("function_exists").param("function_name").filename_r("vendor/guzzlehttp/guzzle/src/functions.php$").value_r("^(?:curl_multi_exec|curl_exec)$").allow();
39sp.disable_function.function("function_exists").param("function_name").value_r("(?:eval|exec|system)").drop(); 39sp.disable_function.function("function_exists").param("function_name").value_r("(?:eval|exec|system)").drop();
40sp.disable_function.function("is_callable").param("var").value_r("(?:eval|exec|system)").drop(); 40sp.disable_function.function("is_callable").param("var").value_r("(?:eval|exec|system)").drop();
@@ -48,6 +48,6 @@ sp.disable_function.function("QueryBuilder::setParameter").param("value").value_
48sp.disable_function.function("QueryBuilder::setParameter").param("value").value_r("sleep").drop(); 48sp.disable_function.function("QueryBuilder::setParameter").param("value").value_r("sleep").drop();
49sp.disable_function.function("QueryBuilder::setParameter").param("value").value_r("information_schema").drop(); 49sp.disable_function.function("QueryBuilder::setParameter").param("value").value_r("information_schema").drop();
50 50
51#File upload 51# File upload
52sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop(); 52sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ph").drop();
53sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop(); 53sp.disable_function.function("move_uploaded_file").param("destination").value_r("\\.ht").drop();