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

Cisco ASA: Fix message 106100 #20245

Merged
merged 1 commit into from
Jul 28, 2020
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 @@ -223,6 +223,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fix Filebeat OOMs on very long lines {issue}19500[19500], {pull}19552[19552]
- Fix s3 input parsing json file without expand_event_list_from_field. {issue}19902[19902] {pull}19962[19962]
- Fix millisecond timestamp normalization issues in CrowdStrike module {issue}20035[20035], {pull}20138[20138]
- Fix support for message code 106100 in Cisco ASA and FTD. {issue}19350[19350] {pull}20245[20245]

*Heartbeat*

Expand Down
2 changes: 2 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 @@ -5,3 +5,5 @@ Apr 17 2020 14:16:20 SNL-ASA-VPN-A01 : %ASA-4-106023: Deny udp src Inside:10.123
Apr 17 2020 14:15:07 SNL-ASA-VPN-A01 : %ASA-2-106017: Deny IP due to Land Attack from 10.123.123.123 to 10.123.123.123
Apr 17 2020 14:15:07 SNL-ASA-VPN-A01 : %ASA-3-313008: Denied IPv6-ICMP type=134, code=0 from fe80::1ff:fe23:4567:890a on interface ISP1
Jun 08 2020 12:59:57: %ASA-4-313009: Denied invalid ICMP code 9, for Inside:10.255.0.206/8795 (10.255.0.206/8795) to identity:10.12.31.51/0 (10.12.31.51/0), ICMP id 295, ICMP type 8
Oct 20 2019 15:42:53: %ASA-6-106100: access-list incoming permitted udp dmz2/127.2.3.4(56575) -> inside/127.3.4.5(53) hit-cnt 1 first hit [0x93d0e533, 0x578ef52f]
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]
86 changes: 86 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 @@ -299,5 +299,91 @@
"cisco-asa",
"forwarded"
]
},
{
"cisco.asa.destination_interface": "inside",
"cisco.asa.message_id": "106100",
"cisco.asa.rule_name": "incoming",
"cisco.asa.source_interface": "dmz2",
"destination.address": "127.3.4.5",
"destination.ip": "127.3.4.5",
"destination.port": 53,
"event.action": "firewall-rule",
"event.category": [
"network"
],
"event.code": 106100,
"event.dataset": "cisco.asa",
"event.kind": "event",
"event.module": "cisco",
"event.original": "%ASA-6-106100: access-list incoming permitted udp dmz2/127.2.3.4(56575) -> inside/127.3.4.5(53) hit-cnt 1 first hit [0x93d0e533, 0x578ef52f]",
"event.outcome": "allow",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow isn't one of the allowed values for event.outcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created an issue: #20253

"event.severity": 6,
"event.timezone": "-02:00",
"event.type": [
"info",
"allowed"
],
"fileset.name": "asa",
"input.type": "log",
"log.level": "informational",
"log.offset": 1171,
"network.iana_number": 17,
"network.transport": "udp",
"related.ip": [
"127.2.3.4",
"127.3.4.5"
],
"service.type": "cisco",
"source.address": "127.2.3.4",
"source.ip": "127.2.3.4",
"source.port": 56575,
"tags": [
"cisco-asa",
"forwarded"
]
},
{
"cisco.asa.destination_interface": "inside",
"cisco.asa.message_id": "106100",
"cisco.asa.rule_name": "incoming",
"cisco.asa.source_interface": "dmz2",
"destination.address": "127.3.4.5",
"destination.ip": "127.3.4.5",
"destination.port": 53,
"event.action": "firewall-rule",
"event.category": [
"network"
],
"event.code": 106100,
"event.dataset": "cisco.asa",
"event.kind": "event",
"event.module": "cisco",
"event.original": "%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]",
"event.outcome": "allow",
"event.severity": 6,
"event.timezone": "-02:00",
"event.type": [
"info",
"allowed"
],
"fileset.name": "asa",
"input.type": "log",
"log.level": "informational",
"log.offset": 1334,
"network.iana_number": 17,
"network.transport": "udp",
"related.ip": [
"127.2.3.4",
"127.3.4.5"
],
"service.type": "cisco",
"source.address": "127.2.3.4",
"source.ip": "127.2.3.4",
"source.port": 56575,
"tags": [
"cisco-asa",
"forwarded"
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ processors:
- dissect:
if: "ctx._temp_.cisco.message_id == '106100'"
field: "message"
pattern: "access-list %{_temp_.cisco.list_id} %{event.outcome} %{network.transport} %{_temp_.cisco.source_interface}/%{source.address}(%{source.port}) -> %{_temp_.cisco.destination_interface}/%{destination.address}(%{destination.port}) %{}"
pattern: "access-list %{_temp_.cisco.list_id} %{event.outcome} %{network.transport} %{_temp_.cisco.source_interface}/%{source.address}(%{source.port})%{}-> %{_temp_.cisco.destination_interface}/%{destination.address}(%{destination.port})%{}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we want to add the ECS mapping to the user if we can identify the field as such? As indicated by the docs the thing we were missing is one of the following:

idfw_user— The user identity username, including the domain name that is added to the existing syslog when the ASA can find the username for the IP address.
sg_info— The security group tag that is added to the syslog when the ASA can find a security group tag for the IP address. The security group name is displayed with the security group tag, if available.

If we just want this as a bugfix to not drop the event that's cool too, as I'm not entirely sure how to distinguish idfw_user v. sg_info.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's both issues, didn't want to complicate the parsing even more for a bug fix, and I don't see an easy way of telling user and info apart.

- dissect:
if: "ctx._temp_.cisco.message_id == '106102'"
field: "message"
Expand Down