We can apply a little filter to the monteverde.allPorts file to extract the ports and conduct a more comprehensive scan on them by extracting the services and their version running on each port and also executing some default scripts to gather more information
Note that this scan is also exported to have evidence at hand
# Nmap 7.94SVN scan initiated Sat Oct 4 20:50:18 2025 as: nmap -p53,88,135,139,389,445,464,593,636,3268,3269,5985,9389,49667,49673,49674,49676,49696,49749 -sCV -n -Pn --disable-arp-ping -oN monteverde.targeted 10.129.228.111Nmap scan report for 10.129.228.111Host is up (0.14s latency).PORT STATE SERVICE VERSION53/tcp open domain Simple DNS Plus88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2025-10-04 18:50:25Z)135/tcp open msrpc Microsoft Windows RPC139/tcp open netbios-ssn Microsoft Windows netbios-ssn389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: MEGABANK.LOCAL0., 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.0636/tcp open tcpwrapped3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: MEGABANK.LOCAL0., Site: Default-First-Site-Name)3269/tcp open tcpwrapped5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)|_http-title: Not Found|_http-server-header: Microsoft-HTTPAPI/2.09389/tcp open mc-nmf .NET Message Framing49667/tcp open msrpc Microsoft Windows RPC49673/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.049674/tcp open msrpc Microsoft Windows RPC49676/tcp open msrpc Microsoft Windows RPC49696/tcp open msrpc Microsoft Windows RPC49749/tcp open msrpc Microsoft Windows RPCService Info: Host: MONTEVERDE; OS: Windows; CPE: cpe:/o:microsoft:windowsHost script results:| smb2-time:| date: 2025-10-04T18:51:17|_ start_date: N/A| smb2-security-mode:| 3:1:1:|_ Message signing enabled and requiredService detection performed. Please report any incorrect results at https://nmap.org/submit/ .# Nmap done at Sat Oct 4 20:51:58 2025 -- 1 IP address (1 host up) scanned in 99.46 seconds
139, 445 - SMB
As always, let’s start enumerating the SMB service of the target, so we can have more information about it, such as the hostname, the OS Version and the domain name
nxc smb 10.129.228.111
Command Output
SMB 10.129.228.111 445 MONTEVERDE [*] Windows 10 / Server 2019 Build 17763 x64 (name:MONTEVERDE) (domain:MEGABANK.LOCAL) (signing:True) (SMBv1:False)
The SMB signing is enabled, so an operator could not relay a victim authentication over SMB to the SMB Server
Said that, let’s start by adding the hostname and domain name to the /etc/hosts file in order to be able to perform certain attacks that envolves kerberos.
Since this service is closely related to DNS, we must reference the target using its hostname instead of the IP Address
Since we already have a valid user list, let’s perform a kerberos-related attack
88 - Kerberos
Other times, when we could not get a foothold in the domain through null authentication, we have to leverage some kerberos error on the KDC responses in order to get valid user accounts
Impacket v0.12.0 - Copyright Fortra, LLC and its affiliated companies[-] User AAD_987d7f2f57d2 doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User dgalanos doesn't have UF_DONT_REQUIRE_PREAUTH set[-] Kerberos SessionError: KDC_ERR_CLIENT_REVOKED(Clients credentials have been revoked)[-] User mhope doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User roleary doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User SABatchJobs doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User smorgan doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User svc-ata doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User svc-bexec doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User svc-netapp doesn't have UF_DONT_REQUIRE_PREAUTH set
All above user accounts do not have the USER_DONT_REQ_PREAUTH flag enabled on their UserAccountControl attribute. So, we will not receive any encrypted part from the AS_REP, which is encryped with a key derived from the user account password
The previous impacket tool returns the hash in hashcat or john format if any of the provided users is susceptible to ASREPRoast
Password Bruteforce
Right now, there is not much we can do except from enumerate LDAP
But, before that, let’s perform an SMB Bruteforce attack by providing as user and password list the same file
An operator must check the domain password policy to be aware of permanent or temporal account blocks
Let’s check if we can list this information via the null authentication
As authenticated users, we can list all Service Principal Names (SPNs) registered in the domain. A domain account becomes a service account when it has one or more SPNs registered
Likewise, we can request a service ticket (ST) for an specific SPN to the Ticket Granting Server (TGS) of the Key Distribution Center (KDC)
Then, we receive a TGS_REP which contains basically two elements →
Service Ticket (ST)
It contains the Privilege Attribute Certificate (PAC) related to the user who requested the service ticket and the Session Key of the service ticket. This session key is used in the subsequent AP_REQ to encrypt the authenticator (timestamp)
The encrypted part of the service ticket is protected using a key derived from the service account password
Encrypted Part
It only contains the session key of the service ticket and it is encrypted using the session key of the presented Ticket Granting Ticket during the AS Exchange
Therefore, the kerberos client could decrypt this enc_part using the TGT’s session key
This is because the client cannot decrypt the service ticket as it is encrypted using a key derived from the service account password, so it only can obtain the session key by decrypting the encrypted part with the TGT’s session key
Impacket v0.12.0 - Copyright Fortra, LLC and its affiliated companiesNo entries found!
But there are no SPNs for any domain user account
Take into account that it is always easier to crack passwords for user accounts than for computer accounts as the latter are randomly generated by default and, therefore, more complex
We can also extract all domain Service Principal Names via LDAP as follows
[+] IP: monteverde:445 Name: unknown Disk Permissions Comment ---- ----------- ------- ADMIN$ NO ACCESS Remote Admin azure_uploads READ ONLY C$ NO ACCESS Default share E$ NO ACCESS Default share IPC$ READ ONLY Remote IPC NETLOGON READ ONLY Logon server share SYSVOL READ ONLY Logon server share users$ READ ONLY
There are three interesting shares →
SYSVOL
By default, this share is accesible to all authenticated users. It may contains some sensitive information such as plain passwords within a groups.xml file (Group Policy Preferences)
It is always recommended to inspect this share. I prefer to do this either using SMBMap or by mouting it
[+] IP: monteverde:445 Name: unknown Disk Permissions Comment SYSVOL READ ONLY .\SYSVOL\* dr--r--r-- 0 Thu Jan 2 23:05:27 2020 . dr--r--r-- 0 Thu Jan 2 23:05:27 2020 .. dr--r--r-- 0 Thu Jan 2 23:05:27 2020 MEGABANK.LOCAL .\SYSVOL\MEGABANK.LOCAL\* dr--r--r-- 0 Thu Jan 2 23:11:34 2020 . dr--r--r-- 0 Thu Jan 2 23:11:34 2020 .. dr--r--r-- 0 Sat Oct 4 20:46:45 2025 DfsrPrivate dr--r--r-- 0 Thu Jan 2 23:05:27 2020 Policies dr--r--r-- 0 Thu Jan 2 23:05:27 2020 scripts .\SYSVOL\MEGABANK.LOCAL\Policies\* dr--r--r-- 0 Thu Jan 2 23:05:27 2020 . dr--r--r-- 0 Thu Jan 2 23:05:27 2020 .. dr--r--r-- 0 Thu Jan 2 23:05:27 2020 {31B2F340-016D-11D2-945F-00C04FB984F9} dr--r--r-- 0 Thu Jan 2 23:05:27 2020 {6AC1786C-016F-11D2-945F-00C04fB984F9} .\SYSVOL\MEGABANK.LOCAL\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\* dr--r--r-- 0 Thu Jan 2 23:05:27 2020 . dr--r--r-- 0 Thu Jan 2 23:05:27 2020 .. fr--r--r-- 22 Fri Jan 3 13:47:23 2020 GPT.INI dr--r--r-- 0 Fri Jan 3 13:47:06 2020 MACHINE dr--r--r-- 0 Thu Jan 2 23:05:27 2020 USER .\SYSVOL\MEGABANK.LOCAL\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\* dr--r--r-- 0 Fri Jan 3 13:47:06 2020 . dr--r--r-- 0 Fri Jan 3 13:47:06 2020 .. dr--r--r-- 0 Thu Jan 2 23:05:27 2020 Microsoft fr--r--r-- 2792 Thu Jan 2 23:17:56 2020 Registry.pol dr--r--r-- 0 Fri Jan 3 13:47:06 2020 Scripts .\SYSVOL\MEGABANK.LOCAL\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Microsoft\* dr--r--r-- 0 Thu Jan 2 23:05:27 2020 . dr--r--r-- 0 Thu Jan 2 23:05:27 2020 .. dr--r--r-- 0 Thu Jan 2 23:05:27 2020 Windows NT .\SYSVOL\MEGABANK.LOCAL\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Scripts\* dr--r--r-- 0 Fri Jan 3 13:47:06 2020 . dr--r--r-- 0 Fri Jan 3 13:47:06 2020 .. dr--r--r-- 0 Fri Jan 3 13:47:06 2020 Shutdown dr--r--r-- 0 Fri Jan 3 13:47:06 2020 Startup .\SYSVOL\MEGABANK.LOCAL\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\* dr--r--r-- 0 Thu Jan 2 23:05:27 2020 . dr--r--r-- 0 Thu Jan 2 23:05:27 2020 .. fr--r--r-- 22 Thu Jan 2 23:26:34 2020 GPT.INI dr--r--r-- 0 Thu Jan 2 23:05:27 2020 MACHINE dr--r--r-- 0 Thu Jan 2 23:05:27 2020 USER .\SYSVOL\MEGABANK.LOCAL\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\* dr--r--r-- 0 Thu Jan 2 23:05:27 2020 . dr--r--r-- 0 Thu Jan 2 23:05:27 2020 .. dr--r--r-- 0 Thu Jan 2 23:05:27 2020 Microsoft .\SYSVOL\MEGABANK.LOCAL\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\* dr--r--r-- 0 Thu Jan 2 23:05:27 2020 . dr--r--r-- 0 Thu Jan 2 23:05:27 2020 .. dr--r--r-- 0 Thu Jan 2 23:05:27 2020 Windows NT
But there is nothing interesting
azure_uploads
Judging by its name, it would be better to have write permission on it, so we could upload a malicious shell command file (SCF) with an icon reference pointing to an SMB Server controlled by us
Then, we could receive an authentication over SMB from the target if any user access to the local folder or share
But we only have read permissions, let’s what it contains
[*] Connecting to host...[*] Binding to host[+] Bind OK[*] Starting domain dump[+] Domain dump finished
Next, setup an HTTP server in order to inspect the content of the generated files from the browser
python3 -m http.server 80
Users
The mhope user belongs to the Remote Management Users, which means that we can authenticate as him in order to establish a WinRM session to the DC and gain local access
Likewise, this user account belongs to the group Azure Admins. So now we know that some Azure solution has been deployed recently on the DC
From here, we should take into account things such as Azure AD Connect, Azure stored access tokens and so on. We can dig into it later when we access to the machine remotely
In the other hand, there are users that belong to non-standard groups (operations, helpdesk & trading), namely, smorgan, roleary and dgalanos
Let’s see if there is any nested group membership related to these groups
Users by Groups
Shell as System User
Since there is not much interesting information, let’s connect to the DC via WinRM and see what we can do
Evil-WinRM shell v3.5Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machineData: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completionInfo: Establishing connection to remote endpoint*Evil-WinRM* PS C:\Users\mhope\Documents>
Privesc
Initial Non-Privileged User → mhope
Extracting Azure AD Connect Credentials located on SQL Server Database
First, let’s list the privileges associated to the current access token
whoami /priv
Command Output
PRIVILEGES INFORMATIONPrivilege Name Description State============================= ============================== =======SeMachineAccountPrivilege Add workstations to domain EnabledSeChangeNotifyPrivilege Bypass traverse checking EnabledSeIncreaseWorkingSetPrivilege Increase a process working set Enabled
None interesting
It is not necessary to list the groups to which the user belongs as we already know that
We can check for stored credentials on Windows Vaults protected by the Data Protection API (DPAPI)
Before running system scanning tools such as PowerUp.ps1 or WinPEAS, let’s explore the Program Files and Program Files (x86) directories to look for interesting installed/deployed software
dir "C:\PROGRA~1"
Command Output
Directory: C:\Program FilesMode LastWriteTime Length Named----- 1/2/2020 9:36 PM Common Filesd----- 1/2/2020 2:46 PM internet explorerd----- 1/2/2020 2:38 PM Microsoft Analysis Servicesd----- 1/2/2020 2:51 PM Microsoft Azure Active Directory Connectd----- 1/2/2020 3:37 PM Microsoft Azure Active Directory Connect Upgraderd----- 1/2/2020 3:02 PM Microsoft Azure AD Connect Health Sync Agentd----- 1/2/2020 2:53 PM Microsoft Azure AD Syncd----- 1/2/2020 2:38 PM Microsoft SQL Serverd----- 1/2/2020 2:25 PM Microsoft Visual Studio 10.0d----- 1/2/2020 2:32 PM Microsoft.NETd----- 1/3/2020 5:28 AM PackageManagementd----- 1/2/2020 9:37 PM VMwared-r--- 1/2/2020 2:46 PM Windows Defenderd----- 1/2/2020 2:46 PM Windows Defender Advanced Threat Protectiond----- 9/15/2018 12:19 AM Windows Maild----- 1/2/2020 2:46 PM Windows Media Playerd----- 9/15/2018 12:19 AM Windows Multimedia Platformd----- 9/15/2018 12:28 AM windows ntd----- 1/2/2020 2:46 PM Windows Photo Viewerd----- 9/15/2018 12:19 AM Windows Portable Devicesd----- 9/15/2018 12:19 AM Windows Securityd----- 1/3/2020 5:28 AM WindowsPowerShell
And there is a bunch of Azure AD stuff
As mentioned earlier, one that stands out from the rest is the Microsoft Azure AD Sync
The presence of this directory indicates that a synchronization may have occurred between on-premise AD and Azure using a type of Replication Directory Service (DRS) mechanism
This is related to Azure AD Connect. During its setup, an MSSQL database is created, which, in older versions, stored encrypted credentials that could be decrypted
Likewise, a privilege user account with a MSOL_ prefix is created and granted with DCSync-related rights over the domain object, namely Get-Changes and Get-Changes-All
The community created several tools that automate the database credential extraction and decryption
Evil-WinRM shell v3.5Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machineData: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completionInfo: Establishing connection to remote endpoint*Evil-WinRM* PS C:\Users\Administrator\Documents>