惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 阿牛

在家无缝访问公司内网:我的低成本、高安全远程办公方案 好学生 Deepseek 的学习过程 DeepSeek R1 的推理过程与人类团队处理任务的类比 ColorOS14升级15保持ROOT windows11获取不到IPv6的解决方法 wps插件工具 当github双因子认证遇到鸿蒙手机 从Console中获取VUE的Route参数 雨霖工具 使用Powershell脚本实现微信多开 调试远程GithubAction 突破Vecel网站最大运行10秒的限制 备份51CTO买到的视频课程 白嫖Gitee收费服务, 实现瞬时Pages更新 批量删除gitlab仓库 批量删除github仓库 批量删除gitee的代码库 树莓派系统充分利用SD卡空间 Thinkpad T470p Clover and opencore 吃黑苹果 Catalina 10.15.5
PC微信小程序解密和反编译资源
阿牛 · 2021-09-10 · via 博客园 - 阿牛

https://github.com/BlackTrace/pc_wxapkg_decrypt

由于不想安装安卓模拟器去提取wxapkg包,windows PC端的微信也支持小程序,但是PC端的wxapkg是被加密存储的。该项目是把wxapkg解密。目前微信PC版本为:2.9.5.31.

使用方法

pc_wxapkg_decrypt.exe -wxid 微信小程序id -in 要解密的wxapkg路径 -out 解密后的路径

pc_wxapkg_decrypt.exe -h

Usage of pc_wxapkg_decrypt.exe:
   -in string
         需要解密的wxapkg的文件路径 (default "__APP__.wxapkg")
   -iv string
         AES加密的IV,默认不需要设置,如果版本有变化,设置 (default "the iv: 16 bytes")
   -out string
         解密后的wxapkg的文件路径 (default "dec.wxapkg")
   -salt string
         pbkdf2用到的salt,默认不需要设置 (default "saltiest")
   -wxid string
         小程序的id

wxapkg路径为:C:\Users\xxxx\Documents\WeChat Files\Applet\wx2xxx84w9w7a3xxxx\_APP_.wxapkg,小程序id为:wx2xxx84w9w7a3xxxx

解密完成后,就可以用wxappUnpacker(https://github.com/gudqs7/wxappUnpacker)解包了。

原理

PC端微信把wxapkg给加密,加密后的文件的起始为V1MMWX。

加密方法为:

  1. 首先pbkdf2生成AES的key。利用微信小程序id字符串为pass,salt为saltiest 迭代次数为1000。调用pbkdf2生成一个32位的key
  2. 首先取原始的wxapkg的包得前1023个字节通过AES通过1生成的key和iv(the iv: 16 bytes),进行加密
  3. 接着利用微信小程序id字符串的倒数第2个字符为xor key,依次异或1023字节后的所有数据,如果微信小程序id小于2位,则xorkey 为 0x66
  4. 把AES加密后的数据(1024字节)和xor后的数据一起写入文件,并在文件头部添加V1MMWX标识