The following analytic identifies Schtasks.exe creating a new task to start and run as an elevated user - SYSTEM. This is commonly used by adversaries to spawn a process in an elevated state.
- Type: TTP
- Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Datamodel: Endpoint
- Last Updated: 2022-02-07
- Author: Michael Haag, Splunk
- ID: 41a0e58e-884c-11ec-9976-acde48001122
Kill Chain Phase
1 2 3 4 5 6 | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_schtasks` Processes.process="*/create *" AND Processes.process="*/ru *" AND Processes.process="*system*" by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_schtasks_create_run_as_system_filter`
The SPL above uses the following Macros:
Note that windows_schtasks_create_run_as_system_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
How To Implement
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the
Endpoint datamodel in the
Processes node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.
Known False Positives
False positives will be limited to legitimate applications creating a task to run as SYSTEM. Filter as needed based on parent process, or modify the query to have world writeable paths to restrict it.
Associated Analytic story
|48.0||80||60||An $process_name$ was created on endpoint $dest$ attempting to spawn as SYSTEM.|
source | version: 1