diff --git a/examples/GetNPUsers.py b/examples/GetNPUsers.py index 61203dfa8d..7e0f51b457 100755 --- a/examples/GetNPUsers.py +++ b/examples/GetNPUsers.py @@ -130,7 +130,7 @@ def getTGT(self, userName, requestPAC=True): asReq = AS_REQ() domain = self.__domain.upper() - serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_PRINCIPAL.value) + serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_SRV_INST.value) pacRequest = KERB_PA_PAC_REQUEST() pacRequest['include-pac'] = requestPAC diff --git a/examples/getPac.py b/examples/getPac.py index 2859a8df84..a3ad4cebe8 100755 --- a/examples/getPac.py +++ b/examples/getPac.py @@ -231,7 +231,7 @@ def dump(self): reqBody['kdc-options'] = constants.encodeFlags(opts) serverName = Principal(self.__username, type=constants.PrincipalNameType.NT_UNKNOWN.value) - #serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_PRINCIPAL.value) + #serverName = Principal('krbtgt/%s' % domain, type=constants.PrincipalNameType.NT_SRV_INST.value) seq_set(reqBody, 'sname', serverName.components_to_asn1) reqBody['realm'] = str(decodedTGT['crealm']) diff --git a/examples/goldenPac.py b/examples/goldenPac.py index 6b6b55d0eb..b9baaa6d5c 100755 --- a/examples/goldenPac.py +++ b/examples/goldenPac.py @@ -980,7 +980,7 @@ def exploit(self): authTime = encASRepPart['authtime'] serverName = Principal('krbtgt/%s' % self.__domain.upper(), - type=constants.PrincipalNameType.NT_PRINCIPAL.value) + type=constants.PrincipalNameType.NT_SRV_INST.value) tgs, cipher, oldSessionKey, sessionKey = self.getKerberosTGS(serverName, domain, self.__kdcHost, tgt, cipher, sessionKey, authTime) diff --git a/impacket/krb5/kerberosv5.py b/impacket/krb5/kerberosv5.py index f516c8afec..37a6ca4162 100644 --- a/impacket/krb5/kerberosv5.py +++ b/impacket/krb5/kerberosv5.py @@ -114,7 +114,7 @@ def getKerberosTGT(clientName, password, domain, lmhash, nthash, aesKey='', kdcH asReq = AS_REQ() domain = domain.upper() - serverName = Principal('krbtgt/%s'%domain, type=constants.PrincipalNameType.NT_PRINCIPAL.value) + serverName = Principal('krbtgt/%s'%domain, type=constants.PrincipalNameType.NT_SRV_INST.value) pacRequest = KERB_PA_PAC_REQUEST() pacRequest['include-pac'] = requestPAC