Detection rules › Elastic

Elevation via Common Log File System Exploitation

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

Identifies unlevated attempt to create a BLF file using the Common Log File System (CLFS) API followed by spawning a child process with System privileges. This may indicate a successful CLFS vulnerability exploitation for privilege escalation.

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation

Rule body

[rule]
description = """
Identifies unlevated attempt to create a BLF file using the Common Log File System (CLFS) API followed by spawning a
child process with System privileges. This may indicate a successful CLFS vulnerability exploitation for privilege
escalation.
"""
id = "54cff348-106e-42bf-bf94-ce8e3ed68440"
license = "Elastic License v2"
name = "Elevation via Common Log File System Exploitation"
os_list = ["windows"]
reference = ["https://securelist.com/windows-clfs-exploits-ransomware/111560/"]
version = "1.0.2"

query = '''
sequence with maxspan=2m
 [file where event.action != "deletion" and not user.id : "S-1-5-18" and user.id != null and 
  _arraysearch(process.thread.Ext.call_stack, $entry, 
               $entry.symbol_info: ("*clfsw32.dll!CreateLogFile*", "*clfsw32.dll!AddLogContainerSet*"))] by process.entity_id
 [process where event.action == "start" and user.id : "S-1-5-18"] by process.parent.entity_id
'''

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

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

[[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.7.0"

Stages and Predicates

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

Stage 1: file

[file where event.action != "deletion" and not user.id : "S-1-5-18" and user.id != null and 
  _arraysearch(process.thread.Ext.call_stack, $entry, 
               $entry.symbol_info: ("*clfsw32.dll!CreateLogFile*", "*clfsw32.dll!AddLogContainerSet*"))] by process.entity_id

Stage 2: process

[process where event.action == "start" and user.id : "S-1-5-18"] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
user.ideqS-1-5-18excludes:user.id field:"user.id" value:"S-1-5-18"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
event.actionne
  • deletion corpus 86 (elastic 86)
field:"EventType" kind:ne value:"deletion"
user.idis_not_null
  • (no value, null check)
field:"user.id" kind:is_not_null
user.idwildcard
  • S-1-5-18 corpus 13 (elastic 13)
field:"user.id" kind:wildcard value:"S-1-5-18"