Detection rules › Elastic
Process Execution with Unusual File Extension
Identifies the creation of a process with an unusual file extension (3 to 3 chars) and from the most commonly abused Windows processes for initial access. Attackers may attempt to evade detection by masquerading files using the file extension values used by image, logs, or document file types.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule body
[rule]
description = """
Identifies the creation of a process with an unusual file extension (3 to 3 chars) and from the most commonly abused
Windows processes for initial access. Attackers may attempt to evade detection by masquerading files using the file
extension values used by image, logs, or document file types.
"""
id = "6daf97b0-8e29-476b-998a-c3d168d98506"
license = "Elastic License v2"
name = "Process Execution with Unusual File Extension"
os_list = ["windows"]
reference = ["https://www.elastic.co/security-labs/doing-time-with-the-yipphb-dropper"]
version = "1.0.26"
query = '''
process where event.action == "start" and
/* 3 to 4 chars to match on common file extensions length */
process.name regex~ """.+\.[a-z]{3,4}""" and
/* excluding common or noisy file extensions */
not process.name regex~ """.+\.(exe|scr|pif|com|tmp|bin|dll|sys|dat|upd|cgi|out|pro|ngn|dep|cxp|axp|srv)""" and
/* most common parents observed in malware behavior */
process.parent.name : ("cmd.exe", "powershell.exe", "WmiPrvSe.exe", "winword.exe", "excel.exe", "wscript.exe", "cscript.exe", "mshta.exe") and
process.hash.sha256 != "28ebebabf1687e5577178b386b92591062b857b8ac04784354c2d501bd69d378"
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[[threat.technique.subtechnique]]
id = "T1036.007"
name = "Double File Extension"
reference = "https://attack.mitre.org/techniques/T1036/007/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.action == "start" and
process.name regex~ """.+\.[a-z]{3,4}""" and
not process.name regex~ """.+\.(exe|scr|pif|com|tmp|bin|dll|sys|dat|upd|cgi|out|pro|ngn|dep|cxp|axp|srv)""" and
process.parent.name : ("cmd.exe", "powershell.exe", "WmiPrvSe.exe", "winword.exe", "excel.exe", "wscript.exe", "cscript.exe", "mshta.exe") and
process.hash.sha256 != "28ebebabf1687e5577178b386b92591062b857b8ac04784354c2d501bd69d378"
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.name | regex_match | .+.(exe|scr|pif|com|tmp|bin|dll|sys|dat|upd|cgi|out|pro|ngn|dep|cxp|axp|srv) | excludes:process.name field:"process.name" value:".+.(exe|scr|pif|com|tmp|bin|dll|sys|dat|upd|cgi|out|pro|ngn|dep|cxp|axp|srv)" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.hash.sha256 | ne |
| field:"Hashes" kind:ne value:"28ebebabf1687e5577178b386b92591062b857b8ac04784354c2d501bd69d378" |
process.name | regex_match |
| field:"process_name" kind:regex_match value:".+.[a-z]{3,4}" |
process.parent.name | wildcard |
| field:"parent_process_name" kind:wildcard |