记一次成功脱壳修复dex的过程
某票务app,因为有腾讯加固,首先需要脱壳。
1、脱壳,看这里 frida-dexdump 脱壳的正确姿势,得到脱壳的dex文件;
2、用baksmali工具,把 第1步的 dex转换成smali;
2、反编译,用 apktool d ./com.xxx.mobile.apk,反编译,得到加固的apk解压包;
4、替换 smali 文件夹,用 第2步 的 smali 文件夹替换掉 解压包中的 smali;
5、找入口,修复入口;
打开原文件的dex,找到com/wrapper/proxyapplication/WrapperProxyApplication
进去复制入口后到AndroidManifest.xml中替换入口
这是dex中的入口
1 2 3 4 5 | .field static baseContext:Landroid/content/Context; = null .field static className:Ljava/lang/String; = "i.app.applicationMain" #这是入口 .field static mLoader:Ljava/lang/ClassLoader; = null .field static shellApp:Landroid/app/Application; = null .field static tinkerApp:Ljava/lang/String; = "tinker not support" |
然后替换到AndroidManifest.xml中替换入口,下面是替换后的
1 2 3 4 5 6 7 8 | android:theme= "@7f090000" android:label= "@7f080000" android:icon= "@7f030000" android:name= "i.app.applicationMain" #这里就是要替换的地方 android:hardwareAccelerated= "true" android:largeHeap= "true" android:supportsRtl= "true" android:resizeableActivity= "true" > |
6、第六步,删除腾讯加固的相关文件,一般在assets、lib目录下,文件名如下:
- tencent_stub
- tosversion
- 0OO00l111l1l
- o0oooOO0ooOo
- 文件名带有shell的
7、用 apktool b com.xxx.mobile 编译apk;
8、用 androidkiller 打开 第7步的 apk,然后用androidkiller编译;
9、安装到模拟器,正常运行,ok。
参考(强烈推荐):https://www.52pojie.cn/thread-1453091-1-1.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库