-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the bug
JSON log messages not received the dos-attack rule msg;
the log of modsec_audit work well except for the log of dos-attack that it can intercept but not code the 912-dos-attack to log-messages.
A clear and concise description of what the bug is.
Logs and dumps
Output of:
-
DebugLogs (level 9)
-
AuditLogs
- modsec_audit.log
{"transaction":{"client_ip":"127.0.0.1","time_stamp":"Tue Oct 1 19:57:01 2019","server_id":"f40be80333c37672e8c192ce2843a64721701529","client_port":50482,"host_ip":"127.0.0.1","host_port":2380,"unique_id":"156997422142.938766","request":{"method":"GET","http_version":1.0,"uri":"/","headers":{"Host":"localhost:2380","User-Agent":"ApacheBench/2.3","Accept":"*/*"}},"response":{"http_code":403,"headers":{"Server":"nginx","Date":"Tue, 01 Oct 2019 23:57:01 GMT","Content-Length":"554","Content-Type":"text/html","Connection":"close"}},"producer":{"modsecurity":"ModSecurity v3.0.3 (Linux)","connector":"ModSecurity-nginx v1.0.0","secrules_engine":"Enabled","components":["OWASP_CRS/3.1.0\""]},"messages":[]}}
- Error logs
- nginx/error.log
2019/10/01 19:58:01 [error] 11#0: *761 [client 127.0.0.1] ModSecurity: Access denied with code 403 (phase 1). Matched "Operator `Eq' with parameter `1' against variable `IP:127.0.0.1_d9b252bcadfb7e5c254cd1395e8f7c230b1ae3c6::::DOS_BLOCK' (Value: `1' ) [file "/opt/owasp-modsecurity-crs/rules/REQUEST-912-DOS-PROTECTION.conf"] [line "123"] [id "912130"] [rev ""] [msg ""] [data ""] [severity "0"] [ver ""] [maturity "0"] [accuracy "0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-dos"] [hostname "127.0.0.1"] [uri "/"] [unique_id "156997428182.004145"] [ref ""], client: 127.0.0.1, server: waf_default, request: "GET / HTTP/1.0", host: "localhost:2380"
- If there is a crash, the core dump file.
Notice: Be carefully to not leak any confidential information.
To Reproduce
Steps to reproduce the behavior:
A curl command line that mimics the original request and reproduces the problem. Or a ModSecurity v3 test case.
[e.g: curl "modsec-full/ca/..\..\..\..\..\..\/\etc/\passwd" or issue-394.json]
Expected behavior
A clear and concise description of what you expected to happen.
The json-log run well except for 912* dos rules, what can i do to make the log-msg to modsec-audit.log messages.
Server (please complete the following information):
- ModSecurity version (and connector): [e.g. ModSecurity v3.0.1 with nginx-connector v1.0.0]
- WebServer: [e.g. nginx-1.15.5]
- OS (and distro): [e.g. Linux, archlinux]
- centos7 + tengine2.3.2(nginx1.17)
- {"modsecurity":"ModSecurity v3.0.3 (Linux)","connector":"ModSecurity-nginx v1.0.0","secrules_engine":"Enabled","components":["OWASP_CRS/3.1.0""]
Rule Set (please complete the following information):
- Running any public or commercial rule set? [e.g. SpiderLabs commercial rules]
- What is the version number? [e.g. 2018-08-11]
Additional context
Add any other context about the problem here.