示例#1
0
文件: SAPLPS.py 项目: 5l1v3r1/pysap
    def decrypt_encryption_key_dpapi(self):
        """Decrypts the encryption key using the DP API. The key is encrypted using
        the DP API without any additional entropy.

        :return: Encryption key decrypted
        :rtype: string
        """
        log_lps.debug("Obtaining encryption key with DPAPI LPS mode")

        return dpapi_decrypt_blob(self.encrypted_key)
示例#2
0
    def decrypt_encryption_key_dpapi(self):
        """Decrypts the encryption key using the DP API. The key is encrypted using
        the DP API without any additional entropy.

        :return: Encryption key decrypted
        :rtype: string
        """
        log_lps.debug("Obtaining encryption key with DPAPI LPS mode")

        return dpapi_decrypt_blob(self.encrypted_key)
示例#3
0
    def decrypt_MSCryptProtect(plain, cred):
        """Decrypts a credential using the Windows DP API. Requires the current
        logged-in user to have permissions to decrypt the blob stored in the
        credentials file.

        :param plain: plain credential extracted
        :type plain: SAPCredv2_Cred_Plain

        :param cred: credential from where the blob was extracted
        :type cred: SAPCredv2_Cred

        :return: the content in the blob decrypted using the provider
        :rtype: string
        """
        entropy = cred.pse_path
        return dpapi_decrypt_blob(unhexlify(plain.blob.val), entropy)