Detection rules › Elastic
Suspicious Critical System Files Modification
Identifies attempts to delete or modify critical files used during the boot process to prevent the system from booting. This may indicate a destructive attack behavior.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Impact |
Rule body
[rule]
description = """
Identifies attempts to delete or modify critical files used during the boot process to prevent the system from booting.
This may indicate a destructive attack behavior.
"""
id = "e2c925f7-fccb-4199-a345-cab12acedab0"
license = "Elastic License v2"
name = "Suspicious Critical System Files Modification"
os_list = ["windows"]
version = "1.0.4"
query = '''
file where process.pid != 4 and process.executable != null and
(
(event.action in ("deletion", "overwrite") and
file.path : ("C:\\Windows\\System32\\winload.exe",
"C:\\Windows\\System32\\winload.efi",
"C:\\Windows\\System32\\ntoskrnl.exe",
"C:\\Windows\\Boot\\PCAT\\bootmgr",
"C:\\Windows\\System32\\Boot\\winload.efi",
"C:\\Windows\\System32\\Boot\\winload.exe",
"C:\\Windows\\WinSxS\\amd64_microsoft-windows-os-kernel_*\\ntoskrnl.exe")) or
(event.action == "rename" and
file.Ext.original.path :
("C:\\Windows\\System32\\winload.exe",
"C:\\Windows\\System32\\winload.efi",
"C:\\Windows\\System32\\ntoskrnl.exe",
"C:\\Windows\\Boot\\PCAT\\bootmgr",
"C:\\Windows\\System32\\Boot\\winload.efi",
"C:\\Windows\\System32\\Boot\\winload.exe",
"C:\\Windows\\WinSxS\\amd64_microsoft-windows-os-kernel_*\\ntoskrnl.exe"))
) and not process.executable :
("C:\\Windows\\System32\\poqexec.exe",
"C:\\Windows\\System32\\wbengine.exe",
"C:\\Windows\\WinSxS\\*\\TiWorker.exe")
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1485"
name = "Data Destruction"
reference = "https://attack.mitre.org/techniques/T1485/"
[[threat.technique]]
id = "T1490"
name = "Inhibit System Recovery"
reference = "https://attack.mitre.org/techniques/T1490/"
[threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: file
file where process.pid != 4 and process.executable != null and
(
(event.action in ("deletion", "overwrite") and
file.path : ("C:\\Windows\\System32\\winload.exe",
"C:\\Windows\\System32\\winload.efi",
"C:\\Windows\\System32\\ntoskrnl.exe",
"C:\\Windows\\Boot\\PCAT\\bootmgr",
"C:\\Windows\\System32\\Boot\\winload.efi",
"C:\\Windows\\System32\\Boot\\winload.exe",
"C:\\Windows\\WinSxS\\amd64_microsoft-windows-os-kernel_*\\ntoskrnl.exe")) or
(event.action == "rename" and
file.Ext.original.path :
("C:\\Windows\\System32\\winload.exe",
"C:\\Windows\\System32\\winload.efi",
"C:\\Windows\\System32\\ntoskrnl.exe",
"C:\\Windows\\Boot\\PCAT\\bootmgr",
"C:\\Windows\\System32\\Boot\\winload.efi",
"C:\\Windows\\System32\\Boot\\winload.exe",
"C:\\Windows\\WinSxS\\amd64_microsoft-windows-os-kernel_*\\ntoskrnl.exe"))
) and not process.executable :
("C:\\Windows\\System32\\poqexec.exe",
"C:\\Windows\\System32\\wbengine.exe",
"C:\\Windows\\WinSxS\\*\\TiWorker.exe")
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | wildcard | C:\Windows\System32\poqexec.exe, C:\Windows\System32\wbengine.exe, C:\Windows\WinSxS\*\TiWorker.exe | excludes:process.executable field:"process.executable" value:"C:\Windows\System32\poqexec.exe" field:"process.executable" value:"C:\Windows\System32\wbengine.exe" field:"process.executable" value:"C:\Windows\WinSxS\*\TiWorker.exe" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"rename" |
event.action | in |
| field:"EventType" kind:in |
file.Ext.original.path | wildcard |
| field:"file.Ext.original.path" kind:wildcard |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard |
process.executable | is_not_null | field:"Image" kind:is_not_null | |
process.pid | ne |
| field:"process_id" kind:ne value:"4" |