Skip to content

Commit f16d54c

Browse files
committed
remove hunting drilldowns and fixing others
1 parent 908acf4 commit f16d54c

7 files changed

+33
-58
lines changed

detections/endpoint/windows_powershell_invoke_sqlcmd_execution.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ references:
110110
- https://learn.microsoft.com/en-us/powershell/module/sqlserver/invoke-sqlcmd
111111
- https://attack.mitre.org/techniques/T1059.001/
112112
- https://attack.mitre.org/techniques/T1059.003/
113-
drilldown_searches:
114-
- name: View process details for suspicious Invoke-Sqlcmd execution
115-
search: '%original_detection_search% | search dest="$dest$" user="$user$"'
116-
earliest_offset: $info_min_time$
117-
latest_offset: $info_max_time$
118-
- name: View risk events for the last 7 days for - "$dest$" and "$user$"
119-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$", "$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
120-
earliest_offset: $info_min_time$
121-
latest_offset: $info_max_time$
122113
tags:
123114
analytic_story:
124115
- SQL Server Abuse

detections/endpoint/windows_sql_server_configuration_option_hunt.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@ references:
3131
- https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/server-configuration-options-sql-server
3232
- https://attack.mitre.org/techniques/T1505/001/
3333
- https://www.netspi.com/blog/technical/network-penetration-testing/sql-server-persistence-part-1-startup-stored-procedures/
34-
drilldown_searches:
35-
- name: View configuration changes on this host
36-
search: '%original_detection_search% | search dest="$dest$"'
37-
earliest_offset: $info_min_time$
38-
latest_offset: $info_max_time$
39-
- name: View all SQL Server configuration changes in the last 7 days
40-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
41-
earliest_offset: -7d
42-
latest_offset: now
4334
tags:
4435
analytic_story:
4536
- SQL Server Abuse

detections/endpoint/windows_sql_server_critical_procedures_enabled.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,19 @@ references:
3636
- https://www.netspi.com/blog/technical/network-penetration-testing/enumerating-domain-accounts-via-sql-server-using-adsi/
3737
- https://attack.mitre.org/techniques/T1505/001/
3838
drilldown_searches:
39-
- name: View critical procedure configuration changes on this host
40-
search: '%original_detection_search% | search host="$dest$"'
39+
- name: View the detection results for - "$dest$"
40+
search: '%original_detection_search% | search dest = "$dest$"'
41+
earliest_offset: $info_min_time$
42+
latest_offset: $info_max_time$
43+
- name: View risk events for the last 7 days for - "$dest$"
44+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
45+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
46+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
47+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
48+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
49+
| `security_content_ctime(lastTime)`'
4150
earliest_offset: $info_min_time$
4251
latest_offset: $info_max_time$
43-
- name: View all SQL Server configuration changes on this host in the last 7 days
44-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
45-
earliest_offset: -7d
46-
latest_offset: now
4752
rba:
4853
message: SQL Server critical procedure "$config_name$" was $change_type$ on host $dest$, which could indicate an attempt to gain code execution or perform reconnaissance
4954
risk_objects:

detections/endpoint/windows_sql_server_extended_procedure_dll_loading_hunt.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ references:
2828
- https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/general-extended-stored-procedures-transact-sql
2929
- https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms175543(v=sql.105)
3030
- https://learn.microsoft.com/en-us/sql/relational-databases/extended-stored-procedures-programming/using-extended-stored-procedures
31-
drilldown_searches:
32-
- name: View DLL loading details for this host
33-
search: '%original_detection_search% | search host="$dest$"'
34-
earliest_offset: $info_min_time$
35-
latest_offset: $info_max_time$
36-
- name: View all SQL Server DLL loads on this host in the last 7 days
37-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
38-
earliest_offset: -7d
39-
latest_offset: now
4031
tags:
4132
analytic_story:
4233
- SQL Server Abuse

detections/endpoint/windows_sql_server_startup_procedure.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,19 @@ references:
2626
- https://www.netspi.com/blog/technical-blog/network-penetration-testing/sql-server-persistence-part-1-startup-stored-procedures/
2727
- https://attack.mitre.org/techniques/T1505/001/
2828
drilldown_searches:
29-
- name: View startup procedure executions on this host
30-
search: '%original_detection_search% | search host="$dest$"'
29+
- name: View the detection results for - "$dest$"
30+
search: '%original_detection_search% | search dest = "$dest$"'
31+
earliest_offset: $info_min_time$
32+
latest_offset: $info_max_time$
33+
- name: View risk events for the last 7 days for - "$dest$"
34+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
35+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
36+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
37+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
38+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
39+
| `security_content_ctime(lastTime)`'
3140
earliest_offset: $info_min_time$
3241
latest_offset: $info_max_time$
33-
- name: View all SQL Server events on this host in the last 7 days
34-
search: '`wineventlog_application` source="WinEventLog:Application" EventCode=17* dest="$dest$" | stats count values(Message) as Messages by _time dest EventCode'
35-
earliest_offset: -7d
36-
latest_offset: now
3742
rba:
3843
message: A SQL Server startup procedure "$startup_procedure$" was executed on host $dest$, which could indicate an attempt to establish persistence
3944
risk_objects:

detections/endpoint/windows_sql_server_xp_cmdshell_config_change.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,23 @@ references:
3333
- https://attack.mitre.org/techniques/T1505/003/
3434
- https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/xp-cmdshell-server-configuration-option
3535
drilldown_searches:
36-
- name: View xp_cmdshell configuration changes on this host
37-
search: '%original_detection_search% | search host="$dest$"'
36+
- name: View the detection results for - "$dest$"
37+
search: '%original_detection_search% | search dest = "$dest$"'
38+
earliest_offset: $info_min_time$
39+
latest_offset: $info_max_time$
40+
- name: View risk events for the last 7 days for - "$dest$"
41+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
42+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
43+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
44+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
45+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
46+
| `security_content_ctime(lastTime)`'
3847
earliest_offset: $info_min_time$
3948
latest_offset: $info_max_time$
4049
- name: View all SQL Server configuration changes on this host in the last 7 days
4150
search: '`wineventlog_application` EventCode=15457 host="$dest$" | rex field=EventData_Xml "<Data>(?<config_name>[^<]+)</Data><Data>(?<new_value>[^<]+)</Data><Data>(?<old_value>[^<]+)</Data>" | stats count values(config_name) as "Changed Settings" values(new_value) as "New Values" by _time dest'
4251
earliest_offset: -7d
4352
latest_offset: now
44-
- name: View all high-risk events for this host
45-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object="$dest$" starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(risk_score) as "Risk Score" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
46-
earliest_offset: -7d
47-
latest_offset: now
4853
rba:
4954
message: SQL Server xp_cmdshell configuration was $change_type$ on host $dest$, which could indicate an attempt to gain operating system command execution capabilities
5055
risk_objects:

detections/endpoint/windows_sqlcmd_execution.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -177,19 +177,6 @@ references:
177177
- https://attack.mitre.org/techniques/T1213/
178178
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1105/T1105.md#atomic-test-32---file-download-with-sqlcmdexe
179179
- https://unit42.paloaltonetworks.com/espionage-campaign-targets-south-asian-entities/
180-
drilldown_searches:
181-
- name: View process details for suspicious SQLCMD execution
182-
search: '%original_detection_search% | search dest="$dest$" user="$user$"'
183-
earliest_offset: $info_min_time$
184-
latest_offset: $info_max_time$
185-
- name: View all SQLCMD activity for this host in the last 7 days
186-
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_sqlcmd` by Processes.dest Processes.user Processes.process Processes.parent_process_name | search dest="$dest$" | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
187-
earliest_offset: -7d
188-
latest_offset: now
189-
- name: View all high-risk events for this host/user
190-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$", "$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(risk_score) as "Risk Score" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
191-
earliest_offset: -7d
192-
latest_offset: now
193180
tags:
194181
analytic_story:
195182
- SQL Server Abuse

0 commit comments

Comments
 (0)