summaryrefslogtreecommitdiff
path: root/config/default.rules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config/default.rules12
1 files changed, 12 insertions, 0 deletions
diff --git a/config/default.rules b/config/default.rules
index 3e82ae3..818e73d 100644
--- a/config/default.rules
+++ b/config/default.rules
@@ -35,6 +35,10 @@ sp.xxe_protection.enable();
35# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery 35# https://snuffleupagus.readthedocs.io/features.html#protection-against-cross-site-request-forgery
36sp.cookie.name("PHPSESSID").samesite("lax"); 36sp.cookie.name("PHPSESSID").samesite("lax");
37 37
38# Note that an attacker with arbitrary PHP code execution
39# can bypass some virtual-patching, by (as)using PHP feature.
40# A clever example would be to declare a class with a __toString method.
41
38# Harden the `chmod` function (0777 (oct = 511, 0666 = 438) 42# Harden the `chmod` function (0777 (oct = 511, 0666 = 438)
39@condition PHP_VERSION_ID < 80000; 43@condition PHP_VERSION_ID < 80000;
40 sp.disable_function.function("chmod").param("mode").value("438").drop(); 44 sp.disable_function.function("chmod").param("mode").value("438").drop();
@@ -69,6 +73,14 @@ sp.cookie.name("PHPSESSID").samesite("lax");
69 sp.disable_function.function("putenv").param("assignment").value_r("GCONV_").drop() 73 sp.disable_function.function("putenv").param("assignment").value_r("GCONV_").drop()
70@end_condition; 74@end_condition;
71 75
76# https://github.com/php/php-src/issues/22035
77# CURLOPT_SSLENGINE = 10089
78@condition PHP_VERSION_ID < 80000;
79 sp.disable_function.function("curl_setopt").param("option").value("10089").drop()
80@condition PHP_VERSION_ID >= 80000;
81 sp.disable_function.function("curl_setopt").param("option").value("10089").drop()
82@end_condition;
83
72# Since people are stupid enough to use `extract` on things like $_GET or $_POST, we might as well mitigate this vector 84# Since people are stupid enough to use `extract` on things like $_GET or $_POST, we might as well mitigate this vector
73@condition PHP_VERSION_ID < 80000; 85@condition PHP_VERSION_ID < 80000;
74sp.disable_function.function("extract").pos("0").value_r("^_").drop() 86sp.disable_function.function("extract").pos("0").value_r("^_").drop()