Has used mshta to execute scripts including VBS.1
- Tactic
- Stealth
- Platform
- Windows
- Version
- 3.0
- Created
- 23 January 2020
- Last modified
- 12 May 2026
- Contributors
- @ionstorm; Ricardo Dias; Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank
Mshta MITRE reference T1218.005
17 groups have been recorded using this technique. Newest first; each entry carries MITRE’s procedure text and a link to the group’s full record. Click a name to filter the rules below.
Has utilized mshta.exe to execute a malicious hta file.1
Has used mshta.exe to load an HTA script within a malicious .LNK file.1
Has used mshta.exe to execute malicious VBScript.1
Has used mshta.exe to launch collection scripts.1
All 17 groups for this technique · 6 newest in this preview
2 campaigns have been recorded using this technique. Listed newest first; dates are year-granularity and attribution is MITRE’s.
During C0015, the threat actors used mshta to execute DLLs.1
During Operation Dust Storm, the threat actors executed JavaScript code via mshta.exe.1
All 2 campaigns for this technique
11 software entries are documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
Can create HTA files to install Grunt listeners.1
Has been executed via MSHTA application.1
Has used mshta.exe to execute a HTA payload.1
Has used mshta.exe to download and execute applications from a remote server.1
Uses mshta.exe to run malicious scripts on the system.1
All 11 software entries for this technique · 6 newest in this preview
Offense vs defense T1218.005
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
How it got here
Adversary activity (campaign spans) over cumulative rule output. Each source is plotted independently from zero, so neither line includes the other. Campaign dates are year-granularity.
Mshta detection strategy DET0506
MITRE names one behaviour worth catching for this technique and breaks it into 1 analytic, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detecting Mshta-based Proxy Execution via Suspicious HTA or Script Invocation
AN1397 · Windows
Detection of mshta.exe execution where command-line arguments reference remote or local HTA/script content (VBScript/JScript) followed by subsequent file creation, network retrieval, or process spawning that indicates payload execution outside standard Internet Explorer security context. Correlation includes parent process lineage, command-line inspection, and network connection creation to untrusted or anomalous endpoints.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | WinEventLog:Security | EventCode=4688 |
| File CreationDC0039 | WinEventLog:Sysmon | EventCode=11 |
| Network Connection CreationDC0082 | WinEventLog:Sysmon | EventCode=3, 22 |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| CommandLinePattern | Regex patterns for mshta.exe arguments referencing remote HTA/script content; may need tuning to exclude known-good internal scripts. |
| SuspiciousParentProcesses | List of parent processes considered suspicious when spawning mshta.exe (e.g., Office applications, script interpreters). |
| AllowedHTASources | Whitelist of domains/paths from which legitimate HTAs are executed. |
| TimeWindow | Time threshold for correlating mshta.exe execution with subsequent network connections or file creations. |
Mshta.exe may not be necessary within a given environment since its functionality is tied to older versions of Internet Explorer that have reached end of life.
Use application control configured to block execution of mshta.exe if it is not required for a given system or network to prevent potential misuse by adversaries. For example, in Windows 10 and Windows Server 2016 and above, Windows Defender Application Control (WDAC) policy rules may be applied to block the mshta.exe application and to prevent abuse.
Tests from Atomic Red Team (MIT licence) · technique definition