Detection rules › Elastic

Transacted File Activity via an Unsigned DLL

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

Identifies the creation of a transacted file by an unsigned DLL. This may indicate an attempt to use Transactional NTFS to execute arbitrary code in the address space of a running process, without committing the code to disk.

MITRE ATT&CK coverage

TacticTechniques
Stealth

Rule body

[rule]
description = """
Identifies the creation of a transacted file by an unsigned DLL. This may indicate an attempt to use Transactional NTFS
to execute arbitrary code in the address space of a running process, without committing the code to disk.
"""
id = "e80eb716-d5b0-4e85-b778-b9a4f3d6e303"
license = "Elastic License v2"
name = "Transacted File Activity via an Unsigned DLL"
os_list = ["windows"]
version = "1.0.2"

query = '''
sequence by process.entity_id with maxspan=1m
[library where event.action == "load" and process.pid != 4 and not dll.code_signature.status : "trusted" and
  (dll.Ext.relative_file_creation_time < 500 or
   dll.Ext.relative_file_name_modify_time < 500 or
   (dll.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk","USB *") and not dll.path : "C:\\*")
   )] as event0
[file where event.action == "overwrite" and
 _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "*\\kernel32.dll!CreateFileTransacted*") and
 stringcontains~(process.thread.Ext.call_stack_summary, concat("kernel32.dll|", event0.dll.name))]
'''

min_endpoint_version = "8.7.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 = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

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

Stage 1: library

[library where event.action == "load" and process.pid != 4 and not dll.code_signature.status : "trusted" and
  (dll.Ext.relative_file_creation_time < 500 or
   dll.Ext.relative_file_name_modify_time < 500 or
   (dll.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk","USB *") and not dll.path : "C:\\*")
   )] as event0

Stage 2: file

[file where event.action == "overwrite" and
 _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "*\\kernel32.dll!CreateFileTransacted*") and
 stringcontains~(process.thread.Ext.call_stack_summary, concat("kernel32.dll|", event0.dll.name))]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
dll.code_signature.statuseqtrustedexcludes:dll.code_signature.status field:"dll.code_signature.status" value:"trusted"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.Ext.device.product_idwildcard
  • USB *
  • Virtual DVD-ROM corpus 5 (elastic 5)
  • Virtual Disk corpus 5 (elastic 5)
field:"dll.Ext.device.product_id" kind:wildcard
dll.Ext.relative_file_creation_timelt
  • 500 transforms: number
field:"dll.Ext.relative_file_creation_time" kind:lt value:"500"
dll.Ext.relative_file_name_modify_timelt
  • 500 transforms: number
field:"dll.Ext.relative_file_name_modify_time" kind:lt value:"500"
event.actioneq
  • load corpus 24 (elastic 24)
  • overwrite corpus 8 (elastic 8)
field:"EventType" kind:eq
process.pidne
  • 4 transforms: number corpus 44 (elastic 44)
field:"process_id" kind:ne value:"4"
process.thread.Ext.call_stack_summarycontains
  • concat("kernel32.dll|", event0.dll.name) (expression)
field:"process.thread.Ext.call_stack_summary" kind:contains