脱壳(见图)

未加壳的 app

Java + 安卓 -> APK -> dex 文件 -> 运行

加壳的 app

Java + 安卓 -> APK -> 360/腾讯等(SO 算法) -> 内存 -> 运行

脱壳本质

在内存中获取,让 APP 运行在手机中,内存中加载文件内容写回到 dex 文件

查壳

https://github.com/sulab999/AppMessenger


项目 1

https://github.com/hluwa/frida-dexdump

  1. 本地安装 Frida

    pip install frida
    pip install frida-tools
    pip install frida-dexdump
  2. 模拟器安装 Frida

    注意:版本要与本地 Frida 一致

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

    真机:ARM 版本及位数 模拟器:无 ARM 的位数

    查看:getprop ro.product.cpu.abi

    adb push frida-server /data/local
    cd /data/local/tmp/
    chmod 777 frida-server
    ./frida-server
    ps | grep frida
  3. 转发并启动 Frida

    adb forward tcp:27042 tcp:27042

    连接判断:frida-ps -U frida-ps -R

  4. 使用 frida-dexdump 脱壳

    frida-dexdump -U -f "包名" (-f 参数会尝试重新启动应用,容易超时)

    如果启动黑屏手工启动 APP 后执行:

    frida-dexdump -U -F "com.heiyan.reader"
    frida-dexdump -U -F "com.flutter324.cbxxk.xr0e8m"
    frida-dexdump -U -F "com.auto_play"
    frida-dexdump -U -F "com.wtt.fjjy"

项目 2:(真机使用)

面具 + LSP + Fundex2

https://github.com/Xposed-Modules-Repo/com.zhenxi.fundex2


真机测试报告

关于 Android10 及以上 frida-实验报告 v2-成功版.PDF


存储安全测试

APP 内敏感数据存储导致的泄露

内部文件,外部文件,数据库文件,日志存储等