*****************************************************

2019.12.12修改:

作者代码调整,主分支改成node.js了,下面内容仅适合

archive分支:

https://github.com/ChiChou/bagbak/tree/archive

这里有个archive的fork:

https://github.com/fishso/frida-ipa-dump,喜欢python的直接用这个

*****************************************************

这种方法的优点

windows上可以直接砸壳,砸完壳,使用IDA进行分析。

不需要ssh。

测试系统环境

win 10

python3

frida 12.5.5以上 (12.5.5版本修复了windows上部分电脑无法通过USB识别ios设备的问题)

ios 11

安装frida

安装前设置python源为国内源,安装frida会快不少。

这里使用python3.

如果没有安装frida,则执行:

pip3 install frida

pip3 install frida-tools

如果安装过了,则进行升级:

pip3 install -U frida

pip3 install -U frida-tools

安装一键砸壳脚本frida-ipa-dump

git clone https://github.com/fishso/frida-ipa-dump.git

砸壳

1.把iphone手机通过USB连接到PC。

2.再打开一个终端,执行frida-ls-devices, 如果已经通过USB识别ios设备,则显示会有一个type是usb的,如下图:

bc09429d19ebc1dc7d98035d5cf982d1.png

3.打开要砸壳的app,比如test,然后再终端执行frida-ps -Ua,查看test的app包名为com.example.test,然后执行

cd frida-ipa-dump

python3 dump.py com.example.test

执行完成后将会重新生成一个test.ipa文件,该文件即为砸壳后的结果文件。

这里也可以直接使用App名称砸壳,例如:

python3 dump.py 支付宝

其他说明

1.如果frida无法连接手机,提示“Failed to enumerate applications: unable to connect to remote frida-server: Unable to connect (connection refused)”,则需要检查手机frida的版本,区分32bit 和64bit版本。iphone5是32位,iphone 5s以上是64位。

2.如果报错:frida.InvalidOperationError: script is destroyed,则需要先退出app,再手动打开app等初始化完成,再次执行dump脚本,这样frida attach之后就不会出现这个问题。

3.如果报错:frida.ProtocolError: unable to communicate with remote frida-server; please ensure that major versions match and that the remote Frida has the feature you are trying to use,说明pc端版本和手机端frida版本不匹配,可以把手机端升级到最新,pc端使用pip3 install -U frida进行升级。

最后于 2019-12-12 21:00

被fishso编辑

,原因:

更多推荐