Suspicious Kernel Mode Address Manipulation


Description

Identifies attempt to call API to modify a kernel mode address from a user mode process. This may indicate a successful vulnerability exploitation for privilege escalation.

Query · eql

api where process.pid != 4 and process.executable != null and 
 /*  kernel mode address range */
 process.Ext.api.parameters.address > 281474976710655 and 
 process.Ext.api.name : ("WriteProcessMemory", "VirtualProtect*", "VirtualAlloc*", "NtQueueApcThread", "QueueUserAPC", "MapViewOfFile*") and
 not (process.Ext.api.name : "VirtualProtect*" and user.id : "s-1-5-18" and
      process.executable : ("?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
                            "?:\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
                            "?:\\Program Files\\Windows Defender\\MsMpEng.exe"))
Raw source Suspicious Kernel Mode Address Manipulation · Elastic TOML
Esc
Published by elastic/protections-artifacts ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[rule]
description = """
Identifies attempt to call API to modify a kernel mode address from a user mode process. This may indicate a successful
vulnerability exploitation for privilege escalation.
"""
id = "10d1d07c-1301-4fed-b584-eb0878a74dc7"
license = "Elastic License v2"
name = "Suspicious Kernel Mode Address Manipulation"
os_list = ["windows"]
reference = ["https://www.elastic.co/security-labs/itw-windows-lpe-0days-insights-and-detection-strategies"]
version = "1.0.4"

query = '''
api where process.pid != 4 and process.executable != null and 
 /*  kernel mode address range */
 process.Ext.api.parameters.address > 281474976710655 and 
 process.Ext.api.name : ("WriteProcessMemory", "VirtualProtect*", "VirtualAlloc*", "NtQueueApcThread", "QueueUserAPC", "MapViewOfFile*") and
 not (process.Ext.api.name : "VirtualProtect*" and user.id : "s-1-5-18" and
      process.executable : ("?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
                            "?:\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
                            "?:\\Program Files\\Windows Defender\\MsMpEng.exe"))
'''

min_endpoint_version = "8.8.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 = "T1068"
name = "Exploitation for Privilege Escalation"
reference = "https://attack.mitre.org/techniques/T1068/"


[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

[internal]
min_endpoint_version = "8.8.0"

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.