Files
splunk-security_content/detections/endpoint/windows_service_create_kernel_mode_driver.yml
2024-06-05 21:05:06 +00:00

84 lines
3.4 KiB
YAML

name: Windows Service Create Kernel Mode Driver
id: 0b4e3b06-1b2b-4885-b752-cf06d12a90cb
version: 2
date: '2024-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic identifies the creation of a new kernel mode driver
using the sc.exe command. This detection leverages data from Endpoint Detection
and Response (EDR) agents, focusing on process execution logs that include command-line
details. The activity is significant because adding a kernel driver is uncommon
in regular operations and can indicate an attempt to gain low-level access to the
system. If confirmed malicious, this could allow an attacker to execute code with
high privileges, potentially compromising the entire system and evading traditional
security measures.
data_source:
- Sysmon EventID 1
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
as lastTime from datamodel=Endpoint.Processes where Processes.process_name=sc.exe
Processes.process="*kernel*" by Processes.dest Processes.user Processes.parent_process_name
Processes.process_name Processes.process Processes.process_id Processes.parent_process_id
| `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
| `windows_service_create_kernel_mode_driver_filter`'
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.
known_false_positives: False positives may be present based on common applications
adding new drivers, however, filter as needed.
references:
- https://www.aon.com/cyber-solutions/aon_cyber_labs/yours-truly-signed-av-driver-weaponizing-an-antivirus-driver/
tags:
analytic_story:
- Windows Drivers
- CISA AA22-320A
asset_type: Endpoint
confidence: 80
impact: 60
message: Service control, $process_name$, loaded a new kernel mode driver on $dest$
by $user$.
mitre_attack_id:
- T1543.003
- T1543
- T1068
observable:
- name: user
type: User
role:
- Victim
- name: dest
type: Hostname
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- Processes.dest
- Processes.user
- Processes.original_file_name
- Processes.process_name
- Processes.process
- Processes.process_id
- Processes.parent_process_path
- Processes.process_path
- Processes.parent_process_id
risk_score: 48
security_domain: endpoint
tests:
- name: True Positive Test
attack_data:
- data:
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1068/drivers/sc_kernel.log
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
sourcetype: xmlwineventlog
update_timestamp: true