Detection rules › Elastic
Suspicious Execution via Compiled HTML File
Identifies when the Microsoft HTML Help Executable (hh.exe) spawn a suspicious child process or open a compiled HTM file from a suspicious location. Adversaries may conceal malicious code in a CHM file and deliver it to a victim for execution.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Stealth |
Rule body
[rule]
description = """
Identifies when the Microsoft HTML Help Executable (hh.exe) spawn a suspicious child process or open a compiled HTM file
from a suspicious location. Adversaries may conceal malicious code in a CHM file and deliver it to a victim for
execution.
"""
id = "e2554e2b-7333-4379-88af-67e5bfac677a"
license = "Elastic License v2"
name = "Suspicious Execution via Compiled HTML File"
os_list = ["windows"]
reference = [
"https://www.ptsecurity.com/ww-en/analytics/pt-esc-threat-intelligence/higaisa-or-winnti-apt-41-backdoors-old-and-new/",
]
version = "1.0.25"
query = '''
process where event.action == "start" and
(
(process.parent.executable : "?:\\Windows\\hh.exe" and
process.name : ("cmd.exe",
"powershell.exe",
"MSHTA.EXE",
"CertUtil.exe",
"CertReq.exe",
"rundll32.exe",
"regsvr32.exe",
"MSbuild.exe",
"cscript.exe",
"wscript.exe",
"installutil.exe",
"schtasks.exe",
"msiexec.exe")) or
(process.parent.executable : "?:\\Windows\\hh.exe" and (process.code_signature.trusted == false or process.code_signature.exists == false))
)
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"
[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[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.001"
name = "Compiled HTML File"
reference = "https://attack.mitre.org/techniques/T1218/001/"
[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.parent.executable : "?:\\Windows\\hh.exe" and
process.name : ("cmd.exe",
"powershell.exe",
"MSHTA.EXE",
"CertUtil.exe",
"CertReq.exe",
"rundll32.exe",
"regsvr32.exe",
"MSbuild.exe",
"cscript.exe",
"wscript.exe",
"installutil.exe",
"schtasks.exe",
"msiexec.exe")) or
(process.parent.executable : "?:\\Windows\\hh.exe" and (process.code_signature.trusted == false or process.code_signature.exists == false))
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.code_signature.exists | eq |
| field:"process.code_signature.exists" kind:eq value:"false" |
process.code_signature.trusted | eq |
| field:"process.code_signature.trusted" kind:eq value:"false" |
process.name | wildcard |
| field:"process_name" kind:wildcard |
process.parent.executable | wildcard |
| field:"ParentImage" kind:wildcard value:"?:\Windows\hh.exe" |