Page cover

HTB - Monteverde

Machine Info

Monteverde is a Medium Windows machine that features Azure AD Connect. The domain is enumerated and a user list is created. Through password spraying, the SABatchJobs service account is found to have the username as a password. Using this service account, it is possible to enumerate SMB Shares on the system, and the $users share is found to be world-readable. An XML file used for an Azure AD account is found within a user folder and contains a password. Due to password reuse, we can connect to the domain controller as mhope using WinRM. Enumeration shows that Azure AD Connect is installed. It is possible to extract the credentials for the account that replicates the directory changes to Azure (in this case the default domain administrator).

Enumeration


Scope

IP Address: 10.10.10.172

Nmap Scan

┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ nmap -p- --min-rate 10000 $ip -Pn 

PORT     STATE SERVICE          REASON
53/tcp   open  domain           syn-ack
88/tcp   open  kerberos-sec     syn-ack
135/tcp  open  msrpc            syn-ack
139/tcp  open  netbios-ssn      syn-ack
389/tcp  open  ldap             syn-ack
445/tcp  open  microsoft-ds     syn-ack
464/tcp  open  kpasswd5         syn-ack
636/tcp  open  ldapssl          syn-ack
3269/tcp open  globalcatLDAPssl syn-ack
5985/tcp open   wsman           syn-ack                                                                      
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ sudo nmap -sU $ip --min-rate 10000 --open -v -oN udp-scan -p1-10000

PORT    STATE SERVICE
53/udp  open  domain
88/udp  open  kerberos-sec
123/udp open  ntp
389/udp open  ldap        

┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ nmap -p -sCV $ip -Pn -oN Nmap/script-scan

PORT     STATE SERVICE       VERSION
53/tcp   open  domain        Simple DNS Plus
88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2024-07-10 14:21:34Z)
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: MEGABANK.LOCAL0., Site: Default-First-Site-Name)
445/tcp  open  microsoft-ds?
464/tcp  open  kpasswd5?
636/tcp  open  tcpwrapped
3269/tcp open  tcpwrapped
Service Info: Host: MONTEVERDE; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
| smb2-security-mode: 
|   3:1:1: 
|_    Message signing enabled and required
| smb2-time: 
|   date: 2024-07-10T14:21:46
|_  start_date: N/A
|_clock-skew: 5s

DNS Enumeration

No zone transfer

RPC Enumeration

Got a list of usernames from rpcclient, then filter and add the output to a list

SMB Enumeration

No thing found after trying enumerating smb

KERBEROS Enumeration

I attempted ASREP-Roasting attack but failed

Initial Access


After I run all options I know, I tried password spraying with the name usernames as passwords

List the shares on the box and permissions we have on each one with crackmapexec and list the content of available share with spider_plus module

Download that Interesting file

I found a password 4n0therD4y@n0th3r$ and I give it a try of the usernames list I have

We got a valid credential, Let's see if we have remote access to the box

Yes. we have :)

User Flag: 91d393fd513501e700cxxxxxxxxxxxxx


Privilege Escalation

Useful Post: Azure AD Connect for Red Teamers - XPN InfoSec Blog (xpnsec.com)

  • Modify the connection string line with the following argument:

    • Server=127.0.0.1

    • Database=DCSync

    • Integrated Security=True

Root Flag: bb3e0436d4588c2baxxxxxxxxxxxxx

Last updated