Detection rules › Splunk

Windows Driver Load Non-Standard Path

Status
production
Severity
medium
Group by
ImagePath, ServiceType, computer_name, service_name, signature_id
Author
Michael Haag, Splunk
Source
github.com/splunk/security_content

The following analytic detects the loading of new Kernel Mode Drivers from non-standard paths using Windows EventCode 7045. It identifies drivers not located in typical directories like Windows, Program Files, or SystemRoot. This activity is significant because adversaries may use these non-standard paths to load malicious or vulnerable drivers, potentially bypassing security controls. If confirmed malicious, this could allow attackers to execute code at the kernel level, escalate privileges, or maintain persistence within the environment, posing a severe threat to system integrity and security.

Known false positives

  • False positives may be present based on legitimate third party applications needing to install drivers. Filter, or allow list known good drivers consistently being installed in these paths.

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation
Stealth

Telemetry coverage

Rule body

name: Windows Driver Load Non-Standard Path
id: 9216ef3d-066a-4958-8f27-c84589465e62
version: 12
creation_date: '2022-05-16'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic detects the loading of new Kernel Mode Drivers from non-standard paths using Windows EventCode 7045. It identifies drivers not located in typical directories like Windows, Program Files, or SystemRoot. This activity is significant because adversaries may use these non-standard paths to load malicious or vulnerable drivers, potentially bypassing security controls. If confirmed malicious, this could allow attackers to execute code at the kernel level, escalate privileges, or maintain persistence within the environment, posing a severe threat to system integrity and security.
data_source:
    - Windows Event Log System 7045
search: >-
    `wineventlog_system`
    EventCode = 7045
    ServiceType = "kernel mode driver"
    | regex ImagePath != "(?i)^(\w:\\\\Program Files\\\\|\w:\\\\Program Files \(x86\)\\\\|\w:\\\\Windows\\\\System32\\\\|\w:\\\\Windows\\\\SysWOW64\\\\|\w:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Definition Updates\\\\|\w:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\|%SystemRoot%|\\\\SystemRoot\\\\|SystemRoot\\\\)"
    | stats count min(_time) as firstTime max(_time) as lastTime by
      Computer EventCode ImagePath ServiceName ServiceType
    | rename Computer as dest
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `windows_driver_load_non_standard_path_filter`
how_to_implement: |
    To implement this analytic, the Windows EventCode 7045 will need to be logged.
    The Windows TA for Splunk is also recommended.
known_false_positives: |
    False positives may be present based on legitimate third party applications needing to install drivers.
    Filter, or allow list known good drivers consistently being installed in these paths.
references:
    - https://redcanary.com/blog/tracking-driver-inventory-to-expose-rootkits/
    - https://attack.mitre.org/techniques/T1014/
    - https://www.fuzzysecurity.com/tutorials/28.html
finding:
    title: A kernel mode driver was loaded from a non-standard path on $dest$.
    entity:
        field: dest
        type: system
        score: 50
analytic_story:
    - Windows Drivers
    - CISA AA22-320A
    - AgentTesla
    - BlackByte Ransomware
    - BlackSuit Ransomware
asset_type: Endpoint
mitre_attack_id:
    - T1014
    - T1068
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`wineventlog_system` EventCode = 7045 ServiceType = "kernel mode driver"

Stage 2: regex

| regex ImagePath != "(?i)^(\w:\\\\Program Files\\\\|\w:\\\\Program Files \(x86\)\\\\|\w:\\\\Windows\\\\System32\\\\|\w:\\\\Windows\\\\SysWOW64\\\\|\w:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Definition Updates\\\\|\w:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\|%SystemRoot%|\\\\SystemRoot\\\\|SystemRoot\\\\)"

Stage 3: stats

| stats count min(_time) as firstTime max(_time) as lastTime by
  Computer EventCode ImagePath ServiceName ServiceType

Stage 4: rename

| rename Computer as dest

Stage 5: search

| `security_content_ctime(firstTime)`

Stage 6: search

| `security_content_ctime(lastTime)`

Stage 7: search

| `windows_driver_load_non_standard_path_filter`

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
ImagePathregex_match"(?i)^(\w:\\Program Files\\|\w:\\Program Files (x86)\\|\w:\\Windows\\System32\\|\w:\\Windows\\SysWOW64\\|\w:\\ProgramData\\Microsoft\\Windows Defender\\Definition Updates\\|\w:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\|%SystemRoot%|\\SystemRoot\\|SystemRoot\\)"excludes:ImagePath

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 7045 corpus 21 (splunk 18, elastic 1, chronicle 1, kusto 1)
field:"EventID" kind:eq value:"7045"
ServiceTypeeq
  • "kernel mode driver" corpus 2 (splunk 2)
field:"ServiceType" kind:eq