2 个 CentOS 7 服务器上的 Mod_Security。不同的日志格式

2 个 CentOS 7 服务器上的 Mod_Security。不同的日志格式

我安装mod_security在 2 台CentOS 7服务器上。Bot 的配置如下:

SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus "^(?:5|4(?!04))"
SecAuditLogParts ABIFHZ
SecAuditLogType Concurrent
SecAuditLog /var/log/modsec_audit.log
SecAuditLogStorageDir /var/log/modsecurity/audit
SecAuditLogDirMode "default"
SecAuditLogFileMode "default"

但在server a日志上看起来像这样:

example.com 134.249.53.xx - - [10/Aug/2016:22:07:26 +0200] "POST /wp-login.php HTTP/1.0" 200 1598 "-" "-" V6uJflxhoyWp4zhOzImhlAAAAQ4 "-" /20160810/20160810-2207/20160810-220726-V6uJflxhoyWp4zhOzImhlAAAAQ4 0 1546 md5:ea867817aed5ba17597f6e71b96920b9 

日志如下server b所示:

[modsecurity] [client 37.115.191.xx] [domain example.org] [403] [/apache/20160810/20160810-1923/20160810-192353-V6tjKYO6c3SIxYXHutIdrwAAAFY]  [file "/etc/httpd/conf/modsecurity.d/rules/comodo/09_Bruteforce_Bruteforce.conf"] [line "58"] [id "230011"] [rev "2"] [msg "COMODO WAF: Multiple Username Violation: Too Many Usernames Submitted for Authentication.||side-by-side-kuehlschrank.eu|F"] [data "Current Username: sergej"] Access denied with code 403 (phase 2). Operator GT matched 5 at IP:multiple_username_count.

我不太明白为什么服务器 B 以[modsecurity]这种方式写入所有其他信息。

有任何想法吗?

答案1

第一个看起来像访问日志,第二个看起来像错误日志。你确定你在两台服务器上看到的是同一件事吗?

另外,你们各自运行的 ModSecurity 版本是什么?最新版本 2.9.1 已更改为使用 Apache 日志定义为错误日志格式因此,如果您为一个服务器设置了该设置,但没有为另一个服务器设置该设置,那么这也许可以解释这一点。

相关内容