Detection rules › Elastic

Potential Common Log File System Exploit

Source
github.com/elastic/protections-artifacts

Identifies an unelevated attempt to create a BLF file using the Common Log File System (CLFS) API. This may indicate an attempt to exploit a CLFS vulnerability for privilege escalation.

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation

Rule body

[rule]
description = """
Identifies an unelevated attempt to create a BLF file using the Common Log File System (CLFS) API. This may indicate an
attempt to exploit a CLFS vulnerability for privilege escalation.
"""
id = "4fd4edfd-3bb4-4eac-82f2-8d4ebcbed0f3"
license = "Elastic License v2"
name = "Potential Common Log File System Exploit"
os_list = ["windows"]
reference = [
    "https://securelist.com/windows-clfs-exploits-ransomware/111560/",
    "https://www.elastic.co/security-labs/itw-windows-lpe-0days-insights-and-detection-strategies",
]
version = "1.0.3"

query = '''
file where event.action != "deletion" and user.id != "S-1-5-18" and user.id != null and process.pid != 4 and
  _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: ("*clfsw32.dll!CreateLogFile*", "*clfsw32.dll!AddLogContainerSet*"))
'''

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

[[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

Stage 1: file

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

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actionne
  • deletion corpus 86 (elastic 86)
field:"EventType" kind:ne value:"deletion"
process.pidne
  • 4 transforms: number corpus 44 (elastic 44)
field:"process_id" kind:ne value:"4"
user.idis_not_null
  • (no value, null check)
field:"user.id" kind:is_not_null
user.idne
  • S-1-5-18 corpus 36 (elastic 36)
field:"user.id" kind:ne value:"S-1-5-18"