Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ To debug web pages of WeChat embedded browser, please refer to [EXTENSION.md](EX

**Version histories:**

* 269136 (latest)
* 6.25529 (latest, official download, credit @YanAnHuaZai)
* 269136 (latest, Mac App Store)


To check WMPF version on macOS:
Expand All @@ -104,6 +105,23 @@ To check WMPF version on macOS:
grep CFBundleVersion -A 1 "/Applications/WeChat.app/Contents/MacOS/WeChatAppEx.app/Contents/Info.plist"
```

Before running the debugger on macOS for the first time, quit WeChat completely and apply an Ad-Hoc signature to the `WeChatAppEx` executable. This allows Frida to attach to the process without disabling System Integrity Protection (SIP):

```bash
sudo codesign --force --sign - \
--preserve-metadata=identifier,entitlements,requirements \
"/Applications/WeChat.app/Contents/MacOS/WeChatAppEx.app/Contents/MacOS/WeChatAppEx"
```

Verify the signature:

```bash
codesign --verify --strict --verbose=4 \
"/Applications/WeChat.app/Contents/MacOS/WeChatAppEx.app/Contents/MacOS/WeChatAppEx"
```

Restart WeChat, then run the debugger as your normal user. Running `npx ts-node src/index.ts` with `sudo` does not bypass the target process's code-signing restrictions. You may need to repeat the Ad-Hoc signing step after updating or reinstalling WeChat.


## Prerequisites

Expand Down
20 changes: 19 additions & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@

**支持的 WMPF 版本:**

* 269136 (最新)
* 6.25529(最新, 官网下载版,credit @YanAnHuaZai)
* 269136(最新, 苹果应用商店版)

如何检查版本:

Expand All @@ -100,6 +101,23 @@
grep CFBundleVersion -A 1 "/Applications/WeChat.app/Contents/MacOS/WeChatAppEx.app/Contents/Info.plist"
```

首次在 macOS 上运行调试器前,请彻底退出微信,并对 `WeChatAppEx` 可执行文件进行 Ad-Hoc 重签名。这样无需关闭系统完整性保护(SIP),Frida 也可以附加到该进程:

```bash
sudo codesign --force --sign - \
--preserve-metadata=identifier,entitlements,requirements \
"/Applications/WeChat.app/Contents/MacOS/WeChatAppEx.app/Contents/MacOS/WeChatAppEx"
```

验证签名:

```bash
codesign --verify --strict --verbose=4 \
"/Applications/WeChat.app/Contents/MacOS/WeChatAppEx.app/Contents/MacOS/WeChatAppEx"
```

重新启动微信后,请使用普通用户运行调试器。使用 `sudo` 执行 `npx ts-node src/index.ts` 并不能绕过目标进程的代码签名限制。更新或重新安装微信后,可能需要再次执行 Ad-Hoc 签名。

## 准备

* node.js (需要至少 LTS v22)
Expand Down
13 changes: 13 additions & 0 deletions frida/config/darwin/addresses.6.25529.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"Version": 6.25529,
"LoadStartHookOffset": "0x5720430",
"CDPFilterHookOffset": "0x92e76a8",
"SceneOffsets": [
56,
1552,
8,
1488,
16,
456
]
}