Cookies: konnte nicht in der Lage sein, Chrom- / Kanten -V20 -Cookies mithilfe der AES -Entschlüsselung in Python zu extPython

Python-Programme
Anonymous
 Cookies: konnte nicht in der Lage sein, Chrom- / Kanten -V20 -Cookies mithilfe der AES -Entschlüsselung in Python zu ext

Post by Anonymous »

Problem: Lesen Sie die Chrom- /Edge-Cookies zum Extrahieren der XSRF-TOOKE- und .aspnet.cookies-Werte eines Benutzers im Browser, der von einer Desktop-Anwendung gestartet wurde, und speichern Sie sie in den Registrierungsschlüssel < /p>
Ich habe den folgenden Code verwendet und es funktionierte in den letzten 2 Monaten gut und plötzlich ein Tag zurück, konnte geheimer Schlüssel wie asusual extrahieren, aber Initialisierungsvektor und verschlüsseltes Passwort scheint anders zu sein als früher, beide Schlüssel scheint extrahieren zu sein, aber mit dem Problem konfrontiert:

Code: Select all

'utf-8' codec can't decode byte 0xf0 in position 0: invalid continuation byte

Aufgrund der unauftragten Wertentwicklung beziehen sich die Werte nach dem Code.

Code: Select all

import os
import win32crypt
from Crypto.Cipher import AES
import base64
import sqlite3
import json
import winreg as reg

#Extracting the secret key
def get_aes_key():
local_state_path = 'C:/Users//AppData/Local/Google/Chrome/User Data/Local state' # Update with your path
with open(local_state_path, 'r', encoding='utf-8') as f:
local_state_data = json.load(f)
encrypted_key = local_state_data['os_crypt']['encrypted_key']
print(encrypted_key)
encrypted_key_base64_dpapi = base64.b64decode(encrypted_key)
print(encrypted_key_base64_dpapi)
encrypted_key_base64 = encrypted_key_base64_dpapi[5:]  # Strip 'DPAPI' prefix
encrypted_key_base64 = win32crypt.CryptUnprotectData(encrypted_key_base64, None, None, None, 0)[1]
aes_key = encrypted_key_base64  # Strip DPAPI prefix
return aes_key

def decrypt_payload(cipher, payload):
return cipher.decrypt(payload)

def generate_cipher(aes_key, iv):
return AES.new(aes_key, AES.MODE_GCM, iv)

# Function to decrypt cookie value using AES
def decrypt_aes(dec_aes_key, encrypted_data):
try:
# (3-a) Initialisation vector for AES decryption
initialisation_vector = encrypted_data[3:15]
# (3-b) Get encrypted password by removing suffix bytes (last 16 bits)
# Encrypted password is 192 bits
encrypted_password = encrypted_data[15:-16]
# (4) Build the cipher to decrypt the ciphertext
cipher = generate_cipher(dec_aes_key, initialisation_vector)
decrypted_pass = decrypt_payload(cipher, encrypted_password)
decrypted_pass = decrypted_pass.decode()
return decrypted_pass
except Exception as e:
print("%s" % str(e))
print("[ERR] Unable to decrypt, Chrome version  QT 2 x 00bVi\xexeeexee-xx12+\txex16x \xb\xb\xk\xk\xb\txxe\xox13xox13ox13\xox13x \xb\xe\xe\xe\xe\x99;\xe\x \x99;\xe\x \ 's \ xx xel8cwcwcw [1 2 %\ txedc \ x0b/r \ xe1 \ xe1 \ xe1 \ xe1 \ xe8 \ x  _y \ x0x \ xu-xcd \ xd1 \ xd1 \ xx90@" Br /> [code]**initialisation_vector--** b'>QT\xc3.A^E\x85\xc6c+'

Code: Select all

**encrypted_password--** b"\xac\x0eT\xa3z\xe4\x94\xaa!\x83\x99?\x1e\x04\xdd\x1ad\xbc\x15\r\xf7\x18\x86-\x0bVi\xae\xe8\x0b\x12\x16\xf9+\xb5\xcb\xf8I\x8d\xa9\x1ez\x13\x1fwt\xa5\xb2\x8e\x1dW\xfd\xa1\x99;\xe1\xdc\x8cw[\x05\xd72z\xbfHNm\x05\xcb\x02\xc1\xf5\r\xdd\x9d\xfe\x80\r\x9a:\x81\xcc\x88\xd7-uj\xfe\x9c\xe1\x19\xeb\xbb?@ \x17\xa2\xd1\x87\xc6\xba\x8b\r'\xf1n\r\x1e\x0bK\xad-\xa3r\x1c4d\x93\x14\x9ae\xbca\xfc\xce%\xedc\xf6\x0b/R\xe1\xa1\xe8\xb9\x02
_y \ x01 \ xcd \ xe4 \ xd1 \ x90@"` `
Erwartet xsrf-token: C4TOBVGDJNTXFLRFI287T5B_SANAH9YQSHVKPPURST510CJXGT05IU9RLJIBFMNU-IU4CRK- XyrZ7iOJSugxlKFukH8hDyJ--Gv_F6AUqIo6bFJ1i-10cu7bkZ4hLEvfhdk2q08tKyTn7e6oDfQ6nLicSoKIWjuPvEutpZIZQyK4li32GPirk_ysUKolUbLrl2AjwPVFrCZbgil8yHKyNrmAveY1b0lNNzsDljzsfF_TMLZazpYbbIvEarQuPe6wkL8sQuT-L9YpitNpeW8Wvfgyj96EWCbQ
Can someone please point out what's am missing? or the edge/chrome updated their encryption ?
Im Moment scheint das Verschlüsselungs -Update mit V20 zu beginnen, in dem der Cookie -Verschlüsselungsstandard von V10 bis V20 aktualisiert wurde, seit Chrome Version 127. /ohyicong.medium.com/how-to-hack-crome-password-with-python-1bedc167be3d

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post