Detection rules › Elastic
Potential DLL SideLoad via a Renamed Signed Binary
Identifies attempts to load an unsigned DLL from a mounted virtual disk (.iso, .vhd) and by a renamed signed binary. This may indicate an attempt to sideload a malicious DLL to stealthily execute code for initial access.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule body
[rule]
description = """
Identifies attempts to load an unsigned DLL from a mounted virtual disk (.iso, .vhd) and by a renamed signed binary.
This may indicate an attempt to sideload a malicious DLL to stealthily execute code for initial access.
"""
id = "b117a187-3677-4891-ac4c-12677b5773a7"
license = "Elastic License v2"
name = "Potential DLL SideLoad via a Renamed Signed Binary"
os_list = ["windows"]
reference = [
"https://www.elastic.co/security-labs/Hunting-for-Suspicious-Windows-Libraries-for-Execution-and-Evasion",
]
version = "1.0.26"
query = '''
/* Signed PE with OriginalFileName different than process.name as potential target from a malicious ISO/DMG/VHD archive */
sequence by process.entity_id with maxspan=1m
[process where event.action == "start" and process.pe.original_file_name != null and
(process.code_signature.trusted == true or process.pe.original_file_name : ("calc.exe", "ClientConsole.EXE")) and
not startswith~(process.name, process.pe.original_file_name) and
(process.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not process.executable : "C:\\*") and
/* ba802fb2-f183-420e-947b-da5ce0c74dd3 */
not process.code_signature.subject_name : "Microsoft *"]
[library where
(dll.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not dll.path : "C:\\*") and
not dll.code_signature.status : ("trusted", "errorExpired", "errorCode_endpoint*", "errorChaining") and
not startswith~(dll.name, process.name)]
'''
min_endpoint_version = "8.4.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[[threat.technique.subtechnique]]
id = "T1574.001"
name = "DLL"
reference = "https://attack.mitre.org/techniques/T1574/001/"
[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 != null and
(process.code_signature.trusted == true or process.pe.original_file_name : ("calc.exe", "ClientConsole.EXE")) and
not startswith~(process.name, process.pe.original_file_name) and
(process.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not process.executable : "C:\\*") and
not process.code_signature.subject_name : "Microsoft *"]
Stage 2: library
[library where
(dll.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not dll.path : "C:\\*") and
not dll.code_signature.status : ("trusted", "errorExpired", "errorCode_endpoint*", "errorChaining") and
not startswith~(dll.name, process.name)]
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.subject_name | starts_with | Microsoft | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft " |
process.executable | starts_with | C:\ | excludes:process.executable field:"process.executable" value:"C:\" |
process.name | starts_with | process.pe.original_file_name | excludes:process.name field:"process.name" value:"process.pe.original_file_name" |
dll.code_signature.status | wildcard | trusted, errorExpired, errorCode_endpoint*, errorChaining | excludes:dll.code_signature.status |
dll.name | starts_with | process.name | excludes:dll.name field:"dll.name" value:"process.name" |
dll.path | starts_with | C:\ | excludes:dll.path field:"dll.path" value:"C:\" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
dll.Ext.device.product_id | wildcard |
| field:"dll.Ext.device.product_id" kind:wildcard |
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.Ext.device.product_id | wildcard |
| field:"process.Ext.device.product_id" kind:wildcard |
process.code_signature.trusted | eq |
| field:"process.code_signature.trusted" kind:eq value:"true" |
process.pe.original_file_name | is_not_null | field:"OriginalFileName" kind:is_not_null | |
process.pe.original_file_name | wildcard |
| field:"OriginalFileName" kind:wildcard |