-
Notifications
You must be signed in to change notification settings - Fork 0
/
secrules.conf
17 lines (12 loc) · 1022 Bytes
/
secrules.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#Désactive les règles qui causent des faux positifs
#Pour la règle 949110 : https://github.com/coreruleset/coreruleset/blob/main/rules/REQUEST-949-BLOCKING-EVALUATION.conf
SecRuleRemoveById 949110
#Règles personnelles doivent avoir un ID compris entre 1 et 99999
#IDs from 1000 to 1500 are reserved for php rules.
#block request to specific files
SecRule REQUEST_URI "@streq /index.php" "id:1000, phase:1, deny, msg:'index.php request blocked'"
SecRule REQUEST_URI "@streq /admin.php" "id:1010, phase:1, deny, msg:'admin.php request blocked'"
# Redirect to a different page when a PHP file is uploaded
SecRule FILES "(?i)\.php$" "id:1020, log, redirect:https://facili-tacct-nginx.osc-fr1.scalingo.io, msg:'PHP file upload blocked'"
#SecRule REQUEST_METHOD "!@within %{tx.allowed_methods}" "id:960032,phase:1,t:none,deny,msg:'Method is not allowed by basic policy', severity:'2'"
SecRule REQUEST_URI "@beginsWith /" "id:45666, phase:1, pass, setvar:'tx.anomaly_score_pl1=100', msg:'Warning anomaly score > 100'"