This commit is contained in:
牟不懂哎
2026-06-01 16:34:09 +08:00
committed by GitHub
parent 970c0bad7d
commit c71c22f7d1
+41 -179
View File
@@ -1,145 +1,60 @@
# First
> 微信小程序安全调试工具 —— 基于 Frida + CDP 代理,支持 Windows / macOS 双平台,GUI 与 CLI 双模式
微信小程序安全调试工具 — Frida + CDP,支持 macOS / Windows
---
## 免责声明
## 截图预览
本工具仅供安全研究与学习使用,请勿用于未授权的目标,使用者须自行承担相关法律责任。
### 主界面
## 功能
![主界面](https://s1.galgame.fun/imgb/u0/20260408_69d655f49ca7e.png)
- Frida 注入微信,CDP 代理桥接 Chrome DevTools
- 云函数动态捕获(Hook wx.cloud.callFunction,参数修改重放)
- wx.* API 捕获(login / request / getUserProfile 等)
- 路由枚举与导航,跳转守卫检测
- wxapkg 解密解包 + 敏感信息扫描
- MCP Server 集成(AI 辅助分析)
- 偏移量 / Skills 在线更新
### 路由导航
## 截图
### 主页
![11071](https://s1.galgame.fun/imgb/u55/20260601_6a1d43338429a.png)
### 云函数捕获
![11069](https://s1.galgame.fun/imgb/u55/20260601_6a1d4333632a4.png)
### wx.api捕获
![11072](https://s1.galgame.fun/imgb/u55/20260601_6a1d43338219d.png)
### 反编译文件编辑搜索
![11073](https://s1.galgame.fun/imgb/u55/20260601_6a1d433372934.png)
### Frist-MCP
![11070](https://s1.galgame.fun/imgb/u55/20260601_6a1d433358324.png)
![11074](https://s1.galgame.fun/imgb/u55/20260601_6a1d43367a592.png)
### 自动更新
![11075](https://s1.galgame.fun/imgb/u55/20260601_6a1d433635554.png)
![路由导航](https://s1.galgame.fun/imgb/u0/20260408_69d6560ca1a39.png)
## 下载
### 云函数分析
[Releases](https://github.com/user/First/releases)
![云函数分析](https://s1.galgame.fun/imgb/u0/20260402_69ce527ca5480.png)
### 调试开关(JSRPC / wx.cloud 调用)
![调试开关](https://s1.galgame.fun/imgb/u0/20260408_69d6564195009.png)
### 敏感信息提取
![敏感信息提取-1](https://s1.galgame.fun/imgb/u55/20260416_69e0be0e1c1d7.png)
<img src="https://s1.galgame.fun/imgb/u55/20260416_69e0be0c38e39.png" alt="敏感信息提取-2" />
![敏感信息提取-3](https://s1.galgame.fun/imgb/u55/20260416_69e0be0c70d46.png)
---
## 功能特性
- Frida 动态注入微信客户端,转发小程序调试协议
- CDP 代理桥接,Chrome DevTools 直连调试
- 路由枚举、分类与一键跳转
- 云函数调用监控与参数分析(动态 Hook + 静态扫描)
- UserScript 自动注入(支持 URL 匹配、run-at 时机控制)
- wxapkg 解密解包 + 敏感信息扫描(IP / 密钥 / 云存储 / JWT 等)
- 深色 / 浅色主题切换
- GUI(PySide6)与 CLI 双模式
---
## 环境要求
| 依赖 | 版本 |
| 平台 | 文件 |
|------|------|
| Python | >= 3.10 |
| frida | >= 17.0.0 |
| websockets | >= 12.0 |
| protobuf | >= 4.0.0 |
| PySide6 | >= 6.5.0 |
| pycryptodome | 最新版 |
安装依赖:
```bash
pip install -r requirements.txt
```
---
| macOS (Apple Silicon) | `First-ARM.dmg` |
| macOS (Intel) | `First-Intel.dmg` |
| Windows | `First-Windows.zip` |
## 支持的微信版本
### Windows
**Windows** — WMPF: 11581 ~ 19823(推荐微信 4.1.0.30)- 后续自动更新
- WMPF 版本:11581, 11633, 13331, 13341, 13487, 13639, 13655, 13871, 13909, 14161, 14199, 14315, 16133, 16203, 16389, 16467, 16771, 16815, 16965, 17037, 17071, 17127, 18055, 18151, 18787, 18891, 18955, 19027, 19201
- 推荐微信版本:**4.1.0.30**
- 下载地址:[weixin/4.1.0.30](https://github.com/vs-olitus/wx-version/releases/tag/4.1.0.30)
**macOS** — WMPF: 17078, 18152, 18788(推荐微信 4.1.7.30)- 后续自动更新
### macOS
- WMPF 版本:18152, 18788
- 推荐微信版本:**4.1.7.30**
- 下载地址:[weixin/4.1.7.30](https://github.com/vs-olitus/wx-version/releases/tag/4.1.7.30)
---
微信历史版本下载:[wx-version](https://github.com/vs-olitus/wx-version/releases)
## 快速开始
### Windows
**一键启动:** 双击 `启动.bat`,首次运行会自动安装依赖。
**手动启动:**
```bash
python gui.py
```
### macOS
**一键启动:** 终端执行 `./启动.sh`,首次运行会自动安装依赖。
**手动启动:**
```bash
python3 gui.py
```
启动后在主界面点击 **启动调试**,然后再打开小程序即可(请勿在启动调试前打开小程序)。
### CLI 模式
```bash
# 默认端口启动
python main.py
# 自定义端口
python main.py --cdp-port 62000
# 开启详细日志
python main.py --debug-main --debug-frida
```
### 连接 Chrome DevTools
启动后,在 Chrome 地址栏输入:
```
devtools://devtools/bundled/inspector.html?ws=127.0.0.1:62000
```
---
## 服务号调试操作
1. 打开一个小程序页面作为占位(保持不关闭)
2. 访问需要调试的服务号内容(如 H5 网页)
![PixPin_2026-05-04_22-48-42](https://s1.galgame.fun/imgb/u55/20260504_69f8b299a7d85.png)
3. 在工具栏「服务」目标列表中找到目标网页,双击后切换至调试视图即可开始调试
![PixPin_2026-05-04_22-51-14](https://s1.galgame.fun/imgb/u55/20260504_69f8b299a7d94.png)
![PixPin_2026-05-04_22-51-39](https://s1.galgame.fun/imgb/u55/20260504_69f8b299a804b.png)
---
1. 打开 First
2. 点击启动 — Frida 自动注入微信
3. 在微信中打开小程序
4. 使用 DevTools / 云捕获 / 导航等功能
## macOS 注意事项
@@ -155,53 +70,7 @@ devtools://devtools/bundled/inspector.html?ws=127.0.0.1:62000
sudo codesign --force --deep --sign - /Applications/WeChat.app
```
---
## 参数说明
| 参数 | 默认值 | 说明 |
|------|--------|------|
| `--debug-port` | `9421` | 远程调试服务端口 |
| `--cdp-port` | `62000` | CDP 代理监听端口 |
| `--debug-main` | 关闭 | 输出主进程调试日志 |
| `--debug-frida` | 关闭 | 输出 Frida 客户端日志 |
| `--scripts-dir` | `./userscripts` | UserScript 目录路径 |
| `--script` | — | 指定单个 .js 文件注入(可多次使用) |
---
## UserScript 注入
将 `.js` 脚本放入 `userscripts/` 目录,启动时自动加载并注入。也可手动指定:
```bash
python main.py --script ./my_hook.js --script ./another.js
```
---
## 打包为可执行文件
```bash
pyinstaller WMPFDebugger.spec
```
---
## 常见问题
**Q: Frida 已连接,但小程序端显示未连接或无法断点调试?**
确认操作顺序无误后,尝试以下步骤:
1. 彻底卸载微信并重启电脑(重要聊天记录请提前备份)
2. 删除 `C:\Users\用户名\AppData\Roaming\Tencent\xwechat\XPlugin\Plugins\RadiumWMPF` 下所有数字命名的文件夹
3. 再次重启后安装微信 4.1.0.30 版本
4. 检查上述路径,确认文件夹编号为 `16389`
---
## 参考项目
## 参考
- [evi0s/WMPFDebugger](https://github.com/evi0s/WMPFDebugger)
- [0xsdeo/HeartK](https://github.com/0xsdeo/HeartK)
@@ -209,22 +78,15 @@ pyinstaller WMPFDebugger.spec
- [进击的HACK / JSRPC 与调用 wx.cloud](https://mp.weixin.qq.com/s/hTlekrCPiMJCvsHYx7CAxw)
- [linguo2625469/WMPFDebugger-mac](https://github.com/linguo2625469/WMPFDebugger-mac)
---
## 致谢
感谢 **0xsdeo** 师傅的大力支持与思路提供。
---
## 交流群
群满 200 人后需要手动邀请,请加我拉群:
![微信二维码](https://s1.galgame.fun/imgb/u55/20260413_69dcaf1310fc4.jpg)
---
## 免责声明
本工具仅供安全研究与学习使用,请勿用于未授权的目标,使用者须自行承担相关法律责任。
<img src="https://s1.galgame.fun/imgb/u55/20260601_6a1d196618084.png" alt="微信二维码" width="300" />