Skip to content

Commit 0d36a4e

Browse files
committed
update 048839e4-1eaa-43ff-8a22-86d17f6fcc13
1 parent be154a1 commit 0d36a4e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

detections/endpoint/windows_command_shell_fetch_env_variables.yml renamed to detections/endpoint/windows_list_env_variables_via_set_command_from_uncommon_parent.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: Windows Command Shell Fetch Env Variables
1+
name: Windows List ENV Variables Via SET Command From Uncommon Parent
22
id: 048839e4-1eaa-43ff-8a22-86d17f6fcc13
3-
version: 3
4-
date: '2024-09-30'
3+
version: 4
4+
date: '2025-01-17'
55
author: Teoderick Contreras, Splunk
66
status: production
7-
type: TTP
8-
description: The following analytic identifies a suspicious process command line fetching environment variables with a non-shell parent process. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on command-line executions and parent process names. This activity is significant as it is commonly associated with malware like Qakbot, which uses this technique to gather system information. If confirmed malicious, this behavior could indicate that the parent process has been compromised, potentially allowing attackers to execute arbitrary commands, escalate privileges, or persist within the environment.
7+
type: Anomaly
8+
description: The following analytic identifies a suspicious process command line fetching environment variables using the cmd.exe "set" command, with a non-shell parent process. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on command-line executions and parent process names. This activity could be significant as it is commonly associated with malware like Qakbot, which uses this technique to gather system information. If confirmed malicious, this behavior could indicate that the parent process has been compromised, potentially allowing attackers to execute arbitrary commands, escalate privileges, or persist within the environment.
99
data_source:
1010
- Sysmon EventID 1
1111
- Windows Event Log Security 4688
1212
- CrowdStrike ProcessRollup2
13-
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = "*cmd /c set" OR Processes.process = "*cmd.exe /c set" AND NOT (Processes.parent_process_name = "cmd.exe" OR Processes.parent_process_name = "powershell*" OR Processes.parent_process_name="pwsh.exe" OR Processes.parent_process_name = "explorer.exe") by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_command_shell_fetch_env_variables_filter`'
13+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name="cmd.exe" Processes.process IN ("*/c set", "*/c \"set") AND NOT Processes.parent_process_name IN ("cmd.exe", "explorer.exe", "powershell*" "pwsh.exe") by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_list_env_variables_via_set_command_from_uncommon_parent_filter`'
1414
how_to_implement: The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.
15-
known_false_positives: shell process that are not included in this search may cause False positive. Filter is needed.
15+
known_false_positives: shell process that are not included in this search may cause False positive. Filter as needed.
1616
references:
1717
- https://twitter.com/pr0xylife/status/1585612370441031680?s=46&t=Dc3CJi4AnM-8rNoacLbScg
1818
drilldown_searches:
@@ -28,9 +28,9 @@ tags:
2828
analytic_story:
2929
- Qakbot
3030
asset_type: Endpoint
31-
confidence: 70
32-
impact: 80
33-
message: non-shell parent process has a child process $process_name$ with a commandline $process$ to fetch env variables in $dest$
31+
confidence: 50
32+
impact: 50
33+
message: $parent_process_name$ Spawned $process_name$ with a commandline $process$ in $dest$
3434
mitre_attack_id:
3535
- T1055
3636
observable:
@@ -55,7 +55,7 @@ tags:
5555
- Processes.parent_process_path
5656
- Processes.process_path
5757
- Processes.parent_process_id
58-
risk_score: 56
58+
risk_score: 25
5959
security_domain: endpoint
6060
tests:
6161
- name: True Positive Test

0 commit comments

Comments
 (0)