Пример #1
0
 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()
Пример #2
0
 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()
Пример #3
0
 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()
Пример #4
0
 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])
Пример #5
0
 def test_aes128(self):
     cred = KerberosCredential()
     cred.username = self.username
     salt = (self.domain.upper() + self.username).encode()
     cred.kerberos_key_aes_128 = string_to_key(Enctype.AES128,
                                               self.password.encode(),
                                               salt).contents.hex()
     cred.domain = self.domain
     kcomm = KerbrosComm(cred, self.kerberos_socet)
     kcomm.get_TGT()
     kcomm.get_TGS(self.target)