Created
May 28, 2020 08:44
-
-
Save shuax/30863707072208d46fec6aa7f251067f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cryptography.hazmat.primitives.ciphers.aead import AESGCM | |
import base64 | |
# https://github.com/chromium/chromium/blob/master/components/os_crypt/os_crypt_win.cc | |
# Local State -> os_crypt.encrypted_key | |
# start with "DPAPI" | |
encrypted_key = "RFBBUElHFVPkvx6wPkLGBufud/s3Mjg5QwQqbPJ3kTB7aajsZw==" | |
encrypted_key = base64.b64decode(encrypted_key)[5:] | |
print('encrypted_key', encrypted_key, len(encrypted_key)) | |
# Default/Login Data -> logins | |
# start with "v10" | |
password_value = "76313073d2d9e7c225ad0c6d9197d36ee3a3cc254a239890482a537e631e722ce0af88cd74" | |
password_value = bytes.fromhex(password_value)[3:] | |
print('password_value', password_value, len(password_value)) | |
nonce = password_value[:12] | |
data = password_value[12:] | |
print('nonce', nonce, len(nonce)) | |
print('data', data, len(data)) | |
aesgcm = AESGCM(encrypted_key) | |
password = aesgcm.decrypt(nonce, data, b'') | |
print(password) |
Author
shuax
commented
May 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment