APK格式

lib

assets

dex

androidManifest.xml

抓包

HttpCanary

脱壳

frida-dexdump

1
2
3
4
pip install frida-dexdump

frida-dexdump -U -f 包名
frida-dexdump -UF -d -o .

https://blog.csdn.net/weixin_43767456/article/details/134444987

frida

需要python3.6以上的环境,下载几个python库

1
2
3
pip install frida-tools
pip install loguru click
pip install hexdump

配置好本地Frida之后,查看frida版本,查看手机cpu类型

1
2
3
4
frida --version

adb shell
getprop ro.product.cpu.abi
配置frida-server

去下载对应版本的对应类型的frida-server

27042

https://github.com/frida/frida/releases

下载对应版本下载到手机的 /data/local/tmp/ 目录下

1
2
3
4
5
6
7
8
进入手机端命令:adb shell
切换获取手机的root权限:Su
查找文件是否在手机中:cd/data/local/tmp/
查看路径下的文件并看文件的权限:Is-l
拥有root权限更改文件的权限为777: chmod 777 frida-server-16.5.2-android-x86
在手机中启动运行该文件:./frida-server-14.0.5-android-x86 &
电脑运行检查手机端服务是否开启成功:frida-ps -U
windows运行端口转发到PC:adb forward tcp:27043 tcp:27043

fridaAPI:https://frida.re/docs/javascript-api/

1
2
3
4
5
6
-U
-F
-l
-o
-f
-p

frida脚本

objection

1
pip install objection

启动

1
objection -g 包名 explore
1
2
3
4
5
6
7
-N: 表示网络连接,不加表示USB连接
-h: 主机名,默认是 127.0.0.1
-p: 端口,默认是 27042
-g: 指定进程名\包名

explore:启动objection交互界面,explore也有选项,下面再说
patchapk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
列出所有已加载的类(常用)
android hooking list classes

在所有已加载的类中搜索包含特定关键字的类(常用)
android hooking search classes <pattern>

列出类的所有方法(常用)
android hooking list class_methods <路径.类名>

hook类的所有方法(不包括构造方法)
android hooking watch class <路径.类名>

hook类的构造方法
android hooking watch class_method <路径.类名.$init>

默认是hook方法的所有重载(常用)
android hooking watch class_method <路径.类名.方法名>

hook方法的参数、返回值和调用栈(常用)
android hooking watch class_method <路径.类名.方法名> --dump-args --dump-return --dump-backtrace

hook单个重载函数,需要指定参数类型,多个参数需要用逗号分隔
android hooking watch class_method <路径.类名.方法名> "<参数类型>"

jadx

https://github.com/skylot/jadx/releases