Incoming DCOM Lateral Movement via MSHTA

Identifies the use of Distributed Component Object Model (DCOM) to execute commands from a remote host, which are launched via the HTA Application COM Object. This behavior may indicate an attacker abusing a DCOM application to move laterally while attempting to evade detection.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/11/03"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5updated_date = "2024/10/15"
 6min_stack_version = "8.14.0"
 7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the use of Distributed Component Object Model (DCOM) to execute commands from a remote host, which are
13launched via the HTA Application COM Object. This behavior may indicate an attacker abusing a DCOM application to move
14laterally while attempting to evade detection.
15"""
16from = "now-9m"
17index = [
18    "winlogbeat-*",
19    "logs-endpoint.events.process-*",
20    "logs-endpoint.events.network-*",
21    "logs-windows.sysmon_operational-*",
22]
23language = "eql"
24license = "Elastic License v2"
25name = "Incoming DCOM Lateral Movement via MSHTA"
26references = ["https://codewhitesec.blogspot.com/2018/07/lethalhta.html"]
27risk_score = 73
28rule_id = "622ecb68-fa81-4601-90b5-f8cd661e4520"
29severity = "high"
30tags = [
31    "Domain: Endpoint",
32    "OS: Windows",
33    "Use Case: Threat Detection",
34    "Tactic: Lateral Movement",
35    "Data Source: Elastic Defend",
36    "Data Source: Sysmon",
37]
38type = "eql"
39
40query = '''
41sequence with maxspan=1m
42  [process where host.os.type == "windows" and event.type == "start" and
43     process.name : "mshta.exe" and process.args : "-Embedding"
44  ] by host.id, process.entity_id
45  [network where host.os.type == "windows" and event.type == "start" and process.name : "mshta.exe" and
46     network.direction : ("incoming", "ingress") and network.transport == "tcp" and
47     source.port > 49151 and destination.port > 49151 and source.ip != "127.0.0.1" and source.ip != "::1"
48  ] by host.id, process.entity_id
49'''
50
51
52[[rule.threat]]
53framework = "MITRE ATT&CK"
54[[rule.threat.technique]]
55id = "T1021"
56name = "Remote Services"
57reference = "https://attack.mitre.org/techniques/T1021/"
58[[rule.threat.technique.subtechnique]]
59id = "T1021.003"
60name = "Distributed Component Object Model"
61reference = "https://attack.mitre.org/techniques/T1021/003/"
62
63
64
65[rule.threat.tactic]
66id = "TA0008"
67name = "Lateral Movement"
68reference = "https://attack.mitre.org/tactics/TA0008/"
69[[rule.threat]]
70framework = "MITRE ATT&CK"
71[[rule.threat.technique]]
72id = "T1218"
73name = "System Binary Proxy Execution"
74reference = "https://attack.mitre.org/techniques/T1218/"
75[[rule.threat.technique.subtechnique]]
76id = "T1218.005"
77name = "Mshta"
78reference = "https://attack.mitre.org/techniques/T1218/005/"
79
80
81
82[rule.threat.tactic]
83id = "TA0005"
84name = "Defense Evasion"
85reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top