使用 frida-dexdump 获取加固 apk 的 dex

环境准备

可以使用 venv 先创建虚拟环境。

安装 Frida CLI tools

pip install frida-tools

安装 FRIDA-DEXDump

pip3 install frida-dexdump

下载 frida-server 并启动

Release 地址: https://github.com/frida/frida/releases

找到对应版本,例如 frida-server-16.2.1-android-arm64.xz

下载后解压,推送到设备上。使用 adb shell 进入设备 shell

device:/ $ su
device:/ # whoami
root

移动文件并赋予权限,随后启动服务器

device:/sdcard/Download # mv frida-server-16.2.1-android-arm64 /data/local/tmp
device:/sdcard/Download # cd /data/local/tmp
device:/data/local/tmp # chmod 777 frida-server-16.2.1-android-arm64
device:/data/local/tmp # ./frida-server-16.2.1-android-arm64

获取 dex

回到刚才的虚拟环境,先查看正在运行的程序

(Frida-CLI-tools) L:\Frida-CLI-tools>frida-ps -Ua
  PID  Name              Identifier
-----  ----------------  ---------------------------------------
28433  Chrome            com.android.chrome
32500  Google Play 商店    com.android.vending
21071  Scene4            com.omarea.vtools
29118  ViPER4Android FX  com.wstxda.viper4android
 6889  信息                com.google.android.apps.messaging
 7660  照相机               com.lge.camera
 1150  百度输入法             com.baidu.input

(Frida-CLI-tools) L:\Frida-CLI-tools>

记下目标应用信息,准备脱壳。

frida-dexdump 用法

我是使用 USB 与设备连接,所以指定 -U 参数表示 connect to USB device

转储前台应用

frida-dexdump -FU

指定包名转储

frida-dexdump -U -f com.app.pkgname

指定 PID 转储

frida-dexdump -U -p 1234

指定应用名称转储

frida-dexdump -U -n 照相机

本文链接:

https://blog.nkxingxh.top/archives/384/
1 + 3 =
快来做第一个评论的人吧~