Skip to content

Commit 97c37f6

Browse files
committed
Update: fix CI fails and pipeline refactoring
1 parent 8a31a6a commit 97c37f6

File tree

2 files changed

+40
-42
lines changed

2 files changed

+40
-42
lines changed

cisco_asa/assets/logs/cisco-asa.yaml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ pipeline:
160160
110002 OR 110003 OR 110004 OR 746001 OR 746002 OR 746003 OR 746005
161161
OR 746007 OR 746016)"
162162
name: firewall
163-
- name: other
164-
filter:
163+
- filter:
165164
query: "@message_id:*"
165+
name: other
166166
target: service
167167
- type: service-remapper
168168
name: Define `service` as the official service of the log
@@ -183,7 +183,7 @@ pipeline:
183183
- "[ Scanning] drop rate-1 exceeded. Current burst rate is 19 per
184184
second, max configured rate is 33; Current average rate is 50 per
185185
second, max configured rate is 33; Cumulative total count is 44"
186-
- Threat-detection adds host 192.0.2.3 to shun list
186+
- Threat-detection adds host www.example.com to shun list
187187
- TCP Intercept SYN flood attack detected to 192.0.2.3/1194
188188
(192.0.2.14/443). Average rate of 47 SYNs/sec exceeded the
189189
threshold of 48.
@@ -208,7 +208,7 @@ pipeline:
208208
209209
rule_733102_733103 Threat-detection %{word:action} host %{ipOrHost:host} (to|from) shun list
210210
211-
rule_733104_733105 %{word:protocol} Intercept SYN flood attack detected to %{ip:network.destination.ip}/%{port:network.destination.port}\s*\(%{ip:real_ip}/%{port:real_port}\). %{word:rate_type} rate of %{number:rate} %{notSpace:rate_unit} exceeded the threshold of %{number:rate_threshold}
211+
rule_733104_733105 %{word:protocol} Intercept SYN flood attack detected to %{ip:network.destination.ip}/%{integer:network.destination.port}\s*\(%{ip:real_ip}/%{integer:real_port}\). %{word:rate_type} rate of %{number:rate} %{notSpace:rate_unit} exceeded the threshold of %{number:rate_threshold}
212212
- type: pipeline
213213
name: User Authentication
214214
enabled: true
@@ -236,15 +236,15 @@ pipeline:
236236
matchRules: >-
237237
rule_109005_109006 Authentication %{notSpace:evt.outcome} for user
238238
'%{regex("[^']*"):usr.name}' from
239-
%{ip:network.client.ip}/%{port:network.client.port} to
240-
%{ip:network.destination.ip}/%{port:network.destination.port} on
241-
interface %{data:interface}
239+
%{ip:network.client.ip}/%{integer:network.client.port} to
240+
%{ip:network.destination.ip}/%{integer:network.destination.port}
241+
on interface %{data:interface}
242242
243-
rule_109010 Auth from %{ip:network.client.ip}/%{port:network.client.port} to %{ip:network.destination.ip}/%{port:network.destination.port} %{notSpace:evt.outcome} \(%{regex("[^\\)]*"):reason}\) on interface %{data:interface}
243+
rule_109010 Auth from %{ip:network.client.ip}/%{integer:network.client.port} to %{ip:network.destination.ip}/%{integer:network.destination.port} %{notSpace:evt.outcome} \(%{regex("[^\\)]*"):reason}\) on interface %{data:interface}
244244
245-
rule_109023 User from %{ip:network.client.ip}/%{port:network.client.port} to %{ip:network.destination.ip}/%{port:network.destination.port} on interface %{regex(".*(?= using )"):interface} using %{regex(".*(?= must authenticate)"):service_name} must authenticate before using this service
245+
rule_109023 User from %{ip:network.client.ip}/%{integer:network.client.port} to %{ip:network.destination.ip}/%{integer:network.destination.port} on interface %{regex(".*(?= using )"):interface} using %{regex(".*(?= must authenticate)"):service_name} must authenticate before using this service
246246
247-
rule_109033_109034 Authentication %{notSpace:evt.outcome} for %{notSpace:user_type} user %{regex(".*(?= from )"):usr.name} from (%{ip:network.client.ip}|%{ip:network.client.ip}/%{port:network.client.port} to %{ip:network.destination.ip}/%{port:network.destination.port}). Interactive challenge processing is not supported for %{notSpace:protocol}( connections)?
247+
rule_109033_109034 Authentication %{notSpace:evt.outcome} for %{notSpace:user_type} user %{regex(".*(?= from )"):usr.name} from (%{ip:network.client.ip}|%{ip:network.client.ip}/%{integer:network.client.port} to %{ip:network.destination.ip}/%{integer:network.destination.port}). Interactive challenge processing is not supported for %{notSpace:protocol}( connections)?
248248
- type: pipeline
249249
name: User Authorization
250250
enabled: true
@@ -272,11 +272,11 @@ pipeline:
272272
matchRules: >-
273273
rule_109007_109008 Authorization %{word:evt.outcome} for user
274274
'%{regex("[^']*"):usr.name}' from
275-
%{ip:network.client.ip}/%{port:network.client.port} to
276-
%{ip:network.destination.ip}/%{port:network.destination.port} on
277-
interface %{data:interface}
275+
%{ip:network.client.ip}/%{integer:network.client.port} to
276+
%{ip:network.destination.ip}/%{integer:network.destination.port}
277+
on interface %{data:interface}
278278
279-
rule_109024_109025 Authorization %{word:evt.outcome} (\(acl=%{regex("[^\\)]*"):acl_id}\))?( for user '%{regex("[^']*"):usr.name}' )?from %{ip:network.client.ip}/%{port:network.client.port} to %{ip:network.destination.ip}/%{port:network.destination.port} (\(not authenticated\) )?on interface %{regex(".*(?= using )"):interface} using %{notSpace:protocol}( to)?
279+
rule_109024_109025 Authorization %{word:evt.outcome} (\(acl=%{regex("[^\\)]*"):acl_id}\))?( for user '%{regex("[^']*"):usr.name}' )?from %{ip:network.client.ip}/%{integer:network.client.port} to %{ip:network.destination.ip}/%{integer:network.destination.port} (\(not authenticated\) )?on interface %{regex(".*(?= using )"):interface} using %{notSpace:protocol}( to)?
280280
- type: pipeline
281281
name: User Management
282282
enabled: true
@@ -308,7 +308,7 @@ pipeline:
308308
query: "@message_id:(415001 OR 415002 OR 415003 OR 415005 OR 415013 OR 415016)"
309309
processors:
310310
- type: grok-parser
311-
name: Parse Application Firewall
311+
name: Parse Application Firewall Logs
312312
enabled: true
313313
source: message
314314
samples:
@@ -329,27 +329,27 @@ pipeline:
329329
requests exceeded drop inside test:10.10.10.10/51822 to
330330
outside:10.10.10.10/443"
331331
grok:
332-
supportRules: _parse_till_colon %{regex(".*(?=\\:)")}
332+
supportRules: ""
333333
matchRules: >-
334334
rule_415001_415002_415003_415005 HTTP - matched ("%{regex(".*(?=\"
335335
in policy-map)"):matched_string}"|%{regex(".*(?= in
336336
policy-map)"):matched_string}) in policy-map
337337
%{regex("[^,]*"):policy_map},\s+%{regex("header field count
338338
exceeded|header field length exceeded|body length exceeded|URI
339339
length exceeded"):reason}
340-
%{notSpace:connection_action}\s+%{_parse_till_colon:source_interface}:%{ip:network.client.ip}/%{port:network.client.port}
340+
%{notSpace:connection_action}\s+%{regex("[^:]*"):source_interface}:%{ip:network.client.ip}/%{integer:network.client.port}
341341
to
342-
%{_parse_till_colon:destination_interface}:%{ip:network.destination.ip}/%{port:network.destination.port}
342+
%{regex("[^:]*"):destination_interface}:%{ip:network.destination.ip}/%{integer:network.destination.port}
343343
344-
rule_415013_415016 (HTTP - )?policy-map %{regex("[^:]*"):policy_map}\s*:\s*%{regex("Maximum number of unanswered HTTP requests exceeded|Malformed chunked encoding"):reason} %{notSpace:connection_action}\s+%{_parse_till_colon:source_interface}:%{ip:network.client.ip}/%{port:network.client.port} to %{_parse_till_colon:destination_interface}:%{ip:network.destination.ip}/%{port:network.destination.port}
344+
rule_415013_415016 (HTTP - )?policy-map %{regex("[^:]*"):policy_map}\s*:\s*%{regex("Maximum number of unanswered HTTP requests exceeded|Malformed chunked encoding"):reason} %{notSpace:connection_action}\s+%{regex(".*(?=\\:)"):source_interface}:%{ip:network.client.ip}/%{integer:network.client.port} to %{regex(".*(?=\\:)"):destination_interface}:%{ip:network.destination.ip}/%{integer:network.destination.port}
345345
- type: pipeline
346346
name: Transparent Firewall
347347
enabled: true
348348
filter:
349349
query: "@message_id:(110002 OR 110003 OR 110004)"
350350
processors:
351351
- type: grok-parser
352-
name: Parse Transparent Firewall
352+
name: Parse Transparent Firewall Logs
353353
enabled: true
354354
source: message
355355
samples:
@@ -362,24 +362,24 @@ pipeline:
362362
zone-new/eth0:192.0.2.5/443(192.0.2.2/1199 ) to
363363
zone-dest/br0:192.0.2.2/1194(192.0.2.7/443 )
364364
grok:
365-
supportRules: _parse_till_colon %{regex(".*(?=\\:)")}
365+
supportRules: ""
366366
matchRules: >-
367367
rule_110002_110003 %{regex("Failed to locate egress
368-
interface|Routing failed to locate next-hop"):reason} for
369-
%{notSpace:protocol} from
370-
%{_parse_till_colon:source_interface}\s*:%{ip:network.client.ip}/%{port:network.client.port}
368+
interface|Routing failed to locate (next-hop|next hop)"):reason}
369+
for %{notSpace:protocol} from
370+
%{regex(".*(?=\\:)"):source_interface}\s*:%{ip:network.client.ip}/%{integer:network.client.port}
371371
to
372-
(%{_parse_till_colon:destination_interface}\s*:)?%{ip:network.destination.ip}/%{port:network.destination.port}
372+
(%{regex(".*(?=\\:)"):destination_interface}\s*:)?%{ip:network.destination.ip}/%{integer:network.destination.port}
373373
374-
rule_110004 %{regex("Egress interface changed"):reason} from %{regex(".*(?= to )"):old_interface} to %{regex(".*(?= on )"):new_interface} on %{notSpace:protocol} connection %{number:connection_id} for %{notSpace:outside_interface_zone}\s*/\s*%{_parse_till_colon:outside_interface}\s*:%{ip:outside_ip}\s*/\s*%{port:outside_port}\s*\(%{ip:outside_mapped_ip}\s*/\s*%{port:outside_mapped_port}\s*\) to %{notSpace:inside_interface_zone}\s*/\s*%{_parse_till_colon:inside_interface}\s*:%{ip:inside_ip}\s*/\s*%{port:inside_port}\s*\(%{ip:inside_mapped_ip}\s*/\s*%{port:inside_mapped_port}\s*\)
374+
rule_110004 %{regex("Egress interface changed"):reason} from %{regex(".*(?= to )"):old_interface} to %{regex(".*(?= on )"):new_interface} on %{notSpace:protocol} connection %{number:connection_id} for %{notSpace:outside_interface_zone}\s*/\s*%{regex("[^:]*"):outside_interface}\s*:%{ip:outside_ip}\s*/\s*%{integer:outside_port}\s*\(%{ip:outside_mapped_ip}\s*/\s*%{integer:outside_mapped_port}\s*\) to %{notSpace:inside_interface_zone}\s*/\s*%{regex("[^:]*"):inside_interface}\s*:%{ip:inside_ip}\s*/\s*%{integer:inside_port}\s*\(%{ip:inside_mapped_ip}\s*/\s*%{integer:inside_mapped_port}\s*\)
375375
- type: pipeline
376376
name: Identity Firewall
377377
enabled: true
378378
filter:
379379
query: "@message_id:(746001 OR 746002 OR 746003 OR 746005 OR 746007 OR 746016)"
380380
processors:
381381
- type: grok-parser
382-
name: Parse Identity Firewall
382+
name: Parse Identity Firewall Logs
383383
enabled: true
384384
source: message
385385
samples:
@@ -400,7 +400,7 @@ pipeline:
400400
401401
rule_746007 user-identity: NetBIOS response failed from User %{regex(".*(?= at )"):usr.name} at %{ip:network.client.ip}
402402
403-
rule_746016 user-identity: DNS lookup for %{ip:network.client.ip} failed, reason:\s+%{data:reason}
403+
rule_746016 user-identity: DNS lookup for %{ip:network.client.ip} failed, reason:\s*%{data:reason}
404404
405405
rule_746001_746002_746003 user-identity: %{data:database} %{notSpace:download_status}(\s+-\s+%{data:reason})?
406406
- type: pipeline
@@ -410,7 +410,7 @@ pipeline:
410410
query: "@message_id:405001"
411411
processors:
412412
- type: grok-parser
413-
name: Parsing ARP collision logs
413+
name: Parse ARP collision Logs
414414
enabled: true
415415
source: message
416416
samples:
@@ -434,7 +434,7 @@ pipeline:
434434
query: "@message_id:(106001 OR 106002 OR 106006)"
435435
processors:
436436
- type: grok-parser
437-
name: Parse connection logs
437+
name: Parse connection Logs
438438
enabled: true
439439
source: message
440440
samples:
@@ -451,14 +451,14 @@ pipeline:
451451
grok:
452452
supportRules: ""
453453
matchRules: >-
454-
rule_106001 %{regex("Inbound TCP connection denied"):reason} from
455-
%{ip:network.client.ip}/%{port:network.client.port} to
456-
%{ip:network.destination.ip}/%{port:network.destination.port}
454+
rule_106001 Inbound %{regex("TCP"):protocol} connection denied
455+
from %{ip:network.client.ip}/%{integer:network.client.port} to
456+
%{ip:network.destination.ip}/%{integer:network.destination.port}
457457
flags %{notSpace:tcp_flag}\s+on\s+interface %{data:interface}
458458
459459
rule_106002 %{notSpace:protocol} Connection denied by outbound list %{notSpace:outbound_list} src %{ip:network.client.ip} dest %{ip:network.destination.ip}
460460
461-
rule_106006 Deny inbound UDP from %{ip:network.client.ip}/%{port:network.client.port} to %{ip:network.destination.ip}/%{port:network.destination.port} on interface %{data:interface}
461+
rule_106006 Deny inbound %{regex("UDP"):protocol} from %{ip:network.client.ip}/%{integer:network.client.port} to %{ip:network.destination.ip}/%{integer:network.destination.port} on interface %{data:interface}
462462
- type: pipeline
463463
name: Dynamic traffic insights
464464
enabled: true
@@ -468,7 +468,7 @@ pipeline:
468468
338202 OR 338203 OR 338204)"
469469
processors:
470470
- type: grok-parser
471-
name: Parse dynamic traffic logs
471+
name: Parse dynamic traffic Logs
472472
enabled: true
473473
source: message
474474
samples:
@@ -497,15 +497,15 @@ pipeline:
497497
local list: mycoolapp-preview.mock, threat-level: 0, category:
498498
malware"
499499
grok:
500-
supportRules: _parse_till_colon %{regex(".*(?=:)")}
500+
supportRules: ""
501501
matchRules: 'rule Dynamic (Filter|filter)
502502
%{regex("monitored|permitted|dropped|denied|action"):action}
503503
%{regex("blacklisted|black listed|whitelisted|white
504504
listed|greylisted|grey listed"):traffic_type} %{notSpace:protocol}
505505
traffic from
506-
%{_parse_till_colon:in_interface}:%{ip:network.client.ip}/%{port:network.client.port}\s*\(%{ipOrHost:client_mapped_ip}/%{port:client_mapped_port}\)(\))?
506+
%{regex(".*(?=:)"):in_interface}:%{ip:network.client.ip}/%{integer:network.client.port}\s*\(%{ipOrHost:client_mapped_ip}/%{integer:client_mapped_port}\)(\))?
507507
to
508-
%{_parse_till_colon:out_interface}:%{ip:network.destination.ip}/%{port:network.destination.port}\s*\(%{ipOrHost:destination_mapped_ip}/%{port:destination_mapped_port}\)(\),|,\),|,)?
508+
%{regex(".*(?=:)"):out_interface}:%{ip:network.destination.ip}/%{integer:network.destination.port}\s*\(%{ipOrHost:destination_mapped_ip}/%{integer:destination_mapped_port}\)(\),|,\),|,)?
509509
(source|destination)
510510
(%{ip:malicious_address}/%{notSpace:malicious_address_netmask}|%{notSpace:malicious_address})
511511
resolved from %{notSpace:list_type} list:

cisco_asa/assets/logs/cisco-asa_tests.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ tests:
4040
custom:
4141
message_id: "733104"
4242
network:
43-
client:
44-
geoip: {}
45-
ip: "192.0.2.14"
46-
port: "443"
4743
destination:
4844
geoip: {}
4945
ip: "192.0.2.3"
@@ -53,6 +49,8 @@ tests:
5349
rate_threshold: 48.0
5450
rate_type: "Average"
5551
rate_unit: "SYNs/sec"
52+
real_ip: "192.0.2.14"
53+
real_port: "443"
5654
service: "threat-detection"
5755
severity: 4
5856
timestamp: 1764055015000

0 commit comments

Comments
 (0)