Description
Describe the bug
After migrating nginx.plus from R24 to R25, false positives were observed again. Especially those that were processed with the "SecRuleUpdateTargetById".
We came to the conclusion that the SecRuleUpdateTargetById directive does not work with a Regex.
Example: SecRuleUpdateTargetById 930120 "!ARGS_NAMES:/^json.*\.profile.*/"
Logs and dumps
Output of:
AuditLogs
---EQGotKRA---A--
[15/Oct/2021:10:32:05 +0200] 1634286725 127.0.0.1 42748 127.0.0.1 6087
---EQGotKRA---H--
ModSecurity: Warning. Matched "Operator PmFromFile' with parameter
lfi-os-files.data' against variable ARGS_NAMES' (Value:
json.userProfiles.array_0.profileName.de' ) [file "/crs/rules/REQUEST-930-APPLICATION-ATTACK-LFI.conf"] [line "78"] [id "930120"] [rev ""] [msg "OS File Access Attempt"] [data "Matched Data: .profile found within ARGS_NAMES: json.userprofiles.array_0.profilename.de"] [severity "2"] [ver "OWASP_CRS/3.2.0"] [maturity "0"] [accuracy "0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-lfi"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [tag "OWASP_CRS/WEB_ATTACK/FILE_INJECTION"] [tag "WASCTC/WASC-33"] [tag "OWASP_TOP_10/A4"] [tag "PCI/6.5.4"] [hostname "127.0.0.1"] [uri "/xxx"] [unique_id "1634286725"] [ref "o25,8v0,47t:utf8toUnicode,t:urlDecodeUni,t:normalizePathWin,t:lowercaseo25,8v0,40t:utf8toUnicode,t:urlDecodeUni,t:normalizePathWin,t:lowercaseo25,8v0,47t:utf8toUnicode,t:urlDecodeUni,t:normalizePathWi (368 characters omitted)"]
ModSecurity: Warning. Matched "Operator Ge' with parameter
5' against variable TX:ANOMALY_SCORE' (Value:
40' ) [file "/rules/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "80"] [id "949110"] [rev ""] [msg "Inbound Anomaly Score Exceeded (Total Score: 40)"] [data ""] [severity "2"] [ver "OWASP_CRS/3.2.0"] [maturity "0"] [accuracy "0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostname "127.0.0.1"] [uri "/xxx"] [unique_id "1634286725"] [ref ""]
Server (please complete the following information):
- ModSecurity version (and connector): ModSecurity v3
- WebServer: nginx version: nginx/1.21.3 (nginx-plus-r25)
- OWASP CRS : 3.2.0
- OS : CentOS Linux, Debian 11