Multiple filters
Posted: Sat Mar 28, 2015 8:58 am
Hello,
I've been trying to make an extra filter for our F5 load balancer that only applies if the program equals dcc. But I tried several variations and still don't get it too work...
These are the filters I have atm:
dcc is one of several possible program that are available in the F5 load balancer. the program field is applied at in the first filter, so I guess NLS should first attempt the first filter and then execute the second filter is the first filter added the program field and the value is dcc.The problem is that only the first filter seems to be applied. I tried putting both filters in once NLS filter, but this also doesn't seem to work.
Any advice how I should handle this?
The logs for dcc look like this by the way:
Other F5 program logs look different so I need several filters.
Grtz and tx
Willem
I've been trying to make an extra filter for our F5 load balancer that only applies if the program equals dcc. But I tried several variations and still don't get it too work...
These are the filters I have atm:
Code: Select all
if [type] == "syslog-f5" {
grok {
match => [ "message", "\A%{SYSLOG5424PRI}%{SYSLOGTIMESTAMP} slot1\/%{HOSTNAME:logsource} %{LOGLEVEL:loglevel} %{SYSLOGPROG}: %{GREEDYDATA:info}" ]
remove_tag => "_grokparsefailure"
add_tag => "grokked"
}
}
Code: Select all
if [program] == "dcc" {
grok {
match => [ "message", "\A%{SYSLOG5424PRI}%{SYSLOGTIMESTAMP} slot1\/%{HOSTNAME2:logsource} %{LOGLEVEL:loglevel} %{SYSLOGPROG}: %{GREEDYDATA:info}, source ip: %{IP:sourceip}, xff ip: %{IP:xffip}, source port: %{NUMBER:sourceport}, destination ip: %{IP:destinationip}, destination port: %{NUMBER:destinationport}, route_domain: %{NUMBER:routedomain}, HTTP classifier: %{GREEDYDATA:httpclassifier}, geographic location: , request: %{GREEDYDATA:request}User-Agent: %{GREEDYDATA:useragent}, username: %{GREEDYDATA:username}, session_id: %{GREEDYDATA:sessionid}", "message", "\A%{SYSLOG5424PRI}%{SYSLOGTIMESTAMP} slot1\/%{HOSTNAME2:logsource} %{LOGLEVEL:loglevel} %{SYSLOGPROG}: %{GREEDYDATA:info}, source ip: %{IP:sourceip}, xff ip: %{IP:xffip}, source port: %{NUMBER:sourceport}, destination ip: %{IP:destinationip}, destination port: %{NUMBER:destinationport}, route_domain: %{NUMBER:routedomain}, HTTP classifier: %{GREEDYDATA:httpclassifier}, geographic location: , request: %{GREEDYDATA:request}, username: %{GREEDYDATA:username}, session_id: %{GREEDYDATA:sessionid}" ]
}
Any advice how I should handle this?
The logs for dcc look like this by the way:
Code: Select all
<155>Mar 28 13:23:21 slot1/cpf_f5_1_vir_pr err dcc[9206]: 01310033:3: [SECEV] Request blocked, violations: Attack signature detected. HTTP protocol compliance sub violations: N/A. Evasion techniques sub violations: N/A. Web services security sub violations: N/A. Virus name: N/A. Support id: 8375986001652311748, source ip: 40.70.0.8, xff ip: 40.70.0.8, source port: 49949, destination ip: 40.70.1.138, destination port: 80, route_domain: 0, HTTP classifier: /Common/F5_External_1_RAMP_Policy, scheme HTTP, geographic location: , request: www.digipolis.be\r\nUser-Agent: libwww-perl/6.04\r\n>, username: , session_id:
<155>Mar 28 13:23:20 slot1/cpf_f5_1_vir_pr err dcc[9206]: 01310033:3: [SECEV] Request blocked, violations: Attack signature detected. HTTP protocol compliance sub violations: N/A. Evasion techniques sub violations: N/A. Web services security sub violations: N/A. Virus name: N/A. Support id: 8375986001652311736, source ip: 40.70.0.8, xff ip: 40.70.0.8, source port: 49927, destination ip: 40.70.1.138, destination port: 80, route_domain: 0, HTTP classifier: /Common/F5_External_1_RAMP_Policy, scheme HTTP, geographic location: , request: www.digipolis.be\r\nUser-Agent: libwww-perl/6.04\r\n>, username: , session_id:
<154>Mar 28 13:31:30 slot1/cpf_f5_1_vir_pr crit dcc[9206]: 01310038:2: [SECEV] Request violations: Illegal parameter,Illegal URL,Illegal file type. HTTP protocol compliance sub violations: N/A. Evasion techniques sub violations: N/A. Web services security sub violations: N/A. Virus name: N/A. Support id: 8375986001652203713, source ip: 109.130.197.61, xff ip: 109.130.197.61, source port: 1601, destination ip: 40.70.1.139, destination port: 80, route_domain: 0, HTTP classifier: /Common/GENSHPPR_class, scheme HTTP, geographic location: , request: http://schem>, username: , session_id: <71f091ce88335c04>
<155>Mar 28 13:30:02 slot1/cpf_f5_1_vir_pr err dcc[9206]: 01310039:3: [SECEV] Request violations: Attack signature detected. HTTP protocol compliance sub violations: N/A. Evasion techniques sub violations: N/A. Web services security sub violations: N/A. Virus name: N/A. Support id: 8375986001652316504, source ip: 35.21.24.59, xff ip: 35.21.24.59, source port: 49945, destination ip: 40.70.1.138, destination port: 80, route_domain: 0, HTTP classifier: /Common/F5_External_1_RAMP_Policy, scheme HTTP, geographic location: , request: , username: , session_id: <5ca8e8ce394c1110>Grtz and tx
Willem