Detection rules › Elastic

Unsigned DLL loaded by Rundll32 via COM

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

Identifies attempts to load an unsigned and recently dropped DLL from a COM ClassID using the Rundll32 -sta argument. Adversaries may use this method to execute malicious modules via Rundll32 with legit looking process arguments.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies attempts to load an unsigned and recently dropped DLL from a COM ClassID using the Rundll32 -sta argument.
Adversaries may use this method to execute malicious modules via Rundll32 with legit looking process arguments.
"""
id = "d7b30f32-4e92-496e-9cf5-c46d985f66cd"
license = "Elastic License v2"
name = "Unsigned DLL loaded by Rundll32 via COM"
os_list = ["windows"]
reference = ["https://lolbas-project.github.io/lolbas/Binaries/Rundll32/"]
version = "1.0.5"

query = '''
sequence by process.entity_id with maxspan=1m
 [process where event.action == "start" and
  (process.pe.original_file_name == "RUNDLL32.EXE" or process.name : "RUNDLL32.EXE") and process.args : ("/sta", "-sta")]
 [library where process.name : "rundll32.exe" and
   (dll.Ext.relative_file_creation_time <= 900 or dll.Ext.relative_file_name_modify_time <= 900) and
   not dll.code_signature.status : ("trusted", "errorExpired", "errorCode_endpoint*")]
'''

min_endpoint_version = "8.4.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 = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[threat.technique.subtechnique]]
id = "T1546.015"
name = "Component Object Model Hijacking"
reference = "https://attack.mitre.org/techniques/T1546/015/"



[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"



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

[internal]
min_endpoint_version = "8.4.0"

Stages and Predicates

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

Stage 1: process

[process where event.action == "start" and
  (process.pe.original_file_name == "RUNDLL32.EXE" or process.name : "RUNDLL32.EXE") and process.args : ("/sta", "-sta")]

Stage 2: library

[library where process.name : "rundll32.exe" and
   (dll.Ext.relative_file_creation_time <= 900 or dll.Ext.relative_file_name_modify_time <= 900) and
   not dll.code_signature.status : ("trusted", "errorExpired", "errorCode_endpoint*")]

Exclusions

The rule actively suppresses these predicates.

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.Ext.relative_file_creation_timele
  • 900 transforms: number corpus 9 (elastic 9)
field:"dll.Ext.relative_file_creation_time" kind:le value:"900"
dll.Ext.relative_file_name_modify_timele
  • 900 transforms: number corpus 6 (elastic 6)
field:"dll.Ext.relative_file_name_modify_time" kind:le value:"900"
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.argswildcard
  • -sta
  • /sta
field:"process.args" kind:wildcard
process.namewildcard
  • RUNDLL32.EXE corpus 126 (elastic 100, splunk 26)
  • rundll32.exe corpus 126 (elastic 100, splunk 26)
field:"process_name" kind:wildcard
process.pe.original_file_nameeq
  • RUNDLL32.EXE corpus 78 (sigma 35, elastic 22, splunk 21)
field:"OriginalFileName" kind:eq value:"RUNDLL32.EXE"