From 93df4bb05e958735210eea5f7096642a975cc001 Mon Sep 17 00:00:00 2001 From: AlessandroZ Date: Sat, 13 May 2017 01:46:04 +0200 Subject: [PATCH] credman error fixed --- Windows/lazagne/softwares/windows/credman.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Windows/lazagne/softwares/windows/credman.py b/Windows/lazagne/softwares/windows/credman.py index 0ebb2df3..c62530ab 100755 --- a/Windows/lazagne/softwares/windows/credman.py +++ b/Windows/lazagne/softwares/windows/credman.py @@ -11,30 +11,18 @@ def __init__(self): # entropy = 'abe2869f-9b47-4cd9-a358-c22904dba7f7\0' # FOR CRED_TYPE_GENERIC # entropy = '82BD0E67-9FEA-4748-8672-D5EFE5B779B0\0' # FOR CRED_TYPE_DOMAIN_VISIBLE_PASSWORD - def run(self, software_name = None): + def run(self, software_name = None): pwdFound = [] creds = POINTER(PCREDENTIAL)() count = c_ulong() - print_debug('DEBUG', 'Run Credential manager function') if CredEnumerate(None, 0, byref(count), byref(creds)) == 1: - print_debug('DEBUG', 'CredEnumerate executed successfully') - print_debug('DEBUG', 'cound variable: %s' % str(count)) - print_debug('DEBUG', 'Number of value: %s' % str(count.value)) for i in range(count.value): - print_debug('DEBUG', 'cred[i] variable: %s' % str(creds[i])) c = creds[i].contents - print_debug('DEBUG', 'c variable: %s' % str(c)) if c.Type == CRED_TYPE_GENERIC or c.Type == CRED_TYPE_DOMAIN_VISIBLE_PASSWORD: - print_debug('DEBUG', 'value to decrypt found') # For XP: # - password are encrypted with specific salt depending on its Type # - call CryptUnprotectData(byref(blobIn), None, byref(blobEntropy), None, None, CRYPTPROTECT_UI_FORBIDDEN, byref(blobOut)) - print_debug('DEBUG', 'target: %s' % str(c.TargetName)) - print_debug('DEBUG', 'username: %s' % str(c.UserName)) - print_debug('DEBUG', 'password: %s' % str(c.CredentialBlob)) - print_debug('DEBUG', 'size of the password: %s' % str(c.CredentialBlobSize.real)) - print_debug('DEBUG', 'everything ok') pwdFound.append( { 'URL' : c.TargetName, @@ -42,9 +30,5 @@ def run(self, software_name = None): 'Password' : c.CredentialBlob[:c.CredentialBlobSize.real].replace('\x00', '') } ) - print_debug('DEBUG', 'trying to free the handle') CredFree(creds) return pwdFound - - -