Detection rules › Elastic

Inhibit System Recovery via Untrusted Parent Process

Time window
1m
Sequence by
process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Identifies the execution of Windows utilities to tamper with system recovery settings. Adversaries may delete or remove built-in operating system data and turn off services designed to aid in the recovery of a corrupted system and prevent recovery.

MITRE ATT&CK coverage

TacticTechniques
Impact

Rule body

[rule]
description = """
Identifies the execution of Windows utilities to tamper with system recovery settings. Adversaries may delete or remove
built-in operating system data and turn off services designed to aid in the recovery of a corrupted system and prevent
recovery.
"""
id = "d3588fad-43ae-4f2d-badd-15a27df72132"
license = "Elastic License v2"
name = "Inhibit System Recovery via Untrusted Parent Process"
os_list = ["windows"]
version = "1.0.33"

query = '''
sequence with maxspan=1m
  [process where event.action == "start" and
    process.Ext.token.integrity_level_name : ("high", "system") and
    not process.executable : ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe", "?:\\Windows\\System32\\*.exe", "?:\\Windows\\SysWOW64\\*.exe") and
    not process.code_signature.trusted == true and
    not process.hash.sha256 : "60ccd4ba2566d96676b448203fb4414a39c7c1e004e8c3fa1bbce139403ef1fb"] by process.entity_id
  [process where event.action == "start" and
    (
      (process.pe.original_file_name : "wmic.exe" and process.command_line : "*shadowcopy*" and process.command_line : "*delete*") or
      (process.pe.original_file_name : "vssadmin.exe" and process.command_line : "*shadows*" and process.command_line : ("*delete*", "*resize*")) or
      (process.pe.original_file_name : "bcdedit.exe" and process.command_line : ("*bootstatuspolicy*", "*recoveryenabled*")) or
      (process.pe.original_file_name : "wbadmin.exe" and process.command_line : ("*catalog*", "*systemstatebackup*") and process.command_line : "*delete*")
    ) and
    not (process.name : "bcdedit.exe" and process.args in ("ignoreallfailures", "displayallfailures"))
  ] by process.parent.entity_id
'''

min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

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

[[threat]]
framework = "MITRE ATT&CK"
[[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

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

Stage 1: process

[process where event.action == "start" and
    process.Ext.token.integrity_level_name : ("high", "system") and
    not process.executable : ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe", "?:\\Windows\\System32\\*.exe", "?:\\Windows\\SysWOW64\\*.exe") and
    not process.code_signature.trusted == true and
    not process.hash.sha256 : "60ccd4ba2566d96676b448203fb4414a39c7c1e004e8c3fa1bbce139403ef1fb"] by process.entity_id

Stage 2: process

[process where event.action == "start" and
    (
      (process.pe.original_file_name : "wmic.exe" and process.command_line : "*shadowcopy*" and process.command_line : "*delete*") or
      (process.pe.original_file_name : "vssadmin.exe" and process.command_line : "*shadows*" and process.command_line : ("*delete*", "*resize*")) or
      (process.pe.original_file_name : "bcdedit.exe" and process.command_line : ("*bootstatuspolicy*", "*recoveryenabled*")) or
      (process.pe.original_file_name : "wbadmin.exe" and process.command_line : ("*catalog*", "*systemstatebackup*") and process.command_line : "*delete*")
    ) and
    not (process.name : "bcdedit.exe" and process.args in ("ignoreallfailures", "displayallfailures"))
  ] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executablewildcard?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, ?:\Windows\System32\*.exe, ?:\Windows\SysWOW64\*.exeexcludes:process.executable
process.hash.sha256eq60ccd4ba2566d96676b448203fb4414a39c7c1e004e8c3fa1bbce139403ef1fbexcludes:process.hash.sha256 field:"process.hash.sha256" value:"60ccd4ba2566d96676b448203fb4414a39c7c1e004e8c3fa1bbce139403ef1fb"
process.argsindisplayallfailures, ignoreallfailuresexcludes:process.args field:"process.args" value:"displayallfailures" field:"process.args" value:"ignoreallfailures"
process.nameeqbcdedit.exeexcludes:process.name field:"process.name" value:"bcdedit.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.Ext.token.integrity_level_namewildcard
  • high corpus 22 (elastic 22)
  • system corpus 14 (elastic 14)
field:"process.Ext.token.integrity_level_name" kind:wildcard
process.command_linewildcard
  • *bootstatuspolicy* corpus 10 (elastic 8, sigma 1, splunk 1)
  • *catalog* corpus 12 (elastic 8, sigma 3, splunk 1)
  • *delete* corpus 31 (sigma 16, elastic 8, splunk 6, kusto 1)
  • *recoveryenabled* corpus 10 (elastic 8, sigma 1, splunk 1)
  • *resize* corpus 9 (elastic 5, sigma 3, splunk 1)
  • *shadowcopy* corpus 13 (elastic 7, sigma 3, splunk 3)
  • *shadows* corpus 11 (elastic 8, sigma 3)
  • *systemstatebackup* corpus 8 (elastic 8)
field:"CommandLine" kind:wildcard
process.pe.original_file_namewildcard
  • bcdedit.exe corpus 13 (elastic 11, sigma 2)
  • vssadmin.exe corpus 12 (elastic 9, sigma 3)
  • wbadmin.exe corpus 19 (elastic 11, sigma 6, splunk 2)
  • wmic.exe corpus 80 (sigma 38, elastic 24, splunk 18)
field:"OriginalFileName" kind:wildcard