def test_plaintext(self): cred = KerberosCredential() cred.username = self.username cred.password = self.password cred.domain = self.domain kcomm = KerbrosComm(cred, self.kerberos_socet) kcomm.get_TGT() kcomm.get_TGS(self.target)
def test_rc4(self): cred = KerberosCredential() cred.username = self.username salt = (self.domain.upper() + self.username).encode() cred.kerberos_key_rc4 = hashlib.new( 'md4', self.password.encode('utf-16-le')).hexdigest() cred.domain = self.domain kcomm = KerbrosComm(cred, self.kerberos_socet) kcomm.get_TGT() kcomm.get_TGS(self.target)
def test_aes256_override(self): cred = KerberosCredential() cred.username = self.username salt = (self.domain.upper() + self.username).encode() cred.kerberos_key_aes_256 = string_to_key(Enctype.AES256, self.password.encode(), salt).contents.hex() cred.domain = self.domain kcomm = KerbrosComm(cred, self.kerberos_socet) kcomm.get_TGT() kcomm.get_TGS(self.target, override_etype=[2, 3, 16, 23, 17, 18])
def test_des(self): cred = KerberosCredential() cred.username = self.username salt = (self.domain.upper() + self.username).encode() cred.kerberos_key_des = string_to_key(Enctype.DES_MD5, self.password.encode(), salt).contents.hex() cred.domain = self.domain kcomm = KerbrosComm(cred, self.kerberos_socet) kcomm.get_TGT() kcomm.get_TGS(self.target)