| ID | Technique | Tactic |
|---|---|---|
| T1685 | Disable or Modify Tools | Defense Impairment |
Detection: Windows User Profile Binary Terminating Process Via Taskkill
Description
The following analytic detects taskkill.exe being launched with a process ID (/pid) argument by an executable that resides directly within a user profile folder, such as the Downloads or Desktop folder. Filtering for parent processes located two to three directory levels deep under root folder. This activity is significant because browser hijackers and adware droppers executed from the Downloads folder forcefully terminate the running browser by PID so that they can modify its profile and relaunch it with their own settings. If confirmed malicious, this could allow an attacker to tamper with browser preference files, side-load extensions and redirect the victim's browsing traffic.
Search
1
2| tstats `security_content_summariesonly`
3 count min(_time) as firstTime
4 max(_time) as lastTime
5
6from datamodel=Endpoint.Processes where
7
8(
9 Processes.process_name=taskkill.exe
10 OR
11 Processes.original_file_name=taskkill.exe
12)
13Processes.process IN ("* /pid *", "* -pid *")
14Processes.parent_process_path="*:\\Users\\*"
15
16by Processes.action Processes.dest Processes.original_file_name Processes.parent_process
17 Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
18 Processes.parent_process_name Processes.parent_process_path Processes.process Processes.process_exec
19 Processes.process_guid Processes.process_hash Processes.process_id Processes.process_integrity_level
20 Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product
21
22
23| `drop_dm_object_name(Processes)`
24
25| regex parent_process_path="(?i)^\\w+\\:\\\\(?:[^\\\\\\/\\x27\\x22]+\\\\){2,3}[^\\\\\\/\\x27\\x22]+\\.exe$"
26
27| `security_content_ctime(firstTime)`
28
29| `security_content_ctime(lastTime)`
30
31| `windows_user_profile_binary_terminating_process_via_taskkill_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Sysmon EventID 1 | 'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
|
| Windows Event Log Security 4688 | 'XmlWinEventLog' |
'XmlWinEventLog:Security' |
|
| CrowdStrike ProcessRollup2 | Other | 'crowdstrike:events:sensor' |
'crowdstrike' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| windows_user_profile_binary_terminating_process_via_taskkill_filter | search * |
windows_user_profile_binary_terminating_process_via_taskkill_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | Yes |
| Rule Title | %name% |
| Rule Description | %description% |
| Notable Event Fields | user, dest |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
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.
Known False Positives
Portable applications, installers and updaters executed from a user's Downloads or Desktop folder may legitimately use taskkill.exe to close a running instance of themselves or another application. Filter as needed based on the parent process name or path.
Associated Analytic Story
Finding
| Title | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| The user profile binary [$parent_process_path$] terminated a process via [$process$] on [$dest$]. | dest | system | 50 |
Threat Objects
| Field | Type |
|---|---|
| process | process |
| parent_process_path | parent_process_path |
References
-
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/taskkill
-
https://www.gdatasoftware.com/blog/2025/11/38298-learning-about-browser-hijacking
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
| Integration | ✅ Passing | Dataset | XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 1