有没有办法通过ModSecurity限制每个日志条目中出现的规则数量?
--173fad2e-A--
[27/Apr/2016:17:15:25 +0530] VyCmVMCoAwUAAAohwTgAAAAA 127.0.0.1 33330 127.0.0.1 80
[...]
--173fad2e-H--
Message: Warning. Pattern match "^5\\d{2}$" at RESPONSE_STATUS. [file "/etc/modsecurity/activated_rules/modsecurity_crs_50_outbound.conf"] [line "53"] [id "970901"] [rev "2"] [msg "The application is not available"] [data "Matched Data: 503 found within RESPONSE_STATUS: 503"] [severity "ERROR"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy "9"] [tag "WASCTC/WASC-13"] [tag "OWASP_TOP_10/A6"] [tag "PCI/6.5.6"]
Message: Warning. Pattern match "^(?i:0|allow)$" at RESPONSE_HEADERS. [file "/etc/modsecurity/activated_rules/modsecurity_crs_55_application_defects.conf"] [line "151"] [id "981405"] [msg "AppDefect: X-FRAME-OPTIONS Response Header is Missing or not set to Deny."] [data "X-FRAME-OPTIONS: "] [tag "WASCTC/WASC-15"] [tag "MISCONFIGURATION"] [tag "http://websecuritytool.codeplex.com/wikipage?title=Checks#http-header-x-frame-options"]
Message: Warning. Operator GE matched 4 at TX:outbound_anomaly_score. [file "/etc/modsecurity/activated_rules/modsecurity_crs_60_correlation.conf"] [line "40"] [id "981205"] [msg "Outbound Anomaly Score Exceeded (score 4): The application is not available"]
[...]
--173fad2e-Z--这是一个审计日志条目的示例,我想对它进行配置,使其在每个日志条目的日志尾部中只显示一条“消息”,而不是(在示例中) 3。
可以对其进行配置吗?
发布于 2016-05-05 03:32:33
不确定为什么要这样做?
它显示三个规则的原因是这个请求触发了三个不同的规则。
通常,对于第一个失败的规则,ModSecurity会阻塞,因此您不会看到这一点。没有阻塞请求(因此阻止其余规则触发)这一事实表明了以下两种情况之一:
所以,对我来说,ModSecurity正在做它应该在这里做的事情,并且不确定为什么你认为它应该只显示一条规则?
https://stackoverflow.com/questions/37024789
复制相似问题