Hackthebox - Monteverde

  • Windows

Monteverde

Nmap

Analysis from nmap scan

  • Here are the infos we get from nmap

    • The domain name is MEGABANK

    • The host name is MONTEVERDE

  • What can we do

    • SMB enumeration

    • Kerberos enumeration

    • HTTP (port 5985) enumeration

    • DNS enumeration

    • ldap emumeration

Enumeration

Enum4linux

Enum4linux gave back lots of info. We got a user list from it (usename and full name). It is worth keeping them aside in a txt file.

Ldap

ldapsearch-ad

HTTP on port 5985

  • Gobuster does not give anything useful

Password spraying with users list

  • One thing to try is to do password spraying and use the users we found as the list for users AND passwords. It could work.

  • We do get a valid pair of creds MEGABANK.LOCAL\SABatchJobs:SABatchJobs and a list of the smb shares.

SMB

  • Let's check these shares

  • The share azure-uploads is empty azure uploads

  • No luck with IPC$, NETLOGON

  • We get something with SYSVOL sysvol

  • And also with users$ users

users$

  • In mhope folder we have an azure.xml file we can take it for further analysis using get azure.xml

Azure.xml

  • This file contains a password 4n0therD4y@n0th3r$

  • Here is the full file

Password spray with the password just found

  • Using crackmapexec again we find out that this is mhope password

mhope
  • So we have another pair of credentials mhope:4n0therD4y@n0th3r$

Shell as mhope

  • Using evil-winrm, we get a shell as mhope evil-winrm -i 10.10.10.172 -u mhope -p '4n0therD4y@n0th3r$'

  • We can get the user shell

Privesc

  • There are a some folders and programs related to Azure. Our user is a member of the Azure Admins group.

Azure admins
  • This blog has an interesting script to use Microsoft Azure Active Directory Connect

  • I can take the script and upload it using upload script.ps1 this will fetch the creds from the db ( I hope so :D )

  • We had to change the connection String 0xdf explains it on their writeup here

  • And it works. We get creds for the administrator administrator:d0m@in4dminyeah!

Admin creds
  • Now let's try to connect as Administrator using evil-winrm evil-winrm -i 10.10.10.172 -u Administrator -p 'd0m@in4dminyeah!'

  • It works we can grab the root flag

root

Resources

Last updated