Skip to content

Commit 6f2611d

Browse files
[cisco_asa] Allow masked usernames for 315011 messages (#13306)
- Expand grok patterns for 315011 to support masked ('*****') usernames
1 parent c21047b commit 6f2611d

File tree

5 files changed

+78
-3
lines changed

5 files changed

+78
-3
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.43.3"
3+
changes:
4+
- description: Allow masked usernames for 315011 messages.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/13306
27
- version: "2.43.2"
38
changes:
49
- description: Handle another variation of message type 315011

packages/cisco_asa/data_stream/log/_dev/test/pipeline/test-additional-messages.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ May 5 19:02:25 dev01: %ASA-6-716039: Group <malcorp group> User <malory> IP <17
127127
<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-6-302010: 12 in use, 10 most used
128128
<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-6-315011: SSH session from 10.1.2.1 on interface inside for user USER_1 disconnected by SSH server, reason: Out of memory
129129
<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-6-315011: SSH session from 10.1.2.3 on interface inside for user "user-test" terminated normally.
130+
<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-6-315011: SSH session from 10.1.2.3 on interface inside for user "*****" disconnected by SSH server, reason: "Time-out activated" (0x91)
130131
<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-6-721016: (DEVICE_1) WebVPN session for client user USER_1, IP 10.20.0.1 has been created.
131132
<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-6-721018: (DEVICE_1) WebVPN session for client user USER_1, IP 10.20.0.1 has been deleted.
132133
<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-5-722028: Group <GROUP 1> User <USER 1> IP <10.20.0.1> Stale SVC connection closed.

packages/cisco_asa/data_stream/log/_dev/test/pipeline/test-additional-messages.log-expected.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9092,6 +9092,73 @@
90929092
"preserve_original_event"
90939093
]
90949094
},
9095+
{
9096+
"@timestamp": "2023-10-03T16:40:40.000Z",
9097+
"cisco": {
9098+
"asa": {
9099+
"source_interface": "inside"
9100+
}
9101+
},
9102+
"ecs": {
9103+
"version": "8.17.0"
9104+
},
9105+
"event": {
9106+
"action": "ssh-session-ended",
9107+
"category": [
9108+
"network"
9109+
],
9110+
"code": "315011",
9111+
"kind": "event",
9112+
"original": "<140>Oct 03 2023 16:40:40 myAsaHostname : %ASA-6-315011: SSH session from 10.1.2.3 on interface inside for user \"*****\" disconnected by SSH server, reason: \"Time-out activated\" (0x91)",
9113+
"reason": "\"Time-out activated\" (0x91)",
9114+
"severity": 6,
9115+
"timezone": "UTC",
9116+
"type": [
9117+
"connection",
9118+
"end"
9119+
]
9120+
},
9121+
"host": {
9122+
"hostname": "myAsaHostname"
9123+
},
9124+
"log": {
9125+
"level": "informational",
9126+
"syslog": {
9127+
"facility": {
9128+
"code": 17
9129+
},
9130+
"priority": 140,
9131+
"severity": {
9132+
"code": 4
9133+
}
9134+
}
9135+
},
9136+
"observer": {
9137+
"hostname": "myAsaHostname",
9138+
"ingress": {
9139+
"interface": {
9140+
"name": "inside"
9141+
}
9142+
},
9143+
"product": "asa",
9144+
"type": "firewall",
9145+
"vendor": "Cisco"
9146+
},
9147+
"related": {
9148+
"hosts": [
9149+
"myAsaHostname"
9150+
],
9151+
"ip": [
9152+
"10.1.2.3"
9153+
]
9154+
},
9155+
"source": {
9156+
"ip": "10.1.2.3"
9157+
},
9158+
"tags": [
9159+
"preserve_original_event"
9160+
]
9161+
},
90959162
{
90969163
"@timestamp": "2023-10-03T16:40:40.000Z",
90979164
"cisco": {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,10 @@ processors:
652652
field: "message"
653653
description: "315011"
654654
patterns:
655-
- 'SSH session from %{IP:source.ip} on interface %{WORD:_temp_.cisco.source_interface} for user "?%{USERNAME:source.user.name}"? disconnected by SSH server, reason: %{GREEDYDATA:event.reason}'
656-
- 'SSH session from %{IP:source.ip} on interface %{WORD:_temp_.cisco.source_interface} for user "?%{USERNAME:source.user.name}"? terminated normally'
655+
- 'SSH session from %{IP:source.ip} on interface %{WORD:_temp_.cisco.source_interface} for user %{CISCO_USER} disconnected by SSH server, reason: %{GREEDYDATA:event.reason}'
656+
- 'SSH session from %{IP:source.ip} on interface %{WORD:_temp_.cisco.source_interface} for user %{CISCO_USER} terminated normally'
657+
pattern_definitions:
658+
CISCO_USER: '\"?(?:\*{5}|%{USERNAME:source.user.name})\"?'
657659
- dissect:
658660
if: "ctx._temp_.cisco.message_id == '322001'"
659661
tag: parse_322001

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: "3.0.3"
22
name: cisco_asa
33
title: Cisco ASA
4-
version: "2.43.2"
4+
version: "2.43.3"
55
description: Collect logs from Cisco ASA with Elastic Agent.
66
type: integration
77
categories:

0 commit comments

Comments
 (0)