Payloads
WSH
Windows Scripting Host
Windows Native Engine
Two executables reponsible for running Visual Basic Scrips:
cscript.exe
: Command line scriptswscript.exe
: GUI Scripts
Simple Hello World Script:
Run a program with vbs
HTA
HTML Application, ends with
.hta
Dynamic HTML pages that contains
JScript
andVBscript
mshta.exe
is used to execute.hta
files.Can also be executed automatically with Internet Explorer.
An
.hta
files that executes binary
This can be hosted with any web server.
MsfVenom can be used to create a reverse shell with the
.hta
format
Metasploit exploit
exploit/windows/misc/hta_server
can be used to host a webserver hosting an HTA file.
VBA
Visual Basic for Application, implimented by Microsoft for it's application such as Word, Powerpoint using macros.
Can access Windows Application Programing Interface, and low level APIs.
Simple VBA Macro to display text:
VBA to run code when the document is opened:
Macro is supported by specific file formats such as
.doc
.docm
VBA to run commands:
PSH
Run Powershell scripts bypassing the execution policy
Run Powershell payload after downloading script from internet
Last updated