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