Windows Mshta.exe Launching JavaScript via Command Line

Detects Mshta.exe executions where the command line includes "javascript".

FreeReviewedSigma · High · v1
Product
windows
Category
process_creation
Author
E.M. Anhaus (originally from Atomic Blue Detections, Endgame), oscd.community (SigmaHQ), DRL 1.1
Published
2019-10-24
Updated
2026-07-30

ATT&CK techniques

Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Defense Evasion

  8. Cred Access

  9. Discovery

  10. Lateral Movement

  11. Collection

  12. C2

  13. Exfiltration

  14. Impact

What it detects

This rule flags process creation events where Mshta.exe is executed with a command line containing the term "javascript". Attackers commonly use Mshta as a proxy execution method to run script content without spawning a typical scripting host, which can help evade simpler detections. It relies on Windows process creation telemetry, matching the executable path/name and searching the process command line for the JavaScript keyword.

Related detections9 linkedT1218.005 — drag to rearrange
Malicious Metasploit Stager Delivery via mshta Remote HTA (via process_creation)
Malicious mshta Launching WScript VBScript Loader
Suspicious Kimsuky Remote HTA Payload Execution via mshta (via process_creation)
Suspicious mshta Execution of Inline JavaScript
Suspicious Command Interpreter Spawned by mshta (via process_creation)
Suspicious mshta Execution Spawned by Scheduled Task Service Host (via process_creation)
Suspicious Scheduled Task Creation Launching mshta via schtasks (via process_creation)
Suspicious HTA File Dropped into Startup Folder
Suspicious PowerShell Spawned by mshta.exe in FakeSG Chain (via process_creation)
Windows Mshta.exe Launching JavaScript via Command Line
Pivot detection · T1218.005 · 9 related

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.