@@ -10,57 +10,44 @@ processors:
1010 target_field : cisco_meraki.event_subtype
1111
1212# scan event based on event type
13- - dissect :
14- field : event.original
15- pattern : " %{} ids_alerted %{*sig}=%{&sig} %{*pri}=%{&pri} %{*ts}=%{&ts} %{*dhost}=%{&dhost} %{*dir}=%{&dir} %{*prot}=%{&prot} %{*src}=%{&src} %{*dst}=%{&dst} %{}"
16- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
17- - dissect :
18- field : event.original
19- pattern : " %{} security_filtering_file_scanned %{*url}=%{&url} %{*src}=%{&src} %{*dst}=%{&dst} %{*mac}=%{&mac} %{*name}='%{&name}' %{*sha256}=%{&sha256} %{*disp}=%{&disp} %{*action}=%{&action}"
20- if : ctx?.cisco_meraki?.event_subtype == 'security_filtering_file_scanned'
21- - dissect :
13+ - grok :
2214 field : event.original
23- pattern : " %{} security_filtering_disposition_change %{*name}=%{&name} %{*sha256}=%{&sha256} %{*disp}=%{&disp} %{*action}=%{&action}"
24- if : ctx?.cisco_meraki?.event_subtype == 'security_filtering_disposition_change'
15+ patterns :
16+ - ^%{DATA} (security_event|ids-alerts) (%{WORD}\s)?%{DATA:_temp.kvs}(\smessage:\s?%{DATA:message})?$
17+ - kv :
18+ field : _temp.kvs
19+ field_split : " "
20+ value_split : " ="
21+ trim_value : " '\" "
2522
2623# handle fields of ids_alerted type
2724- rename :
2825 field : priority
2926 target_field : cisco_meraki.security.priority
30- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
27+ ignore_missing : true
3128- rename :
3229 field : signature
3330 target_field : cisco_meraki.security.signature
34- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
31+ ignore_missing : true
3532- date :
3633 field : timestamp
3734 target_field : threat.indicator.last_seen
3835 formats : ['UNIX']
39- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
36+ if : ctx.timestamp != null
4037- gsub :
4138 field : dhost
4239 target_field : cisco_meraki.security.dhost
4340 pattern : ' [-:.]'
4441 replacement : ' -'
45- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
42+ ignore_missing : true
4643- rename :
4744 field : direction
4845 target_field : network.direction
49- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
46+ ignore_missing : true
5047- lowercase :
5148 field : protocol
5249 target_field : network.protocol
53- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
54- # Process the remaining after dst=. It can have "decision=<word> message: *" or just "message: *"
55- - dissect :
56- field : event.original
57- pattern : " %{} dst=%{?ignore} %{*decision}=%{&decision} %{*message}:%{&message}"
58- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
59- ignore_failure : true
60- - dissect :
61- field : event.original
62- pattern : " %{} dst=%{?ignore} %{*message}:%{&message}"
63- if : ctx?.decision == null && ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
50+ ignore_missing : true
6451- rename :
6552 field : message
6653 target_field : threat.indicator.description
@@ -70,35 +57,34 @@ processors:
7057 field : decision
7158 target_field : cisco_meraki.security.decision
7259 ignore_missing : true
73- if : ctx?.cisco_meraki?.event_subtype == 'ids_alerted'
7460
7561# handle fields of security_filtering_file_scanned or security_filtering_disposition_change type
7662- rename :
7763 field : url
7864 target_field : threat.indicator.reference
79- if : ctx?.cisco_meraki?.event_subtype == 'security_filtering_file_scanned'
65+ ignore_missing : true
8066- gsub :
8167 field : mac
8268 target_field : cisco_meraki.security.mac
8369 pattern : ' [-:.]'
8470 replacement : ' -'
85- if : ctx?.cisco_meraki?.event_subtype == 'security_filtering_file_scanned'
71+ ignore_missing : true
8672- rename :
8773 field : name
8874 target_field : threat.indicator.file.name
89- if : ctx?.cisco_meraki?.event_subtype == 'security_filtering_file_scanned' || ctx?.cisco_meraki?.event_subtype == 'security_filtering_disposition_change'
75+ ignore_missing : true
9076- rename :
9177 field : sha256
9278 target_field : threat.indicator.file.hash.sha256
93- if : ctx?.cisco_meraki?.event_subtype == 'security_filtering_file_scanned' || ctx?.cisco_meraki?.event_subtype == 'security_filtering_disposition_change'
79+ ignore_missing : true
9480- rename :
9581 field : disposition
9682 target_field : cisco_meraki.disposition
9783 ignore_missing : true
9884- rename :
9985 field : action
10086 target_field : cisco_meraki.security.action
101- if : ctx?.cisco_meraki?.event_subtype == 'security_filtering_file_scanned' || ctx?.cisco_meraki?.event_subtype == 'security_filtering_disposition_change'
87+ ignore_missing : true
10288# fields common to more than one event type
10389# src processing
10490- grok :
@@ -117,13 +103,14 @@ processors:
117103 type : ip
118104 field : _temp.src_ip
119105 target_field : source.ip
120- if : ctx?.cisco_meraki?.event_subtype != 'security_filtering_disposition_change'
106+ ignore_missing : true
121107- convert :
122108 field : sport
123109 target_field : source.port
124110 type : long
125- if : ctx?.sport != "0" && ctx?.cisco_meraki?.event_subtype != 'security_filtering_disposition_change'
111+ ignore_missing : true
126112 ignore_failure : true
113+ if : ctx?.sport != "0"
127114# dst processing
128115- grok :
129116 field : dst
@@ -142,13 +129,14 @@ processors:
142129 field : _temp.dst_ip
143130 target_field : destination.ip
144131 ignore_failure : true
145- if : ctx?.cisco_meraki?.event_subtype != 'security_filtering_disposition_change'
132+ ignore_missing : true
146133- convert :
147134 field : dport
148135 target_field : destination.port
149136 type : long
150137 if : ctx?.dport != "0" && ctx?.cisco_meraki?.event_subtype != 'security_filtering_disposition_change'
151138 ignore_failure : true
139+ ignore_missing : true
152140on_failure :
153141- set :
154142 field : event.kind
0 commit comments