Skip to content

支持微信 4.1.x 版本密钥提取 - #22

Open
maomao3334 wants to merge 3 commits into
huohuoer:mainfrom
maomao3334:main
Open

支持微信 4.1.x 版本密钥提取#22
maomao3334 wants to merge 3 commits into
huohuoer:mainfrom
maomao3334:main

Conversation

@maomao3334

@maomao3334 maomao3334 commented Aug 29, 2026

Copy link
Copy Markdown

更新内容

  • 集成 Windows 4.1+ Config.Cipher 运行时内存扫描
  • 使用 XOR 解码从微信进程内存中提取加密密钥
  • 优先使用 Config.Cipher 扫描,失败时回退到传统十六进制模式匹配
  • 基于 wcdb-key-tool 的成熟实现

测试结果

  • 微信版本:4.1.13.12
  • 操作系统:Windows 11
  • 成功提取 24/24 个数据库密钥(8.5秒,31个候选密钥)

技术细节

微信 4.1+ 在运行时使用 Config.Cipher 结构存储数据库密钥,并通过 XOR 混淆保护。此更新实现:

  1. 在进程内存中搜索 com.Tencent.WCDB.Config.Cipher 字符串
  2. 定位指向该结构的引用
  3. 读取并 XOR 解码密钥 blob
  4. 使用 HMAC-SHA512 验证提取的密钥

此方法比传统十六进制模式匹配更准确、更快速。

🤖 Generated with Claude Code

maomao3334 and others added 3 commits August 29, 2026 13:29
- 更新 verify_enc_key 函数支持 HMAC-SHA1(新版微信 3.9+/4.1.x)
- 保持向后兼容 HMAC-SHA512(旧版微信)
- 基于 wcdb-key-tool 运行时扫描方法
- 修复新版微信密钥提取失败问题

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- 添加 Config.Cipher 运行时扫描逻辑
- 使用 XOR 解码从内存中提取加密密钥
- 优先使用 Config.Cipher 扫描,回退到传统方法
- 基于 wcdb-key-tool 的实现

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jackadolf

Copy link
Copy Markdown

牛逼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants