Skip to content

Commit f1608bd

Browse files
committed
Fixing Kerberos Name Type in AS requests
1 parent f4b848f commit f1608bd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/GetNPUsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def getTGT(self, userName, requestPAC=True):
130130
asReq = AS_REQ()
131131

132132
domain = self.__domain.upper()
133-
serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
133+
serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_SRV_INST.value)
134134

135135
pacRequest = KERB_PA_PAC_REQUEST()
136136
pacRequest['include-pac'] = requestPAC

examples/getPac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def dump(self):
231231
reqBody['kdc-options'] = constants.encodeFlags(opts)
232232

233233
serverName = Principal(self.__username, type=constants.PrincipalNameType.NT_UNKNOWN.value)
234-
#serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
234+
#serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_SRV_INST.value)
235235

236236
seq_set(reqBody, 'sname', serverName.components_to_asn1)
237237
reqBody['realm'] = str(decodedTGT['crealm'])

examples/goldenPac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ def exploit(self):
980980
authTime = encASRepPart['authtime']
981981

982982
serverName = Principal('krbtgt/%s' % self.__domain.upper(),
983-
type=constants.PrincipalNameType.NT_PRINCIPAL.value)
983+
type=constants.PrincipalNameType.NT_SRV_INST.value)
984984
tgs, cipher, oldSessionKey, sessionKey = self.getKerberosTGS(serverName, domain, self.__kdcHost, tgt,
985985
cipher, sessionKey, authTime)
986986

impacket/krb5/kerberosv5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def getKerberosTGT(clientName, password, domain, lmhash, nthash, aesKey='', kdcH
114114
asReq = AS_REQ()
115115

116116
domain = domain.upper()
117-
serverName = Principal('krbtgt/%s'%domain, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
117+
serverName = Principal('krbtgt/%s'%domain, type=constants.PrincipalNameType.NT_SRV_INST.value)
118118

119119
pacRequest = KERB_PA_PAC_REQUEST()
120120
pacRequest['include-pac'] = requestPAC

0 commit comments

Comments
 (0)