Skip to content

Commit 25ed220

Browse files
committed
cisco_{asa,ftd}: harmonise pipelines
This brings the cisco_asa and cisco_ftd ingest pipelines more into agreement though parts dealing with ECS categorisation remain distinct. The changes in cisco_asa do not affect test outcomes and are for the most part cosmetic to reduce diff noise in future changes. It does add the malware event kind classification that exists in cisco_ftd. The changes in cisco_ftd fix incorrect handling of: - network.inner/cisco.ftd.tunnel_type fields - 305012 events. And add the network.community_id field to events.
1 parent 1a81d3f commit 25ed220

21 files changed

+2176
-241
lines changed

packages/cisco_asa/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.8.0"
3+
changes:
4+
- description: Harmonise with pipeline with Cisco FTD.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/issues/4380
27
- version: "2.7.7"
38
changes:
49
- description: Remove duplicate fields.

packages/cisco_asa/data_stream/log/elasticsearch/ingest_pipeline/default.yml

Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ processors:
105105
"append":
106106
{
107107
"field": "error.message",
108-
"value": "{{ _ingest.on_failure_message }}",
108+
"value": "{{{ _ingest.on_failure_message }}}",
109109
},
110110
},
111111
]
112112
- date:
113113
if: "ctx.event?.timezone != null && ctx._temp_?.raw_date != null"
114-
timezone: "{{ event.timezone }}"
114+
timezone: "{{{ event.timezone }}}"
115115
field: "_temp_.raw_date"
116116
target_field: "@timestamp"
117117
formats:
@@ -138,7 +138,7 @@ processors:
138138
"append":
139139
{
140140
"field": "error.message",
141-
"value": "{{ _ingest.on_failure_message }}",
141+
"value": "{{{ _ingest.on_failure_message }}}",
142142
},
143143
},
144144
]
@@ -494,7 +494,7 @@ processors:
494494
if: "ctx._temp_.cisco.message_id == '338001'"
495495
field: "server.domain"
496496
description: "338001"
497-
value: "{{source.domain}}"
497+
value: "{{{source.domain}}}"
498498
ignore_empty_value: true
499499
- dissect:
500500
if: "ctx._temp_.cisco.message_id == '338002'"
@@ -505,7 +505,7 @@ processors:
505505
if: "ctx._temp_.cisco.message_id == '338002'"
506506
field: "server.domain"
507507
description: "338002"
508-
value: "{{destination.domain}}"
508+
value: "{{{destination.domain}}}"
509509
ignore_empty_value: true
510510
- dissect:
511511
if: "ctx._temp_.cisco.message_id == '338003'"
@@ -526,7 +526,7 @@ processors:
526526
if: "ctx._temp_.cisco.message_id == '338005'"
527527
field: "server.domain"
528528
description: "338005"
529-
value: "{{source.domain}}"
529+
value: "{{{source.domain}}}"
530530
ignore_empty_value: true
531531
- dissect:
532532
if: "ctx._temp_.cisco.message_id == '338006'"
@@ -537,7 +537,7 @@ processors:
537537
if: "ctx._temp_.cisco.message_id == '338006'"
538538
field: "server.domain"
539539
description: "338006"
540-
value: "{{destination.domain}}"
540+
value: "{{{destination.domain}}}"
541541
ignore_empty_value: true
542542
- dissect:
543543
if: "ctx._temp_.cisco.message_id == '338007'"
@@ -558,7 +558,7 @@ processors:
558558
if: "ctx._temp_.cisco.message_id == '338101'"
559559
field: "server.domain"
560560
description: "338101"
561-
value: "{{source.domain}}"
561+
value: "{{{source.domain}}}"
562562
ignore_empty_value: true
563563
- dissect:
564564
if: "ctx._temp_.cisco.message_id == '338102'"
@@ -569,7 +569,7 @@ processors:
569569
if: "ctx._temp_.cisco.message_id == '338102'"
570570
field: "server.domain"
571571
description: "338102"
572-
value: "{{destination.domain}}"
572+
value: "{{{destination.domain}}}"
573573
ignore_empty_value: true
574574
- dissect:
575575
if: "ctx._temp_.cisco.message_id == '338103'"
@@ -590,7 +590,7 @@ processors:
590590
if: "ctx._temp_.cisco.message_id == '338201'"
591591
field: "server.domain"
592592
description: "338201"
593-
value: "{{source.domain}}"
593+
value: "{{{source.domain}}}"
594594
ignore_empty_value: true
595595
- dissect:
596596
if: "ctx._temp_.cisco.message_id == '338202'"
@@ -601,7 +601,7 @@ processors:
601601
if: "ctx._temp_.cisco.message_id == '338202'"
602602
field: "server.domain"
603603
description: "338202"
604-
value: "{{destination.domain}}"
604+
value: "{{{destination.domain}}}"
605605
ignore_empty_value: true
606606
- dissect:
607607
if: "ctx._temp_.cisco.message_id == '338203'"
@@ -612,7 +612,7 @@ processors:
612612
if: "ctx._temp_.cisco.message_id == '338203'"
613613
field: "server.domain"
614614
description: "338203"
615-
value: "{{source.domain}}"
615+
value: "{{{source.domain}}}"
616616
ignore_empty_value: true
617617
- dissect:
618618
if: "ctx._temp_.cisco.message_id == '338204'"
@@ -623,7 +623,7 @@ processors:
623623
if: "ctx._temp_.cisco.message_id == '338204'"
624624
field: "server.domain"
625625
description: "338204"
626-
value: "{{destination.domain}}"
626+
value: "{{{destination.domain}}}"
627627
ignore_empty_value: true
628628
- dissect:
629629
if: "ctx._temp_.cisco.message_id == '338301'"
@@ -634,25 +634,25 @@ processors:
634634
if: "ctx._temp_.cisco.message_id == '338301'"
635635
field: "client.address"
636636
description: "338301"
637-
value: "{{destination.address}}"
637+
value: "{{{destination.address}}}"
638638
ignore_empty_value: true
639639
- set:
640640
if: "ctx._temp_.cisco.message_id == '338301'"
641641
field: "client.port"
642642
description: "338301"
643-
value: "{{destination.port}}"
643+
value: "{{{destination.port}}}"
644644
ignore_empty_value: true
645645
- set:
646646
if: "ctx._temp_.cisco.message_id == '338301'"
647647
field: "server.address"
648648
description: "338301"
649-
value: "{{source.address}}"
649+
value: "{{{source.address}}}"
650650
ignore_empty_value: true
651651
- set:
652652
if: "ctx._temp_.cisco.message_id == '338301'"
653653
field: "server.port"
654654
description: "338301"
655-
value: "{{source.port}}"
655+
value: "{{{source.port}}}"
656656
ignore_empty_value: true
657657
- dissect:
658658
if: "ctx._temp_.cisco.message_id == '502103'"
@@ -664,8 +664,8 @@ processors:
664664
field: "event.type"
665665
description: "502103"
666666
value:
667-
- "group"
668-
- "change"
667+
- "group"
668+
- "change"
669669
- append:
670670
if: "ctx._temp_.cisco.message_id == '502103'"
671671
field: "event.category"
@@ -819,7 +819,7 @@ processors:
819819
if: '["713905", "713904", "713906", "713902", "713901"].contains(ctx._temp_.cisco.message_id)'
820820
field: "message"
821821
patterns:
822-
- "^(Group = %{IP}, )?(IP = %{IP:source.address}, )?%{GREEDYDATA:event.reason}$"
822+
- "^(Group = %{IP}, )?(IP = %{IP:source.address}, )?%{GREEDYDATA:event.reason}$"
823823
# Handle ecs action outcome protocol
824824
- set:
825825
if: '["434002", "434004"].contains(ctx._temp_.cisco.message_id)'
@@ -1437,7 +1437,7 @@ processors:
14371437
# processor converts it to the right value and populates start and end.
14381438
- set:
14391439
field: "_temp_.duration_hms"
1440-
value: "{{event.duration}}"
1440+
value: "{{{event.duration}}}"
14411441
ignore_empty_value: true
14421442
14431443
#
@@ -1792,7 +1792,7 @@ processors:
17921792
# Fills nat.ip and nat.port even when only the ip or port changed.
17931793
- set:
17941794
field: source.nat.ip
1795-
value: "{{_temp_.cisco.mapped_source_ip}}"
1795+
value: "{{{_temp_.cisco.mapped_source_ip}}}"
17961796
if: "ctx?._temp_?.cisco?.mapped_source_ip != ctx?.source?.ip"
17971797
ignore_empty_value: true
17981798
- convert:
@@ -1801,7 +1801,7 @@ processors:
18011801
ignore_missing: true
18021802
- set:
18031803
field: source.nat.port
1804-
value: "{{_temp_.cisco.mapped_source_port}}"
1804+
value: "{{{_temp_.cisco.mapped_source_port}}}"
18051805
if: "ctx?._temp_?.cisco?.mapped_source_port != ctx?.source?.port"
18061806
ignore_empty_value: true
18071807
- convert:
@@ -1810,7 +1810,7 @@ processors:
18101810
ignore_missing: true
18111811
- set:
18121812
field: destination.nat.ip
1813-
value: "{{_temp_.cisco.mapped_destination_ip}}"
1813+
value: "{{{_temp_.cisco.mapped_destination_ip}}}"
18141814
if: "ctx?._temp_?.cisco.mapped_destination_ip != ctx?.destination?.ip"
18151815
ignore_empty_value: true
18161816
- convert:
@@ -1819,7 +1819,7 @@ processors:
18191819
ignore_missing: true
18201820
- set:
18211821
field: destination.nat.port
1822-
value: "{{_temp_.cisco.mapped_destination_port}}"
1822+
value: "{{{_temp_.cisco.mapped_destination_port}}}"
18231823
if: "ctx?._temp_?.cisco?.mapped_destination_port != ctx?.destination?.port"
18241824
ignore_empty_value: true
18251825
- convert:
@@ -1893,7 +1893,7 @@ processors:
18931893
18941894
- set:
18951895
field: _temp_.url_domain
1896-
value: "{{url.domain}}"
1896+
value: "{{{url.domain}}}"
18971897
ignore_failure: true
18981898
if: ctx?.url?.domain != null
18991899
@@ -1903,7 +1903,7 @@ processors:
19031903
if: ctx?.url?.original != null
19041904
- append:
19051905
field: url.domain
1906-
value: "{{_temp_.url_domain}}"
1906+
value: "{{{_temp_.url_domain}}}"
19071907
ignore_failure: true
19081908
allow_duplicates: false
19091909
if: ctx?._temp_?.url_domain != null
@@ -2097,17 +2097,27 @@ processors:
20972097
ctx.event.outcome = 'success';
20982098
}
20992099
2100+
# Malware event kind is classified as alert when sha_disposition is "Malware", "Custom Detection" not for other cases.
2101+
- set:
2102+
if: 'ctx?.event?.code == "430005" && ["Malware", "Custom Detection"].contains(ctx.cisco.asa.security.sha_disposition)'
2103+
field: event.kind
2104+
value: alert
2105+
- append:
2106+
if: 'ctx?.event?.code == "430005" && !["Malware", "Custom Detection"].contains(ctx.cisco.asa.security.sha_disposition)'
2107+
field: event.category
2108+
value: file
2109+
21002110
- set:
21012111
description: copy destination.user.name to user.name if it is not set
21022112
field: user.name
2103-
value: "{{destination.user.name}}"
2113+
value: "{{{destination.user.name}}}"
21042114
ignore_empty_value: true
21052115
if: ctx?.user?.name == null
21062116
21072117
# Configures observer fields with a copy from cisco and host fields. Later on these might replace host.hostname.
21082118
- set:
21092119
field: observer.hostname
2110-
value: "{{ host.hostname }}"
2120+
value: "{{{ host.hostname }}}"
21112121
ignore_empty_value: true
21122122
- set:
21132123
field: observer.vendor
@@ -2123,30 +2133,30 @@ processors:
21232133
ignore_empty_value: true
21242134
- set:
21252135
field: observer.egress.interface.name
2126-
value: "{{ cisco.asa.destination_interface }}"
2136+
value: "{{{ cisco.asa.destination_interface }}}"
21272137
ignore_empty_value: true
21282138
- set:
21292139
field: observer.ingress.interface.name
2130-
value: "{{ cisco.asa.source_interface }}"
2140+
value: "{{{ cisco.asa.source_interface }}}"
21312141
ignore_empty_value: true
21322142
- append:
21332143
field: related.ip
2134-
value: "{{source.ip}}"
2144+
value: "{{{source.ip}}}"
21352145
if: "ctx?.source?.ip != null"
21362146
allow_duplicates: false
21372147
- append:
21382148
field: related.ip
2139-
value: "{{source.nat.ip}}"
2149+
value: "{{{source.nat.ip}}}"
21402150
if: "ctx?.source?.nat?.ip != null"
21412151
allow_duplicates: false
21422152
- append:
21432153
field: related.ip
2144-
value: "{{destination.ip}}"
2154+
value: "{{{destination.ip}}}"
21452155
if: "ctx?.destination?.ip != null"
21462156
allow_duplicates: false
21472157
- append:
21482158
field: related.ip
2149-
value: "{{destination.nat.ip}}"
2159+
value: "{{{destination.nat.ip}}}"
21502160
if: "ctx?.destination?.nat?.ip != null"
21512161
allow_duplicates: false
21522162
- append:
@@ -2156,7 +2166,7 @@ processors:
21562166
allow_duplicates: false
21572167
- append:
21582168
field: related.user
2159-
value: "{{server.user.name}}"
2169+
value: "{{{server.user.name}}}"
21602170
if: ctx?.server?.user?.name != null && ctx?.server?.user?.name != ''
21612171
allow_duplicates: false
21622172
- append:
@@ -2171,37 +2181,37 @@ processors:
21712181
allow_duplicates: false
21722182
- append:
21732183
field: related.hash
2174-
value: "{{file.hash.sha256}}"
2184+
value: "{{{file.hash.sha256}}}"
21752185
if: "ctx?.file?.hash?.sha256 != null"
21762186
allow_duplicates: false
21772187
- append:
21782188
field: related.hosts
2179-
value: "{{host.hostname}}"
2189+
value: "{{{host.hostname}}}"
21802190
if: ctx.host?.hostname != null && ctx.host?.hostname != ''
21812191
allow_duplicates: false
21822192
- append:
21832193
field: related.hosts
2184-
value: "{{observer.hostname}}"
2194+
value: "{{{observer.hostname}}}"
21852195
if: ctx.observer?.hostname != null && ctx.observer?.hostname != ''
21862196
allow_duplicates: false
21872197
- append:
21882198
field: related.hosts
2189-
value: "{{destination.domain}}"
2199+
value: "{{{destination.domain}}}"
21902200
if: ctx.destination?.domain != null && ctx.destination?.domain != ''
21912201
allow_duplicates: false
21922202
- append:
21932203
field: related.hosts
2194-
value: "{{source.domain}}"
2204+
value: "{{{source.domain}}}"
21952205
if: ctx.source?.domain != null && ctx.source?.domain != ''
21962206
allow_duplicates: false
21972207
- append:
21982208
field: related.hosts
2199-
value: "{{source.user.domain}}"
2209+
value: "{{{source.user.domain}}}"
22002210
if: ctx.source?.user?.domain != null && ctx.source?.user?.domain != ''
22012211
allow_duplicates: false
22022212
- append:
22032213
field: related.hosts
2204-
value: "{{destination.user.domain}}"
2214+
value: "{{{destination.user.domain}}}"
22052215
if: ctx.destination?.user?.domain != null && ctx.destination?.user?.domain != ''
22062216
allow_duplicates: false
22072217
- script:
@@ -2249,4 +2259,4 @@ on_failure:
22492259
ignore_missing: true
22502260
- append:
22512261
field: "error.message"
2252-
value: "{{ _ingest.on_failure_message }}"
2262+
value: "{{{ _ingest.on_failure_message }}}"

packages/cisco_asa/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: 1.0.0
22
name: cisco_asa
33
title: Cisco ASA
4-
version: "2.7.7"
4+
version: "2.8.0"
55
license: basic
66
description: Collect logs from Cisco ASA with Elastic Agent.
77
type: integration

packages/cisco_ftd/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.4.6"
3+
changes:
4+
- description: Harmonise with pipeline with Cisco ASA.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/issues/4380
27
- version: "2.4.5"
38
changes:
49
- description: Remove duplicate fields.

0 commit comments

Comments
 (0)