Forest is one of those boxes that feels like a guided tour through Active Directory attack fundamentals. No CVEs, no fancy exploits - just proper AD enumeration, a misconfigured service account, and a BloodHound-mapped path straight to domain admin.

Machine Info

FieldDetails
NameForest
PlatformHackTheBox
OSWindows
DifficultyEasy
IP10.129.5.64

TL;DR

SMB user enumeration reveals a service account with no Kerberos pre-auth required. AS-REP roasting gives us a crackable hash. Shell as svc-alfresco via WinRM. BloodHound maps a path through Exchange groups giving WriteDacl on the domain. We abuse that to grant DCSync, dump the Administrator hash, and psexec our way to SYSTEM.

Recon

nmap scan showing standard Active Directory ports open including 53, 88, 389, 445, 3268, and 5985

The port list is a dead giveaway: DNS (53), Kerberos (88), LDAP (389), SMB (445), Global Catalog (3268), WinRM (5985). This is a domain controller. The hostname is FOREST and the domain is htb.local.

Enumeration

With SMB accessible and no credentials yet, let’s see what we can enumerate without auth.

1
nxc smb 10.129.5.64 -u '' -p '' --users
nxc SMB user enumeration showing domain users including svc-alfresco, lucinda, andy, mark, and santi among others

Anonymous SMB gives us the full user list - this is more common than you’d expect on older AD environments. The interesting account here is svc-alfresco. Service accounts often have weaker configurations, and in this case it turns out to have a critical one.

Foothold

AS-REP Roasting

Kerberos pre-authentication is a setting that forces clients to prove they know the account’s password before the KDC will hand out a ticket. When it’s disabled on an account, anyone can request a ticket for that user and get an encrypted blob back - without knowing the password first. That blob can then be cracked offline.

1
impacket-GetNPUsers htb.local/ --no-pass -request -usersfile usersFiltered
impacket-GetNPUsers output showing svc-alfresco AS-REP hash captured for offline cracking

svc-alfresco doesn’t have UF_DONT_REQUIRE_PREAUTH set (meaning pre-auth IS disabled), so we get a Kerberos AS-REP hash back. John handles the rest.

john cracking the AS-REP hash with rockyou.txt, finding the password s3rvice

Password: s3rvice. WinRM is open on port 5985, let’s try it.

nxc winrm confirming svc-alfresco:s3rvice credentials work with Pwnd exclamation

We’re in.

Privilege Escalation

BloodHound Mapping

With a foothold, the next step is understanding the AD environment. BloodHound is the standard tool for this - it collects relationships between users, groups, computers and GPOs, then maps attack paths.

BloodHound-python collecting Active Directory data from the domain controller
1
bloodhound-python -u 'svc-alfresco' -p 's3rvice' -dc FOREST.htb.local -c all -ns 10.129.5.64 --dns-tcp
BloodHound attack path showing svc-alfresco through Service Accounts, Privileged IT Accounts, Account Operators to Exchange Windows Permissions with WriteDacl on HTB.LOCAL domain

The graph tells a clear story: svc-alfresco is a member of Service Accounts, which is inside Privileged IT Accounts, which gives membership in Account Operators. Account Operators can manage most groups - including Exchange Windows Permissions. And that group has WriteDacl on the HTB.LOCAL domain object.

WriteDacl on the domain means we can modify the domain’s ACL. Specifically, we can grant ourselves DCSync rights - the ability to replicate domain credentials as if we were another domain controller.

Abusing WriteDacl

Step one: add svc-alfresco to the Exchange Windows Permissions group.

net rpc command adding svc-alfresco to Exchange Windows Permissions group and verifying membership
1
2
net rpc group addmem "Exchange Windows Permissions" "svc-alfresco" \
  -U "htb.local/svc-alfresco%s3rvice" -S 10.129.5.64

Step two: use bloodyad to grant DCSync rights to our account.

bloodyad command granting DCSync rights to svc-alfresco on the htb.local domain
1
bloodyad --host 10.129.5.64 -d htb.local -u svc-alfresco -p s3rvice add dcsync svc-alfresco

DCSync and Pass-the-Hash

With DCSync rights in place, we can ask the domain controller to replicate the Administrator’s credentials to us using secretsdump.

secretsdump output dumping the Administrator NTLM hash from the domain controller
1
secretsdump.py htb.local/svc-alfresco:s3rvice@10.129.5.64 -just-dc-user Administrator

We have the Administrator NTLM hash. No need to crack it - pass-the-hash with psexec gets us a SYSTEM shell directly.

impacket-psexec using the Administrator hash to get a SYSTEM shell and reading root.txt
1
impacket-psexec Administrator@10.129.5.64 -hashes :32693b11e6aa90eb43d32c72a07ceea6

nt authority\system. Root flag on the desktop.

Takeaways

AS-REP roasting is low-hanging fruit in any AD assessment. Accounts with Kerberos pre-auth disabled hand you a crackable hash with zero credentials. Always run GetNPUsers against any user list you can enumerate.

BloodHound turns complex AD graphs into actionable paths. Without it, the chain from svc-alfresco through Exchange groups to WriteDacl on the domain would take hours to map manually. With it, it’s a five-minute read.

Exchange-related groups in AD are notorious for overprivileged ACLs. The Exchange Windows Permissions group existing with WriteDacl on the domain is a known design issue left behind by Exchange installations. Even in environments that have removed Exchange, these ACLs often linger.

References