Die Sache ist nur das die Leerzeilen nicht in jeder Zeile sind sondern nur in bestimmten Zeilen...
Die Sache ist ich lese die Logs mit Jwall ein und der Braucht diese ganz bestimmte Formatierung...
Beispiel: Orginal
==============
--2678b90e-H--
Message: Access denied with code 400 (phase 2). Pattern match "^[\d\.]+$" at REQUEST_HEADERS:Host. [file "/etc/apache2/modsecurity2/modsecurity_crs_21_protocol_anomalies.conf"] [line "60"] [id "960017"] [msg "Host header is a numeric IP address"] [severity "CRITICAL"] [tag "PROTOCOL_VIOLATION/IP_HOST"]
Action: Intercepted (phase 2)
Apache-Handler: application/x-httpd-php
Stopwatch: 1332774984743781 3483 (456 876 -)
Producer: ModSecurity for Apache/2.5.13 (
http://www.modsecurity.org/); core ruleset/1.6.1.
Server: Apache/2.2.22 (Debian)
--2678b90e-K--
SecRule "REQUEST_METHOD" "@rx ^(?:GET|HEAD)$" "phase:2,chain,t:none,deny,log,auditlog,status:400,msg:'GET or HEAD requests with bodies',severity:2,id:960011,tag
ROTOCOL_VIOLATION/EVASION"
SecRule "&REQUEST_HEADERS:Content-Type" "@eq 0" "phase:2,pass,chain,t:none,log,auditlog,msg:'Request Containing Content, but Missing Content-Type header',id:960904,severity:4"
SecRule "REQUEST_HEADERS:Host" "@rx ^[\\d\\.]+$" "phase:2,t:none,deny,log,auditlog,status:400,msg:'Host header is a numeric IP address',severity:2,id:960017,tag
ROTOCOL_VIOLATION/IP_HOST"
SecRule "RESPONSE_STATUS" "@rx ^400$" "phase:5,t:none,chain,log,auditlog,pass,msg:'Invalid request',id:960913,severity:2"
--2678b90e-Z--
==============
Beispiel Log auf Logserver:
==============
--2678b90e-H--
Message Access denied with code 400 (phase 2). Pattern match "^[\d\.]+$" at REQUEST_HEADERS:Host. [file "/etc/apache2/modsecurity2/modsecurity_crs_21_protocol_anomalies.conf"] [line "60"] [id "960017"] [msg "Host header is a numeric IP address"] [severity "CRITICAL"] [tag "PROTOCOL_VIOLATION/IP_HOST"]
Action Intercepted (phase 2)
Apache-Handler application/x-httpd-php
Stopwatch 1332774984743781 3483 (456 876 -)
Producer ModSecurity for Apache/2.5.13 (
http://www.modsecurity.org/); core ruleset/1.6.1.
Server Apache/2.2.22 (Debian)
--2678b90e-K--
SecRule "REQUEST_METHOD" "@rx ^(?:GET|HEAD)$" "phase:2,chain,t:none,deny,log,auditlog,status:400,msg:'GET or HEAD requests with bodies',severity:2,id:960011,tag
ROTOCOL_VIOLATION/EVASION"
SecRule "&REQUEST_HEADERS:Content-Type" "@eq 0" "phase:2,pass,chain,t:none,log,auditlog,msg:'Request Containing Content, but Missing Content-Type header',id:960904,severity:4"
SecRule "REQUEST_HEADERS:Host" "@rx ^[\\d\\.]+$" "phase:2,t:none,deny,log,auditlog,status:400,msg:'Host header is a numeric IP address',severity:2,id:960017,tag
ROTOCOL_VIOLATION/IP_HOST"
SecRule "RESPONSE_STATUS" "@rx ^400$" "phase:5,t:none,chain,log,auditlog,pass,msg:'Invalid request',id:960913,severity:2"
--2678b90e-Z--
==============