Skip to content

Commit 3028bd3

Browse files
author
netevert
committed
Merge branch 'junk'
2 parents 72565e6 + 55eaba0 commit 3028bd3

29 files changed

+4769
-4583
lines changed

hunting/workbooks/attack_drilldown.json

+1,416-1,401
Large diffs are not rendered by default.

hunting/workbooks/computer_drilldown.json

+39-20
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"description": "Selects the time range for the drilldown",
2323
"isRequired": true,
2424
"value": {
25-
"durationMs": 86400000
25+
"durationMs": 5184000000
2626
},
2727
"typeSettings": {
2828
"selectableValues": [
@@ -88,6 +88,10 @@
8888
"typeSettings": {
8989
"additionalResourceOptions": []
9090
},
91+
"timeContext": {
92+
"durationMs": 0
93+
},
94+
"timeContextFromParameter": "time_range",
9195
"queryType": 0,
9296
"resourceType": "microsoft.operationalinsights/workspaces"
9397
}
@@ -102,7 +106,7 @@
102106
"type": 3,
103107
"content": {
104108
"version": "KqlItem/1.0",
105-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where isnotempty(technique_name)\r\n| summarize count() by technique_name, bin(TimeGenerated, 1h)",
109+
"query": "let process_path_create_whitelist = process_create_whitelist | project process_path;\r\nlet process_path_access_whitelist = process_access_whitelist | project process_path;\r\nlet process_path_dns_whitelist = dns_whitelist | project process_path;\r\nlet process_path_file_create_whitelist = file_create_whitelist | project process_path;\r\nlet process_path_image_load_whitelist = image_load_whitelist | project process_path;\r\nlet process_path_network_whitelist = network_whitelist | project process_path;\r\nlet process_path_pipe_whitelist = pipe_whitelist | project process_path;\r\nlet process_path_registry_whitelist = registry_whitelist | project process_path;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (process_path_create_whitelist) and process_path !in~ (process_path_access_whitelist) and process_path !in~ (process_path_dns_whitelist) and process_path !in~ (process_path_file_create_whitelist) and process_path !in~ (process_path_image_load_whitelist) and process_path !in~ (process_path_network_whitelist) and process_path !in~ (process_path_pipe_whitelist) and process_path !in~ (process_path_registry_whitelist)\r\n| summarize count() by technique_name, bin(TimeGenerated, 1h)",
106110
"size": 0,
107111
"title": "Activity by technique",
108112
"timeContext": {
@@ -122,10 +126,11 @@
122126
"type": 3,
123127
"content": {
124128
"version": "KqlItem/1.0",
125-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 1\r\n| where isnotempty(technique_name)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, user_name, process_parent_path, process_path, file_name, process_parent_command_line, process_command_line, process_parent_guid, process_guid, hash_sha256, process_id, process_parent_id",
129+
"query": "let process_ppath_whitelist = process_create_whitelist | project process_parent_path;\r\nlet process_path_whitelist = process_create_whitelist | project process_path;\r\nlet command_line_whitelist = process_create_whitelist | project replace(\"'\", \"\", replace('\"', '', process_command_line));\r\nlet hash_whitelist = process_create_whitelist | project hash_sha256;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 1\r\n| where isnotempty(technique_name)\r\n| where process_parent_path !in~ (process_ppath_whitelist) and process_path !in~ (process_path_whitelist) and replace('\"', '', tostring(process_command_line)) !in~ (command_line_whitelist) and hash_sha256 !in~ (hash_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, user_name, process_parent_path, process_path, file_name, process_parent_command_line, process_command_line, process_parent_guid, process_guid, hash_sha256, process_id, process_parent_id",
126130
"size": 0,
127131
"showAnalytics": true,
128-
"title": "Process create",
132+
"title": "Process create (not whitelisted)",
133+
"noDataMessage": "No process create activity matching ATT&CK techniques for host",
129134
"timeContext": {
130135
"durationMs": 0
131136
},
@@ -336,7 +341,7 @@
336341
}
337342
]
338343
},
339-
"name": "query - 2",
344+
"name": "process-create-query",
340345
"styleSettings": {
341346
"progressStyle": "loader"
342347
}
@@ -345,10 +350,11 @@
345350
"type": 3,
346351
"content": {
347352
"version": "KqlItem/1.0",
348-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 10\r\n| where isnotempty(technique_name)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, target_process_path, process_granted_access, target_process_guid, process_id, target_process_id",
353+
"query": "let process_path_whitelist = process_access_whitelist | project process_path;\r\nlet target_process_path_whitelist = process_access_whitelist | project target_process_path;\r\nlet process_granted_access_whitelist = process_access_whitelist | project process_granted_access;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 10\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (process_path_whitelist) and target_process_path !in~ (target_process_path_whitelist) and process_granted_access !in~ (process_granted_access_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, target_process_path, process_granted_access, target_process_guid, process_id, target_process_id",
349354
"size": 0,
350355
"showAnalytics": true,
351-
"title": "Process access",
356+
"title": "Process access (not whitelisted)",
357+
"noDataMessage": "No process access activity matching ATT&CK techniques for host",
352358
"timeContext": {
353359
"durationMs": 0
354360
},
@@ -494,10 +500,11 @@
494500
"type": 3,
495501
"content": {
496502
"version": "KqlItem/1.0",
497-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 11\r\n| where isnotempty(technique_name)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, file_name, process_guid, process_id",
503+
"query": "let file_name_whitelist = file_create_whitelist | project file_name;\r\nlet file_path_whitelist = file_create_whitelist | project file_path;\r\nlet proc_path_whitelist = file_create_whitelist | project process_path;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 11\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (proc_path_whitelist) and file_name !in~ (file_name_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, file_name, process_guid, process_id",
498504
"size": 0,
499505
"showAnalytics": true,
500-
"title": "File created",
506+
"title": "File created (not whitelisted)",
507+
"noDataMessage": "No file create activity matching ATT&CK techniques for host",
501508
"timeContext": {
502509
"durationMs": 0
503510
},
@@ -612,7 +619,7 @@
612619
]
613620
}
614621
},
615-
"name": "File-created-query",
622+
"name": "file-created-query",
616623
"styleSettings": {
617624
"progressStyle": "loader"
618625
}
@@ -621,10 +628,11 @@
621628
"type": 3,
622629
"content": {
623630
"version": "KqlItem/1.0",
624-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 7\r\n| where isnotempty(technique_name)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, module_loaded, module_is_signed, module_signature, module_signature_status, process_id, process_guid",
631+
"query": "let process_path__whitelist = image_load_whitelist | project process_path;\r\nlet driver_loaded_whitelist = image_load_whitelist | project driver_loaded;\r\nlet driver_signed_whitelist = image_load_whitelist | project driver_is_signed;\r\nlet drv_signature_whitelist = image_load_whitelist | project driver_signature;\r\nlet signat_status_whitelist = image_load_whitelist | project driver_signature_status;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 7\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (process_path__whitelist) and module_loaded !in~ (driver_loaded_whitelist) and module_is_signed !in~ (driver_signed_whitelist) and module_signature !in~ (drv_signature_whitelist) and module_signature_status !in~ (signat_status_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, module_loaded, module_is_signed, module_signature, module_signature_status, process_id, process_guid",
625632
"size": 0,
626633
"showAnalytics": true,
627-
"title": "Image loaded",
634+
"title": "Image loaded (not whitelisted)",
635+
"noDataMessage": "No image loaded activity matching ATT&CK techniques for host",
628636
"timeContext": {
629637
"durationMs": 0
630638
},
@@ -782,10 +790,11 @@
782790
"type": 3,
783791
"content": {
784792
"version": "KqlItem/1.0",
785-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 3\r\n| where isnotempty(technique_name)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, user_name, process_path, process_id, process_guid, src_ip, dst_ip, dst_port, src_host_name, dst_host_name",
793+
"query": "let process_path_whitelist = network_whitelist | project process_path;\r\nlet src_ip_whitelist = network_whitelist | project src_ip;\r\nlet dst_ip_whitelist = network_whitelist | project dst_ip;\r\nlet dst_port_whitelist = network_whitelist | project dst_port;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 3\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (process_path_whitelist) and src_ip !in~ (src_ip_whitelist) and dst_ip !in~ (dst_ip_whitelist) and dst_port !in~ (dst_port_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, user_name, process_path, process_id, process_guid, src_ip, dst_ip, dst_port, src_host_name, dst_host_name",
786794
"size": 0,
787795
"showAnalytics": true,
788-
"title": "Network connections",
796+
"title": "Network connections (not whitelisted)",
797+
"noDataMessage": "No network connection activity matching ATT&CK techniques for host",
789798
"timeContext": {
790799
"durationMs": 0
791800
},
@@ -964,10 +973,11 @@
964973
"type": 3,
965974
"content": {
966975
"version": "KqlItem/1.0",
967-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 12\r\n| where isnotempty(technique_name)| project TimeGenerated, technique_id, technique_name, phase_name, EventType, Computer, process_path, process_id, process_guid, registry_key_path",
976+
"query": "let event_type_whitelist = registry_whitelist | project event_type;\r\nlet process_path_whitelist = registry_whitelist | project process_path;\r\nlet registry_key_path_whitelist = registry_whitelist | project registry_key_path;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 12\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (process_path_whitelist) and EventType !in~ (event_type_whitelist) and registry_key_path !in~ (registry_key_path_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, EventType, Computer, process_path, process_id, process_guid, registry_key_path",
968977
"size": 0,
969978
"showAnalytics": true,
970-
"title": "Registry access",
979+
"title": "Registry access (not whitelisted)",
980+
"noDataMessage": "No registry access activity matching ATT&CK techniques for host",
971981
"timeContext": {
972982
"durationMs": 0
973983
},
@@ -1102,10 +1112,11 @@
11021112
"type": 3,
11031113
"content": {
11041114
"version": "KqlItem/1.0",
1105-
"query": "Sysmon\r\n| where EventID == 17\r\n| where Computer contains \"{host}\"\r\n| where isnotempty(technique_name)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, pipe_name, process_path, process_guid, process_id",
1115+
"query": "let process_path_whitelist = pipe_whitelist | project process_path;\r\nlet pipe_name_whitelist = pipe_whitelist | project pipe_name;\r\nSysmon\r\n| where EventID == 17\r\n| where Computer contains \"{host}\"\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (process_path_whitelist) and pipe_name !in~ (pipe_name_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, pipe_name, process_path, process_guid, process_id",
11061116
"size": 0,
11071117
"showAnalytics": true,
1108-
"title": "Pipes",
1118+
"title": "Pipes (not whitelisted)",
1119+
"noDataMessage": "No pipe create and connect activity matching ATT&CK techniques for host",
11091120
"timeContext": {
11101121
"durationMs": 0
11111122
},
@@ -1229,10 +1240,11 @@
12291240
"type": 3,
12301241
"content": {
12311242
"version": "KqlItem/1.0",
1232-
"query": "Sysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 22\r\n| where isnotempty(technique_name)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, dns_query_name, dns_query_status, dns_query_results, process_guid",
1243+
"query": "let host_whitelist = dns_whitelist | project host;\r\nlet process_whitelist = dns_whitelist | project process_path;\r\nlet query_whitelist = dns_whitelist | project query_name;\r\nSysmon\r\n| where Computer contains \"{host}\"\r\n| where EventID == 22\r\n| where isnotempty(technique_name)\r\n| where process_path !in~ (process_whitelist) and dns_query_name !in~ (query_whitelist)\r\n| project TimeGenerated, technique_id, technique_name, phase_name, Computer, process_path, dns_query_name, dns_query_status, dns_query_results, process_guid",
12331244
"size": 0,
12341245
"showAnalytics": true,
1235-
"title": "DNS queries",
1246+
"title": "DNS queries (not whitelisted)",
1247+
"noDataMessage": "No DNS activity matching ATT&CK techniques for host",
12361248
"timeContext": {
12371249
"durationMs": 0
12381250
},
@@ -1459,6 +1471,13 @@
14591471
"styleSettings": {
14601472
"progressStyle": "loader"
14611473
}
1474+
},
1475+
{
1476+
"type": 1,
1477+
"content": {
1478+
"json": "---\r\nComputer drilldown v.1.3.0, built by **Edoardo Gerosa**"
1479+
},
1480+
"name": "text - 12"
14621481
}
14631482
],
14641483
"fromTemplateId": "sentinel-UserWorkbook",

0 commit comments

Comments
 (0)