sequence by process.entity_id with maxspan=10m
[process where host.os.type == "windows" and event.type == "start" and process.name : "mshta.exe" and
not process.parent.name : "Microsoft.ConfigurationManagement.exe" and
not (process.parent.executable : "C:\\Amazon\\Amazon Assistant\\amazonAssistantService.exe" or
process.parent.executable : "C:\\TeamViewer\\TeamViewer.exe") and
not process.args : "ADSelfService_Enroll.hta"]
[network where host.os.type == "windows" and process.name : "mshta.exe"]
Install detection rules in Elastic Security
Detect Mshta Making Network Connections 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).