应用安全 --- frida脚本 之 dump所有dex
脚本位置:
https://gitee.com/null_465_7266/dump-all-so/blob/master/dump_so.py
命令
python dex_dump_all_in_one.py -p com.shizhuang.duapp -f -t 5
PS C:\Users\21558\Documents\dumpallso\dump-all-so> python dex_dump_all_in_one.py -p com.shizhuang.duapp -f -t 8 [+] 检查root权限... [+] 成功获取root权限 [+] 创建输出目录: com.shizhuang.duapp_dex_20250823_062032 ============================================================ Android DEX文件一站式dump工具 ============================================================ 目标包名: com.shizhuang.duapp 连接设备: Device(id="adb-KCAIKN05L048ZAF-ovuptT._adb-tls-connect._tcp", name="2112123AC", type='usb') 启动应用: com.shizhuang.duapp [+] DEX Dump Script v2.0 Started [+] Installing DEX hooks... [+] Found libart.so at: 0x70f6d82000 [+] Found DefineClass: _ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcmNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS_3dex8ClassDefE at 0x70f6f552e8 [+] DefineClass hook installed successfully [+] DEX dump script ready [+] New DEX found - Base: 0x70f59ed02c Size: 9633372 [+] Frida脚本已加载 [+] New DEX found - Base: 0x70f41e2548 Size: 5633996 [+] 等待 8 秒让应用运行和发现DEX文件... [+] New DEX found - Base: 0x70f50a2eb4 Size: 9739056 [+] New DEX found - Base: 0x707b13c084 Size: 1605216 [+] New DEX found - Base: 0x707a34b074 Size: 1487016 [+] New DEX found - Base: 0x70f68ba554 Size: 4971224 [+] New DEX found - Base: 0x707bb748a0 Size: 427040 [+] New DEX found - Base: 0x707b2c3ee8 Size: 1604976 [+] New DEX found - Base: 0x707aeed6dc Size: 1018640 [+] New DEX found - Base: 0x707afe61f0 Size: 1400464 [+] New DEX found - Base: 0x70ee6dc000 Size: 16048 [+] New DEX found - Base: 0x707a62f144 Size: 1500456 [+] New DEX found - Base: 0x707ad7feb0 Size: 1497128 [+] New DEX found - Base: 0x70f4742a10 Size: 9825036 [+] New DEX found - Base: 0x70f681802c Size: 660084 [+] New DEX found - Base: 0x7058662218 Size: 2485724 [+] New DEX found - Base: 0x707b9ee89c Size: 1597440 [+] New DEX found - Base: 0x707b709f1c Size: 1478864 [+] New DEX found - Base: 0x707b5a1fb8 Size: 1474400 [+] New DEX found - Base: 0x70f3ec202c Size: 1181320 [+] New DEX found - Base: 0x70f3fe302c Size: 2089320 [+] New DEX found - Base: 0x707aaaab80 Size: 1446104 [+] New DEX found - Base: 0x707ac0bc5c Size: 1524304 [+] New DEX found - Base: 0x6dd03b4030 Size: 179968 [+] New DEX found - Base: 0x707b872ff0 Size: 1554600 [+] New DEX found - Base: 0x6dd015e030 Size: 2888 [+] New DEX found - Base: 0x707a79d670 Size: 1676032 [+] New DEX found - Base: 0x707a936974 Size: 1524232 [+] Auto-loading classes... [+] Loading all classes... [-] Java not available [+] New DEX found - Base: 0x707b44bc5c Size: 1401688 [+] 手动触发DEX dump... [+] Auto-dumping DEX files... [+] Manual dump triggered [+] Dumping DEX at 0x70f59ed02c size 9633372 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f59ed02c_92fe5c.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f59ed02c_92fe5c.dex [+] Dumping DEX at 0x70f41e2548 size 5633996 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f41e2548_55f7cc.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f41e2548_55f7cc.dex [+] Dumping DEX at 0x70f50a2eb4 size 9739056 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f50a2eb4_949b30.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f50a2eb4_949b30.dex [+] Dumping DEX at 0x707b13c084 size 1605216 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707b13c084_187e60.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707b13c084_187e60.cdex [+] Dumping DEX at 0x707a34b074 size 1487016 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707a34b074_16b0a8.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707a34b074_16b0a8.cdex [+] Dumping DEX at 0x70f68ba554 size 4971224 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f68ba554_4bdad8.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f68ba554_4bdad8.dex [+] Dumping DEX at 0x707bb748a0 size 427040 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707bb748a0_68420.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707bb748a0_68420.cdex [+] Dumping DEX at 0x707b2c3ee8 size 1604976 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707b2c3ee8_187d70.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707b2c3ee8_187d70.cdex [+] Dumping DEX at 0x707aeed6dc size 1018640 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707aeed6dc_f8b10.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707aeed6dc_f8b10.cdex [+] Dumping DEX at 0x707afe61f0 size 1400464 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707afe61f0_155e90.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707afe61f0_155e90.cdex [+] Dumping DEX at 0x70ee6dc000 size 16048 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70ee6dc000_3eb0.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70ee6dc000_3eb0.dex [+] Dumping DEX at 0x707a62f144 size 1500456 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707a62f144_16e528.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707a62f144_16e528.cdex [+] Dumping DEX at 0x707ad7feb0 size 1497128 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707ad7feb0_16d828.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707ad7feb0_16d828.cdex [+] Dumping DEX at 0x70f4742a10 size 9825036 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f4742a10_95eb0c.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f4742a10_95eb0c.dex [+] Dumping DEX at 0x70f681802c size 660084 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f681802c_a1274.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f681802c_a1274.dex [+] Dumping DEX at 0x7058662218 size 2485724 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x7058662218_25eddc.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x7058662218_25eddc.dex [+] Dumping DEX at 0x707b9ee89c size 1597440 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707b9ee89c_186000.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707b9ee89c_186000.cdex [+] Dumping DEX at 0x707b709f1c size 1478864 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707b709f1c_1690d0.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707b709f1c_1690d0.cdex [+] Dumping DEX at 0x707b5a1fb8 size 1474400 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707b5a1fb8_167f60.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707b5a1fb8_167f60.cdex [+] Dumping DEX at 0x70f3ec202c size 1181320 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f3ec202c_120688.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f3ec202c_120688.dex [+] Dumping DEX at 0x70f3fe302c size 2089320 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x70f3fe302c_1fe168.dex : Operation not permitted [+] DEX dumped successfully: /data/local/tmp/0x70f3fe302c_1fe168.dex [+] Dumping DEX at 0x707aaaab80 size 1446104 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707aaaab80_1610d8.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707aaaab80_1610d8.cdex [+] Dumping DEX at 0x707ac0bc5c size 1524304 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707ac0bc5c_174250.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707ac0bc5c_174250.cdex [+] Dumping DEX at 0x6dd03b4030 size 179968 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x6dd03b4030_2bf00.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x6dd03b4030_2bf00.cdex [+] Dumping DEX at 0x707b872ff0 size 1554600 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707b872ff0_17b8a8.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707b872ff0_17b8a8.cdex [+] Dumping DEX at 0x6dd015e030 size 2888 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x6dd015e030_b48.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x6dd015e030_b48.cdex [+] Dumping DEX at 0x707a79d670 size 1676032 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707a79d670_199300.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707a79d670_199300.cdex [+] Dumping DEX at 0x707a936974 size 1524232 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707a936974_174208.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707a936974_174208.cdex [+] Dumping DEX at 0x707b44bc5c size 1401688 [-] Java not available [-] Native method failed: TypeError: not a function [-] Failed to write to /sdcard/0x707b44bc5c_156358.cdex : Operation not permitted [+] CDEX dumped successfully: /data/local/tmp/0x707b44bc5c_156358.cdex [-] RPC调用失败: unable to find method 'getstats' [+] 脚本已自动执行dump操作 [-] printDexMaps也失败: unable to find method 'printdexmaps' [-] 警告: 手动dump可能失败,但脚本已自动执行 ============================================================ 开始自动拉取DEX文件 ============================================================ [+] 开始从设备拉取DEX/CDEX文件... [+] 输出目录: com.shizhuang.duapp_dex_20250823_062032 [+] 处理路径: /data/local/tmp/ [*] 处理文件: a12w2314.dex [+] 成功拉取: a12w2314.dex (2808 字节) [*] 处理文件: aya.dex [+] 成功拉取: aya.dex (492504 字节) [*] 处理文件: 0x70f59ed02c_92fe5c.dex [+] 成功拉取: 0x70f59ed02c_92fe5c.dex (9633372 字节) [*] 处理文件: 0x70f41e2548_55f7cc.dex [+] 成功拉取: 0x70f41e2548_55f7cc.dex (5633996 字节) [*] 处理文件: 0x70f50a2eb4_949b30.dex [+] 成功拉取: 0x70f50a2eb4_949b30.dex (9739056 字节) [*] 处理文件: 0x707b13a084_187e60.cdex [+] 成功拉取: 0x707b13a084_187e60.cdex (1605216 字节) [*] 处理文件: 0x707a349074_16b0a8.cdex [+] 成功拉取: 0x707a349074_16b0a8.cdex (1487016 字节) [*] 处理文件: 0x70f68ba554_4bdad8.dex [+] 成功拉取: 0x70f68ba554_4bdad8.dex (4971224 字节) [*] 处理文件: 0x707bb728a0_68420.cdex [+] 成功拉取: 0x707bb728a0_68420.cdex (427040 字节) [*] 处理文件: 0x707b2c1ee8_187d70.cdex [+] 成功拉取: 0x707b2c1ee8_187d70.cdex (1604976 字节) [*] 处理文件: 0x707aeeb6dc_f8b10.cdex [+] 成功拉取: 0x707aeeb6dc_f8b10.cdex (1018640 字节) [*] 处理文件: 0x707afe41f0_155e90.cdex [+] 成功拉取: 0x707afe41f0_155e90.cdex (1400464 字节) [*] 处理文件: 0x70ee603000_3eb0.dex [+] 成功拉取: 0x70ee603000_3eb0.dex (16048 字节) [*] 处理文件: 0x707a62d144_16e528.cdex [+] 成功拉取: 0x707a62d144_16e528.cdex (1500456 字节) [*] 处理文件: 0x707ad7deb0_16d828.cdex [+] 成功拉取: 0x707ad7deb0_16d828.cdex (1497128 字节) [*] 处理文件: 0x70f4742a10_95eb0c.dex [+] 成功拉取: 0x70f4742a10_95eb0c.dex (9825036 字节) [*] 处理文件: 0x70509a6218_25eddc.dex [+] 成功拉取: 0x70509a6218_25eddc.dex (2485724 字节) [*] 处理文件: 0x70f681802c_a1274.dex [+] 成功拉取: 0x70f681802c_a1274.dex (660084 字节) [*] 处理文件: 0x707b9ec89c_186000.cdex [+] 成功拉取: 0x707b9ec89c_186000.cdex (1597440 字节) [*] 处理文件: 0x707b707f1c_1690d0.cdex [+] 成功拉取: 0x707b707f1c_1690d0.cdex (1478864 字节) [*] 处理文件: 0x707b59ffb8_167f60.cdex [+] 成功拉取: 0x707b59ffb8_167f60.cdex (1474400 字节) [*] 处理文件: 0x70f3ec202c_120688.dex [+] 成功拉取: 0x70f3ec202c_120688.dex (1181320 字节) [*] 处理文件: 0x70f3fe302c_1fe168.dex [+] 成功拉取: 0x70f3fe302c_1fe168.dex (2089320 字节) [*] 处理文件: 0x707aaa8b80_1610d8.cdex [+] 成功拉取: 0x707aaa8b80_1610d8.cdex (1446104 字节) [*] 处理文件: 0x707ac09c5c_174250.cdex [+] 成功拉取: 0x707ac09c5c_174250.cdex (1524304 字节) [*] 处理文件: 0x6db62cb030_2bf00.cdex [+] 成功拉取: 0x6db62cb030_2bf00.cdex (179968 字节) [*] 处理文件: 0x70064ba030_b48.cdex [+] 成功拉取: 0x70064ba030_b48.cdex (2888 字节) [*] 处理文件: 0x707a79b670_199300.cdex [+] 成功拉取: 0x707a79b670_199300.cdex (1676032 字节) [*] 处理文件: 0x707b870ff0_17b8a8.cdex [+] 成功拉取: 0x707b870ff0_17b8a8.cdex (1554600 字节) [*] 处理文件: 0x707a934974_174208.cdex [+] 成功拉取: 0x707a934974_174208.cdex (1524232 字节) [*] 处理文件: 0x707b449c5c_156358.cdex [+] 成功拉取: 0x707b449c5c_156358.cdex (1401688 字节) [*] 处理文件: 0x707b13c084_187e60.cdex [+] 成功拉取: 0x707b13c084_187e60.cdex (1605216 字节) [*] 处理文件: 0x707a34b074_16b0a8.cdex [+] 成功拉取: 0x707a34b074_16b0a8.cdex (1487016 字节) [*] 处理文件: 0x707bb748a0_68420.cdex [+] 成功拉取: 0x707bb748a0_68420.cdex (427040 字节) [*] 处理文件: 0x707b2c3ee8_187d70.cdex [+] 成功拉取: 0x707b2c3ee8_187d70.cdex (1604976 字节) [*] 处理文件: 0x707aeed6dc_f8b10.cdex [+] 成功拉取: 0x707aeed6dc_f8b10.cdex (1018640 字节) [*] 处理文件: 0x707afe61f0_155e90.cdex [+] 成功拉取: 0x707afe61f0_155e90.cdex (1400464 字节) [*] 处理文件: 0x70ee6dc000_3eb0.dex [+] 成功拉取: 0x70ee6dc000_3eb0.dex (16048 字节) [*] 处理文件: 0x707a62f144_16e528.cdex [+] 成功拉取: 0x707a62f144_16e528.cdex (1500456 字节) [*] 处理文件: 0x707ad7feb0_16d828.cdex [+] 成功拉取: 0x707ad7feb0_16d828.cdex (1497128 字节) [*] 处理文件: 0x7058662218_25eddc.dex [+] 成功拉取: 0x7058662218_25eddc.dex (2485724 字节) [*] 处理文件: 0x707b9ee89c_186000.cdex [+] 成功拉取: 0x707b9ee89c_186000.cdex (1597440 字节) [*] 处理文件: 0x707b709f1c_1690d0.cdex [+] 成功拉取: 0x707b709f1c_1690d0.cdex (1478864 字节) [*] 处理文件: 0x707b5a1fb8_167f60.cdex [+] 成功拉取: 0x707b5a1fb8_167f60.cdex (1474400 字节) [*] 处理文件: 0x707aaaab80_1610d8.cdex [+] 成功拉取: 0x707aaaab80_1610d8.cdex (1446104 字节) [*] 处理文件: 0x707ac0bc5c_174250.cdex [+] 成功拉取: 0x707ac0bc5c_174250.cdex (1524304 字节) [*] 处理文件: 0x6dd03b4030_2bf00.cdex [+] 成功拉取: 0x6dd03b4030_2bf00.cdex (179968 字节) [*] 处理文件: 0x707b872ff0_17b8a8.cdex [+] 成功拉取: 0x707b872ff0_17b8a8.cdex (1554600 字节) [*] 处理文件: 0x6dd015e030_b48.cdex [+] 成功拉取: 0x6dd015e030_b48.cdex (2888 字节) [*] 处理文件: 0x707a79d670_199300.cdex [+] 成功拉取: 0x707a79d670_199300.cdex (1676032 字节) [*] 处理文件: 0x707a936974_174208.cdex [+] 成功拉取: 0x707a936974_174208.cdex (1524232 字节) [*] 处理文件: 0x707b44bc5c_156358.cdex [+] 成功拉取: 0x707b44bc5c_156358.cdex (1401688 字节) [+] 清理设备上的临时文件... [+] 已清理: a12w2314.dex [+] 已清理: aya.dex [+] 已清理: 0x70f59ed02c_92fe5c.dex [+] 已清理: 0x70f41e2548_55f7cc.dex [+] 已清理: 0x70f50a2eb4_949b30.dex [+] 已清理: 0x707b13a084_187e60.cdex [+] 已清理: 0x707a349074_16b0a8.cdex [+] 已清理: 0x70f68ba554_4bdad8.dex [+] 已清理: 0x707bb728a0_68420.cdex [+] 已清理: 0x707b2c1ee8_187d70.cdex [+] 已清理: 0x707aeeb6dc_f8b10.cdex [+] 已清理: 0x707afe41f0_155e90.cdex [+] 已清理: 0x70ee603000_3eb0.dex [+] 已清理: 0x707a62d144_16e528.cdex [+] 已清理: 0x707ad7deb0_16d828.cdex [+] 已清理: 0x70f4742a10_95eb0c.dex [+] 已清理: 0x70509a6218_25eddc.dex [+] 已清理: 0x70f681802c_a1274.dex [+] 已清理: 0x707b9ec89c_186000.cdex [+] 已清理: 0x707b707f1c_1690d0.cdex [+] 已清理: 0x707b59ffb8_167f60.cdex [+] 已清理: 0x70f3ec202c_120688.dex [+] 已清理: 0x70f3fe302c_1fe168.dex [+] 已清理: 0x707aaa8b80_1610d8.cdex [+] 已清理: 0x707ac09c5c_174250.cdex [+] 已清理: 0x6db62cb030_2bf00.cdex [+] 已清理: 0x70064ba030_b48.cdex [+] 已清理: 0x707a79b670_199300.cdex [+] 已清理: 0x707b870ff0_17b8a8.cdex [+] 已清理: 0x707a934974_174208.cdex [+] 已清理: 0x707b449c5c_156358.cdex [+] 已清理: 0x707b13c084_187e60.cdex [+] 已清理: 0x707a34b074_16b0a8.cdex [+] 已清理: 0x707bb748a0_68420.cdex [+] 已清理: 0x707b2c3ee8_187d70.cdex [+] 已清理: 0x707aeed6dc_f8b10.cdex [+] 已清理: 0x707afe61f0_155e90.cdex [+] 已清理: 0x70ee6dc000_3eb0.dex [+] 已清理: 0x707a62f144_16e528.cdex [+] 已清理: 0x707ad7feb0_16d828.cdex [+] 已清理: 0x7058662218_25eddc.dex [+] 已清理: 0x707b9ee89c_186000.cdex [+] 已清理: 0x707b709f1c_1690d0.cdex [+] 已清理: 0x707b5a1fb8_167f60.cdex [+] 已清理: 0x707aaaab80_1610d8.cdex [+] 已清理: 0x707ac0bc5c_174250.cdex [+] 已清理: 0x6dd03b4030_2bf00.cdex [+] 已清理: 0x707b872ff0_17b8a8.cdex [+] 已清理: 0x6dd015e030_b48.cdex [+] 已清理: 0x707a79d670_199300.cdex [+] 已清理: 0x707a936974_174208.cdex [+] 已清理: 0x707b44bc5c_156358.cdex [+] 总共清理了 52 个临时文件 [+] 生成文本报告: dex_dump_report.txt [+] 生成JSON报告: dex_dump_report.json ============================================================ 最终统计结果: 成功拉取: 52 个文件 总大小: 98035176 字节 (93.49 MB) 标准DEX文件: 14 个 压缩CDEX文件: 38 个 输出目录: com.shizhuang.duapp_dex_20250823_062032 ============================================================ ✓ DEX文件一站式dump完成! 后续分析建议: - 使用 dex2jar 转换DEX文件为JAR - 使用 jadx 进行图形化反编译 - 分析主要的业务逻辑和安全机制