Box
- Name: Monteverde
- Profile: www.hackthebox.eu
- Difficulty: Medium
- OS: Windows
- Points: 30
Write-up
Overview
- Network enumeration: SMB enumeration
- Network reconnaissance: SMB share & Azure AD Connect config & credential stuffing
- Elevation of privilege: mhope to Administrator: hidden folder & Azure AD Connect credentials decryption
Install tools used on BlackArch Linux:
Network enumeration
I ran a nmap port scan to discover open ports:
And then did a service discovery and script scan with nmap again on open
ports.
Let's see what we can find through SMB with CrackMapExec, enum4linux
and GetNPUsers.py
from impacket.
Thanks to enum4linux, we now have all users and groups information we need.
Let's try a quick bruteforce where user = password with CrackMapExec.
Network reconnaissance
We found the password SABatchJobs
use the username as password.
Let's use this account for enumerating some shares:
Let's find is there are valuable files in users$
share.
Let's read /mhope/azure.xml
:
It seems a password is leaked, let's try credential stuffing: maybe we can
re-use one of the accounts.
Cool mhope
is using this password too.
As winRM port is open, we can authenticate and gain shell access with
evil-winrm.
Elevation of privilege: mhope to Administrator
Then there is a hidden folder:
We have azure powershell already loaded https://github.com/Azure/azure-powershell
There is great resources and tools about exploiting Azure AD Connect.
You can fidn a pre-compiled version of AdSyncDecrypt
here.