Skip to content

Commit ae628a3

Browse files
Sync with spreadsheet
1 parent 39f5a79 commit ae628a3

File tree

3 files changed

+61
-51
lines changed

3 files changed

+61
-51
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@
562562
"timezone": "UTC",
563563
"type": [
564564
"connection",
565-
"start"
565+
"end"
566566
]
567567
},
568568
"host": {
@@ -4532,6 +4532,7 @@
45324532
"code": "502103",
45334533
"kind": "event",
45344534
"original": "Apr 27 02:03:03 dev01: %ASA-5-502103: User priv level changed: Uname: enable_15 From: 1 To: 15",
4535+
"outcome": "success",
45354536
"severity": 5,
45364537
"timezone": "UTC",
45374538
"type": [
@@ -5700,7 +5701,7 @@
57005701
"version": "8.11.0"
57015702
},
57025703
"event": {
5703-
"action": "deleted",
5704+
"action": "sa-deleted",
57045705
"category": [
57055706
"network"
57065707
],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6655,7 +6655,7 @@
66556655
"version": "8.11.0"
66566656
},
66576657
"event": {
6658-
"action": "deleted",
6658+
"action": "sa-deleted",
66596659
"category": [
66606660
"network"
66616661
],

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

Lines changed: 57 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,17 +2107,62 @@ processors:
21072107
target_field: cisco.asa.rule_name
21082108
ignore_missing: true
21092109
# ECS categorization
2110+
- script:
2111+
tag: script_ecs_outcome_categorization
2112+
lang: painless
2113+
description: >-
2114+
Sets the ECS event categorization fields for given message type and outcome.
2115+
The top-level keys are the Cisco message IDs, which will match against
2116+
'event.code' in the document. The next level of keys are outcome values,
2117+
which match against '_temp_.outcome' in the document. The final level of
2118+
keys are ECS event fields.
2119+
params:
2120+
"106100":
2121+
denied:
2122+
type: [ connection, denied ]
2123+
outcome: success
2124+
action: firewall-rule
2125+
permitted:
2126+
type: [ connection, allowed ]
2127+
outcome: success
2128+
action: firewall-rule
2129+
est-allowed:
2130+
type: [ connection, allowed ]
2131+
outcome: success
2132+
action: firewall-rule
2133+
"106102":
2134+
denied:
2135+
type: [ connection, denied ]
2136+
outcome: success
2137+
action: firewall-rule
2138+
permitted:
2139+
type: [ connection, allowed ]
2140+
outcome: success
2141+
action: firewall-rule
2142+
"111004":
2143+
failed:
2144+
category: [ configuration ]
2145+
type: [ info ]
2146+
outcome: failure
2147+
action: configuration
2148+
ok:
2149+
category: [ configuration ]
2150+
type: [ change ]
2151+
outcome: success
2152+
action: configuration
2153+
source: >-
2154+
if (ctx.event.code == null || !params.containsKey(ctx.event.code) || ctx._temp_?.outcome == null) {
2155+
return;
2156+
}
2157+
params.get(ctx.event.code).get(ctx._temp_.outcome).forEach((k, v) -> ctx.event[k] = v);
2158+
21102159
- script:
21112160
tag: script_ecs_categorization
21122161
lang: painless
21132162
description: >-
2114-
This script will set the ECS event categorization fields for each
2115-
message type. If a message wrote to _temp_.outcome, the value of this
2116-
field will be used to conditionally set the ECS event fields.
2117-
The top-level keys are the Cisco message IDs. The next level of keys are
2118-
either the ECS event fields or in the case of _temp_.outcome being set,
2119-
the possible values of _temp_.outcome. In the latter case, the keys
2120-
contained within will be the ECS event fields.
2163+
This script will set the ECS event categorization fields for a given
2164+
message type. The top-level keys are the Cisco message IDs. The next
2165+
level of keys are ECS event fields.
21212166
params:
21222167
"106001":
21232168
type: [ connection, denied ]
@@ -2183,28 +2228,6 @@ processors:
21832228
type: [ connection, denied ]
21842229
outcome: success
21852230
action: firewall-rule
2186-
"106100":
2187-
denied:
2188-
type: [ connection, denied ]
2189-
outcome: success
2190-
action: firewall-rule
2191-
permitted:
2192-
type: [ connection, allowed ]
2193-
outcome: success
2194-
action: firewall-rule
2195-
est-allowed:
2196-
type: [ connection, allowed ]
2197-
outcome: success
2198-
action: firewall-rule
2199-
"106102":
2200-
denied:
2201-
type: [ connection, denied ]
2202-
outcome: success
2203-
action: firewall-rule
2204-
permitted:
2205-
type: [ connection, allowed ]
2206-
outcome: success
2207-
action: firewall-rule
22082231
"106103":
22092232
type: [ connection, denied ]
22102233
outcome: success
@@ -2213,17 +2236,6 @@ processors:
22132236
type: [ connection, info ]
22142237
outcome: failure
22152238
action: firewall-rule
2216-
"111004":
2217-
failed:
2218-
category: [ configuration ]
2219-
type: [ info ]
2220-
outcome: failure
2221-
action: configuration
2222-
ok:
2223-
category: [ configuration ]
2224-
type: [ change ]
2225-
outcome: success
2226-
action: configuration
22272239
"111009":
22282240
category: [ configuration ]
22292241
type: [ info ]
@@ -2493,18 +2505,19 @@ processors:
24932505
"502103":
24942506
category: [ iam ]
24952507
type: [ user, change ]
2508+
outcome: success
24962509
action: privilege-level-changed
24972510
"507003":
24982511
type: [ connection, end ]
24992512
action: flow-termination
25002513
"602303":
25012514
type: [ connection, start ]
2502-
action: sa-created
25032515
outcome: success
2516+
action: sa-created
25042517
"602304":
25052518
type: [ connection, end ]
25062519
outcome: success
2507-
action: deleted
2520+
action: sa-deleted
25082521
"605004":
25092522
category: [ authentication, network ]
25102523
type: [ denied, info ]
@@ -2623,18 +2636,14 @@ processors:
26232636
outcome: success
26242637
action: flow-offload-started
26252638
"805002":
2626-
type: [ connection, start ]
2639+
type: [ connection, end ]
26272640
outcome: success
26282641
action: flow-offload-ended
26292642
source: >-
26302643
if (ctx.event.code == null || !params.containsKey(ctx.event.code)) {
26312644
return;
26322645
}
2633-
if (ctx._temp_?.outcome == null) {
2634-
params.get(ctx.event.code).forEach((k, v) -> ctx.event[k] = v);
2635-
} else {
2636-
params.get(ctx.event.code).get(ctx._temp_.outcome).forEach((k, v) -> ctx.event[k] = v);
2637-
}
2646+
params.get(ctx.event.code).forEach((k, v) -> ctx.event[k] = v);
26382647
26392648
# Malware event kind is classified as alert when sha_disposition is "Malware", "Custom Detection" not for other cases.
26402649
- set:

0 commit comments

Comments
 (0)