Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x-pack/filebeat/module/cisco: fix handling of user parsing with sgt fields #32196

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff]

*Filebeat*

- cisco/asa: fix handling of user names when there are Security Group Tags present. {issue}32009[32009] {pull}32196[32196]

*Heartbeat*

Expand Down
20 changes: 20 additions & 0 deletions filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21459,6 +21459,16 @@ type: keyword

--

*`cisco.asa.source_user_security_group_tag`*::
+
--
The Security Group Tag for the source user. Security Group Tag are 16-bit identifiers used to represent logical group privilege.


type: long

--

*`cisco.asa.destination_username`*::
+
--
Expand All @@ -21469,6 +21479,16 @@ type: keyword

--

*`cisco.asa.destination_user_security_group_tag`*::
+
--
The Security Group Tag for the destination user. Security Group Tag are 16-bit identifiers used to represent logical group privilege.


type: long

--

*`cisco.asa.mapped_source_ip`*::
+
--
Expand Down
10 changes: 10 additions & 0 deletions x-pack/filebeat/module/cisco/asa/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,21 @@
description: >
Name of the user that is the source for this event.

- name: source_user_security_group_tag
type: long
description: >
The Security Group Tag for the source user. Security Group Tag are 16-bit identifiers used to represent logical group privilege.

- name: destination_username
type: keyword
description: >
Name of the user that is the destination for this event.

- name: destination_user_security_group_tag
type: long
description: >
The Security Group Tag for the destination user. Security Group Tag are 16-bit identifiers used to represent logical group privilege.

- name: mapped_source_ip
type: ip
description: >
Expand Down
3 changes: 3 additions & 0 deletions x-pack/filebeat/module/cisco/asa/test/asa-fix.log
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ Oct 20 2019 15:42:53: %ASA-6-106100: access-list incoming permitted udp dmz2/127
Oct 20 2019 15:42:54: %ASA-6-106100: access-list incoming permitted udp dmz2/127.2.3.4(56575)(LOCAL\\username) -> inside/127.3.4.5(53) hit-cnt 1 first hit [0x93d0e533, 0x578ef52f]
Aug 6 2020 11:01:37: %ASA-session-3-106102: access-list dev_inward_client permitted udp for user redacted outside/10.123.123.20(49721) -> inside/10.223.223.40(53) hit-cnt 1 first hit [0x3c8b88c1, 0xbee595c3]
Aug 6 2020 11:01:38: %ASA-1-106103: access-list filter denied icmp for user joe inside/10.1.2.3(64321) -> outside/1.2.33.40(8080) hit-cnt 1 first hit [0x3c8b88c1, 0xbee595c3]
Jun 21 2022 11:47:08: %ASA-6-302015: Built inbound UDP connection 7 for outside:81.2.69.142/3424 (81.2.69.142/3424)(LOCAL\alice, 123) to inside:89.160.20.112/9803 (89.160.20.112/9803) (bob)
Jun 21 2022 11:47:08: %ASA-6-302015: Built inbound UDP connection 7 for outside:81.2.69.142/3424 (81.2.69.142/3424)(LOCAL\alice) to inside:89.160.20.112/9803 (89.160.20.112/9803) (bob)
Jun 21 2022 11:47:09: %ASA-6-302015: Built inbound UDP connection 7 for outside:81.2.69.142/3424 (81.2.69.142/3424)(LOCAL\alice, 123) to inside:89.160.20.112/9803 (89.160.20.112/9803)(LOCAL\dave, 246) (bob)
235 changes: 235 additions & 0 deletions x-pack/filebeat/module/cisco/asa/test/asa-fix.log-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -566,5 +566,240 @@
"forwarded"
],
"user.name": "joe"
},
{
"cisco.asa.connection_id": "7",
"cisco.asa.destination_interface": "inside",
"cisco.asa.mapped_destination_ip": "89.160.20.112",
"cisco.asa.mapped_destination_port": 9803,
"cisco.asa.mapped_source_ip": "81.2.69.142",
"cisco.asa.mapped_source_port": 3424,
"cisco.asa.message_id": "302015",
"cisco.asa.source_interface": "outside",
"cisco.asa.source_user_security_group_tag": 123,
"cisco.asa.source_username": "LOCAL\\alice",
"cisco.asa.termination_user": "bob",
"destination.address": "89.160.20.112",
"destination.as.number": 29518,
"destination.as.organization.name": "Bredband2 AB",
"destination.geo.city_name": "Link\u00f6ping",
"destination.geo.continent_name": "Europe",
"destination.geo.country_iso_code": "SE",
"destination.geo.country_name": "Sweden",
"destination.geo.location.lat": 58.4167,
"destination.geo.location.lon": 15.6167,
"destination.geo.region_iso_code": "SE-E",
"destination.geo.region_name": "\u00d6sterg\u00f6tland County",
"destination.ip": "89.160.20.112",
"destination.port": 9803,
"event.action": "firewall-rule",
"event.category": [
"network"
],
"event.code": 302015,
"event.dataset": "cisco.asa",
"event.kind": "event",
"event.module": "cisco",
"event.original": "%ASA-6-302015: Built inbound UDP connection 7 for outside:81.2.69.142/3424 (81.2.69.142/3424)(LOCAL\\alice, 123) to inside:89.160.20.112/9803 (89.160.20.112/9803) (bob)",
"event.severity": 6,
"event.timezone": "-02:00",
"event.type": [
"info"
],
"fileset.name": "asa",
"input.type": "log",
"log.level": "informational",
"log.offset": 1899,
"network.community_id": "1:797FALeb94mYDqvQDgC+6NRdALQ=",
"network.direction": "inbound",
"network.iana_number": 17,
"network.transport": "udp",
"observer.egress.interface.name": "inside",
"observer.ingress.interface.name": "outside",
"observer.product": "asa",
"observer.type": "firewall",
"observer.vendor": "Cisco",
"related.ip": [
"81.2.69.142",
"89.160.20.112"
],
"related.user": [
"alice"
],
"service.type": "cisco",
"source.address": "81.2.69.142",
"source.geo.city_name": "London",
"source.geo.continent_name": "Europe",
"source.geo.country_iso_code": "GB",
"source.geo.country_name": "United Kingdom",
"source.geo.location.lat": 51.5142,
"source.geo.location.lon": -0.0931,
"source.geo.region_iso_code": "GB-ENG",
"source.geo.region_name": "England",
"source.ip": "81.2.69.142",
"source.port": 3424,
"source.user.name": "alice",
"tags": [
"cisco-asa",
"forwarded"
]
},
{
"cisco.asa.connection_id": "7",
"cisco.asa.destination_interface": "inside",
"cisco.asa.mapped_destination_ip": "89.160.20.112",
"cisco.asa.mapped_destination_port": 9803,
"cisco.asa.mapped_source_ip": "81.2.69.142",
"cisco.asa.mapped_source_port": 3424,
"cisco.asa.message_id": "302015",
"cisco.asa.source_interface": "outside",
"cisco.asa.source_username": "LOCAL\\alice",
"cisco.asa.termination_user": "bob",
"destination.address": "89.160.20.112",
"destination.as.number": 29518,
"destination.as.organization.name": "Bredband2 AB",
"destination.geo.city_name": "Link\u00f6ping",
"destination.geo.continent_name": "Europe",
"destination.geo.country_iso_code": "SE",
"destination.geo.country_name": "Sweden",
"destination.geo.location.lat": 58.4167,
"destination.geo.location.lon": 15.6167,
"destination.geo.region_iso_code": "SE-E",
"destination.geo.region_name": "\u00d6sterg\u00f6tland County",
"destination.ip": "89.160.20.112",
"destination.port": 9803,
"event.action": "firewall-rule",
"event.category": [
"network"
],
"event.code": 302015,
"event.dataset": "cisco.asa",
"event.kind": "event",
"event.module": "cisco",
"event.original": "%ASA-6-302015: Built inbound UDP connection 7 for outside:81.2.69.142/3424 (81.2.69.142/3424)(LOCAL\\alice) to inside:89.160.20.112/9803 (89.160.20.112/9803) (bob)",
"event.severity": 6,
"event.timezone": "-02:00",
"event.type": [
"info"
],
"fileset.name": "asa",
"input.type": "log",
"log.level": "informational",
"log.offset": 2089,
"network.community_id": "1:797FALeb94mYDqvQDgC+6NRdALQ=",
"network.direction": "inbound",
"network.iana_number": 17,
"network.transport": "udp",
"observer.egress.interface.name": "inside",
"observer.ingress.interface.name": "outside",
"observer.product": "asa",
"observer.type": "firewall",
"observer.vendor": "Cisco",
"related.ip": [
"81.2.69.142",
"89.160.20.112"
],
"related.user": [
"alice"
],
"service.type": "cisco",
"source.address": "81.2.69.142",
"source.geo.city_name": "London",
"source.geo.continent_name": "Europe",
"source.geo.country_iso_code": "GB",
"source.geo.country_name": "United Kingdom",
"source.geo.location.lat": 51.5142,
"source.geo.location.lon": -0.0931,
"source.geo.region_iso_code": "GB-ENG",
"source.geo.region_name": "England",
"source.ip": "81.2.69.142",
"source.port": 3424,
"source.user.name": "alice",
"tags": [
"cisco-asa",
"forwarded"
]
},
{
"cisco.asa.connection_id": "7",
"cisco.asa.destination_interface": "inside",
"cisco.asa.destination_user_security_group_tag": 246,
"cisco.asa.destination_username": "LOCAL\\dave",
"cisco.asa.mapped_destination_ip": "89.160.20.112",
"cisco.asa.mapped_destination_port": 9803,
"cisco.asa.mapped_source_ip": "81.2.69.142",
"cisco.asa.mapped_source_port": 3424,
"cisco.asa.message_id": "302015",
"cisco.asa.source_interface": "outside",
"cisco.asa.source_user_security_group_tag": 123,
"cisco.asa.source_username": "LOCAL\\alice",
"cisco.asa.termination_user": "bob",
"destination.address": "89.160.20.112",
"destination.as.number": 29518,
"destination.as.organization.name": "Bredband2 AB",
"destination.geo.city_name": "Link\u00f6ping",
"destination.geo.continent_name": "Europe",
"destination.geo.country_iso_code": "SE",
"destination.geo.country_name": "Sweden",
"destination.geo.location.lat": 58.4167,
"destination.geo.location.lon": 15.6167,
"destination.geo.region_iso_code": "SE-E",
"destination.geo.region_name": "\u00d6sterg\u00f6tland County",
"destination.ip": "89.160.20.112",
"destination.port": 9803,
"destination.user.name": "dave",
"event.action": "firewall-rule",
"event.category": [
"network"
],
"event.code": 302015,
"event.dataset": "cisco.asa",
"event.kind": "event",
"event.module": "cisco",
"event.original": "%ASA-6-302015: Built inbound UDP connection 7 for outside:81.2.69.142/3424 (81.2.69.142/3424)(LOCAL\\alice, 123) to inside:89.160.20.112/9803 (89.160.20.112/9803)(LOCAL\\dave, 246) (bob)",
"event.severity": 6,
"event.timezone": "-02:00",
"event.type": [
"info"
],
"fileset.name": "asa",
"input.type": "log",
"log.level": "informational",
"log.offset": 2274,
"network.community_id": "1:797FALeb94mYDqvQDgC+6NRdALQ=",
"network.direction": "inbound",
"network.iana_number": 17,
"network.transport": "udp",
"observer.egress.interface.name": "inside",
"observer.ingress.interface.name": "outside",
"observer.product": "asa",
"observer.type": "firewall",
"observer.vendor": "Cisco",
"related.ip": [
"81.2.69.142",
"89.160.20.112"
],
"related.user": [
"alice",
"dave"
],
"service.type": "cisco",
"source.address": "81.2.69.142",
"source.geo.city_name": "London",
"source.geo.continent_name": "Europe",
"source.geo.country_iso_code": "GB",
"source.geo.country_name": "United Kingdom",
"source.geo.location.lat": 51.5142,
"source.geo.location.lon": -0.0931,
"source.geo.region_iso_code": "GB-ENG",
"source.geo.region_name": "England",
"source.ip": "81.2.69.142",
"source.port": 3424,
"source.user.name": "alice",
"tags": [
"cisco-asa",
"forwarded"
],
"user.name": "dave"
}
]
12 changes: 6 additions & 6 deletions x-pack/filebeat/module/cisco/asa/test/sample.log-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -3933,7 +3933,7 @@
"89.160.20.156"
],
"related.user": [
"user@domain.tld"
"user"
],
"service.type": "cisco",
"source.address": "1.128.3.4",
Expand All @@ -3944,7 +3944,7 @@
"source.nat.port": "34534",
"source.port": 12312,
"source.user.domain": "domain.tld",
"source.user.name": "user@domain.tld",
"source.user.name": "user",
"tags": [
"cisco-asa",
"forwarded"
Expand Down Expand Up @@ -4028,7 +4028,7 @@
"destination.as.organization.name": "Telstra Pty Ltd",
"destination.ip": "1.128.3.4",
"destination.user.domain": "domain.tld",
"destination.user.name": "user@domain.tld",
"destination.user.name": "user",
"event.action": "flow-expiration",
"event.category": [
"network"
Expand Down Expand Up @@ -4062,7 +4062,7 @@
"89.160.20.156"
],
"related.user": [
"user@domain.tld"
"user"
],
"service.type": "cisco",
"source.address": "89.160.20.156",
Expand All @@ -4078,12 +4078,12 @@
"source.geo.region_name": "\u00d6sterg\u00f6tland County",
"source.ip": "89.160.20.156",
"source.user.domain": "domain.tld",
"source.user.name": "user@domain.tld",
"source.user.name": "user",
"tags": [
"cisco-asa",
"forwarded"
],
"user.name": "user@domain.tld"
"user.name": "user"
},
{
"@timestamp": "2021-01-13T19:12:37.000-02:00",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/module/cisco/fields.go

Large diffs are not rendered by default.

Loading