Skip to content

Commit 67a1fd8

Browse files
committed
cisagov#750, update to zeek v8.0.0
1 parent 31f913d commit 67a1fd8

File tree

6 files changed

+42
-6
lines changed

6 files changed

+42
-6
lines changed

arkime/etc/config.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2572,7 +2572,9 @@ zeek.rdp.encryption_method=db:zeek.rdp.encryption_method;group:zeek_rdp;kind:ter
25722572

25732573
# redis.log
25742574
# https://docs.zeek.org/en/v8.0.0/scripts/base/protocols/redis/main.zeek.html#type-Redis::Info
2575-
zeek.redis.cmd=db:zeek.redis.cmd;group:zeek_redis;kind:termfield;viewerOnly:true;friendly:Command;help:Command
2575+
zeek.redis.cmd_name=db:zeek.redis.cmd_name;group:zeek_redis;kind:termfield;viewerOnly:true;friendly:Command Name;help:Command Name
2576+
zeek.redis.cmd_key=db:zeek.redis.cmd_key;group:zeek_redis;kind:termfield;viewerOnly:true;friendly:Command Key;help:Command Key
2577+
zeek.redis.cmd_value=db:zeek.redis.cmd_value;group:zeek_redis;kind:termfield;viewerOnly:true;friendly:Command Value;help:Command Value
25762578
zeek.redis.success=db:zeek.redis.success;group:zeek_redis;kind:termfield;viewerOnly:true;friendly:Success;help:Success
25772579
zeek.redis.reply=db:zeek.redis.reply;group:zeek_redis;kind:termfield;viewerOnly:true;friendly:Reply;help:Reply
25782580

arkime/wise/source.zeeklogs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2733,7 +2733,9 @@ class MalcolmSource extends WISESource {
27332733
"zeek.rdp.requested_color_depth",
27342734
"zeek.rdp.result",
27352735
"zeek.rdp.security_protocol",
2736-
"zeek.redis.cmd",
2736+
"zeek.redis.cmd_name",
2737+
"zeek.redis.cmd_key",
2738+
"zeek.redis.cmd_value",
27372739
"zeek.redis.success",
27382740
"zeek.redis.reply",
27392741
"zeek.rfb.auth",

dashboards/templates/composable/component/zeek.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,9 +1415,21 @@
14151415
},
14161416
"redis": {
14171417
"properties": {
1418-
"cmd": {
1418+
"cmd_name": {
1419+
"type": "keyword"
1420+
},
1421+
"cmd_key": {
14191422
"type": "keyword"
14201423
},
1424+
"cmd_value": {
1425+
"type": "keyword",
1426+
"ignore_above": 1024,
1427+
"fields": {
1428+
"text": {
1429+
"type": "text"
1430+
}
1431+
}
1432+
},
14211433
"success": {
14221434
"type": "keyword"
14231435
},

docs/protocols.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Malcolm uses [Zeek](https://docs.zeek.org/en/stable/script-reference/proto-analy
3838
|PostgreSQL|[🔗](https://en.wikipedia.org/wiki/PostgreSQL)|[🔗](https://www.postgresql.org/)|[](https://github.com/arkime/arkime/blob/master/capture/parsers/postgresql.c)|[](https://docs.zeek.org/en/master/scripts/base/protocols/postgresql/main.zeek.html)|
3939
|Process Field Net (PROFINET)|[🔗](https://en.wikipedia.org/wiki/PROFINET)|[🔗](https://us.profinet.com/technology/profinet/)||[](https://github.com/amzn/zeek-plugin-profinet/blob/master/scripts/main.zeek)|
4040
|PROFINET IO CM (Input/Output Context Manager)|[🔗](https://wiki.wireshark.org/PROFINET/IO)|[🔗](https://us.profinet.com/technology/profinet/)[🔗](https://webstore.iec.ch/publication/83418)||[](https://github.com/cisagov/icsnpp-profinet-io-cm/blob/main/analyzer/types.zeek)|
41+
|Redis|[🔗](https://en.wikipedia.org/wiki/Redis)|[🔗](https://redis.io/docs/latest/develop/reference/protocol-spec/)||[](https://docs.zeek.org/en/current/scripts/base/protocols/redis/main.zeek.html#type-Redis::Info)|
4142
|Remote Authentication Dial-In User Service (RADIUS)|[🔗](https://en.wikipedia.org/wiki/RADIUS)|[🔗](https://tools.ietf.org/html/rfc2865)|[](https://github.com/arkime/arkime/blob/master/capture/parsers/radius.c)|[](https://docs.zeek.org/en/stable/scripts/base/protocols/radius/main.zeek.html#type-RADIUS::Info)|
4243
|Remote Desktop Protocol (RDP)|[🔗](https://en.wikipedia.org/wiki/Remote_Desktop_Protocol)|[🔗](https://docs.microsoft.com/en-us/windows/win32/termserv/remote-desktop-protocol?redirectedfrom=MSDN)||[](https://docs.zeek.org/en/stable/scripts/base/protocols/rdp/main.zeek.html#type-RDP::Info)|
4344
|Remote Framebuffer (RFB)|[🔗](https://en.wikipedia.org/wiki/RFB_protocol)|[🔗](https://tools.ietf.org/html/rfc6143)||[](https://docs.zeek.org/en/stable/scripts/base/protocols/rfb/main.zeek.html#type-RFB::Info)|

logstash/pipelines/zeek/1173_zeek_redis.conf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ filter {
88
#############################################################################################################################
99
# redis.log
1010
# https://docs.zeek.org/en/current/scripts/base/protocols/redis/main.zeek.html#type-Redis::Info
11-
1211
if ("_jsonparsesuccess" not in [tags]) {
1312
dissect {
1413
id => "dissect_zeek_redis"
1514
mapping => {
16-
"[message]" => "%{[zeek_cols][ts]} %{[zeek_cols][uid]} %{[zeek_cols][orig_h]} %{[zeek_cols][orig_p]} %{[zeek_cols][resp_h]} %{[zeek_cols][resp_p]} %{[zeek_cols][cmd]} %{[zeek_cols][success]} %{[zeek_cols][reply]}"
15+
"[message]" => "%{[zeek_cols][ts]} %{[zeek_cols][uid]} %{[zeek_cols][orig_h]} %{[zeek_cols][orig_p]} %{[zeek_cols][resp_h]} %{[zeek_cols][resp_p]} %{[zeek_cols][cmd_name]} %{[zeek_cols][cmd_key]} %{[zeek_cols][cmd_value]} %{[zeek_cols][success]} %{[zeek_cols][reply]}"
1716
}
1817
}
1918
if ("_dissectfailure" in [tags]) {
@@ -23,7 +22,7 @@ filter {
2322
}
2423
ruby {
2524
id => "ruby_zip_zeek_redis"
26-
init => "@zeek_redis_field_names = [ 'ts', 'uid', 'orig_h', 'orig_p', 'resp_h', 'resp_p', 'cmd', 'success', 'reply' ]"
25+
init => "@zeek_redis_field_names = [ 'ts', 'uid', 'orig_h', 'orig_p', 'resp_h', 'resp_p', 'cmd_name', 'cmd_key', 'cmd_value', 'success', 'reply' ]"
2726
code => "event.set('[zeek_cols]', @zeek_redis_field_names.zip(event.get('[message]')).to_h)"
2827
}
2928
}

logstash/pipelines/zeek/1300_zeek_normalize.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,9 @@ filter {
670670
if ([zeek][profinet_io_cm][operation]) { mutate { id => "mutate_merge_normalize_zeek_profinet_io_cm_operation"
671671
merge => { "[event][action]" => "[zeek][profinet_io_cm][operation]" } } }
672672

673+
if ([zeek][redis][cmd_name]) { mutate { id => "mutate_merge_normalize_zeek_redis_cmd_name_action"
674+
merge => { "[event][action]" => "[zeek][redis][cmd_name]" } } }
675+
673676
if ([zeek][rfb][auth]) and ([zeek][rfb][authentication_method]) {
674677
# if authentication was attempted, assign an "authenticate" action
675678
mutate { id => "mutate_add_field_zeek_rfb_auth_action"
@@ -1301,6 +1304,23 @@ filter {
13011304
if ([zeek][rdp][result]) { mutate { id => "mutate_merge_normalize_zeek_rdp_result"
13021305
merge => { "[event][result]" => "[zeek][rdp][result]" } } }
13031306

1307+
1308+
if ([zeek][redis]) {
1309+
# result populated from success and reply
1310+
if ([zeek][redis][success] == 'T') {
1311+
mutate { id => "mutate_add_field_zeek_zeek_redis_success"
1312+
add_field => { "[@metadata][zeek_redis_result]" => "Success" } }
1313+
} else if ([zeek][redis][reply]) {
1314+
mutate { id => "mutate_add_field_zeek_zeek_redis_reply"
1315+
add_field => { "[@metadata][zeek_redis_result]" => "%{[zeek][redis][reply]}" } }
1316+
} else {
1317+
mutate { id => "mutate_add_field_zeek_zeek_redis_failure"
1318+
add_field => { "[@metadata][zeek_redis_result]" => "Failure" } }
1319+
}
1320+
mutate { id => "mutate_merge_zeek_redis_result"
1321+
merge => { "[event][result]" => "[@metadata][zeek_redis_result]" } }
1322+
}
1323+
13041324
if ([zeek][roc_plus][error_code]) { mutate { id => "mutate_merge_normalize_roc_plus_error_code_result"
13051325
merge => { "[event][result]" => "[zeek][roc_plus][error_code]" } } }
13061326

0 commit comments

Comments
 (0)