sequence with maxspan=1m
[process where host.os.type == "windows" and event.type == "start" and
process.name : "mshta.exe" and process.args : "-Embedding"
] by host.id, process.entity_id
[network where host.os.type == "windows" and event.type == "start" and process.name : "mshta.exe" and
network.direction : ("incoming", "ingress") and network.transport == "tcp" and
source.port > 49151 and destination.port > 49151 and source.ip != "127.0.0.1" and source.ip != "::1"
] by host.id, process.entity_id
Install detection rules in Elastic Security
Detect Incoming DCOM Lateral Movement via MSHTA in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).