Detection rules › Elastic

Suspicious Image Load by System Protected Process

Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies when a System protected process loads a library from a network file share. This may indicate an attempt to bypass PPL protection and inject malicious code into a protected process or disable security software.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies when a System protected process loads a library from a network file share. This may indicate an attempt to
bypass PPL protection and inject malicious code into a protected process or disable security software.
"""
id = "5007b805-0cee-44e8-b807-22c95d5d2998"
license = "Elastic License v2"
name = "Suspicious Image Load by System Protected Process"
os_list = ["windows"]
reference = [
    "https://learn.microsoft.com/en-us/windows/win32/services/protecting-anti-malware-services-",
    "https://github.com/gabriellandau/PPLFault",
    "https://www.blackhat.com/asia-23/briefings/schedule/#ppldump-is-dead-long-live-ppldump-31052",
    "https://www.elastic.co/security-labs/forget-vulnerable-drivers-admin-is-all-you-need",
]
version = "1.0.14"

query = '''
sequence by process.entity_id
 [process where event.action == "start" and process.Ext.protection : "PsProtected*" and 
  not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework\\*\\mscorsvw.exe" and 
       process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework*\\ngen.exe" and 
       process.Ext.protection : "PsProtectedSignerCodeGen-Light")]
 [library where dll.path : ("\\Device\\Mup\\*", "\\\\127.*\\*")]
  until [process where event.action:"end"]
'''

min_endpoint_version = "8.7.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1211"
name = "Exploitation for Defense Evasion"
reference = "https://attack.mitre.org/techniques/T1211/"

[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Ordered sequence: each step below must occur in order, correlated by process.entity_id.

Stage 1: process

[process where event.action == "start" and process.Ext.protection : "PsProtected*" and 
  not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework\\*\\mscorsvw.exe" and 
       process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework*\\ngen.exe" and 
       process.Ext.protection : "PsProtectedSignerCodeGen-Light")]

Stage 2: library

[library where dll.path : ("\\Device\\Mup\\*", "\\\\127.*\\*")]

Until: process

until [process where event.action:"end"]

Ends the sequence: the steps above must complete before an event matching this clause occurs.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.Ext.protectioneqPsProtectedSignerCodeGen-Lightexcludes:process.Ext.protection field:"process.Ext.protection" value:"PsProtectedSignerCodeGen-Light"
process.executablewildcard?:\Windows\Microsoft.NET\Framework\*\mscorsvw.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\Microsoft.NET\Framework\*\mscorsvw.exe"
process.parent.executablewildcard?:\Windows\Microsoft.NET\Framework*\ngen.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\Microsoft.NET\Framework*\ngen.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.pathwildcard
  • \Device\Mup\* corpus 5 (elastic 5)
  • \\127.*\*
field:"ImageLoaded" kind:wildcard
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
event.actionwildcard
  • end corpus 18 (elastic 18)
field:"EventType" kind:wildcard value:"end"
process.Ext.protectionwildcard
  • PsProtected*
field:"process.Ext.protection" kind:wildcard value:"PsProtected*"