目录
- ipa包安装在越狱手机上
- ssh连接越狱手机
- 砸壳过程
ipa包安装在越狱手机上
libimobiledevice使用原始协议和苹果IOS通信设备的库相当于Android的adb。 libimobiledevice安装:brew install libimobiledevice 卸载:brew uninstall --ignore-dependencies libimobiledevice
在目录/usr/local/Cellar/libimobiledevice/1.3.0/bin/查看相关命令: /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevice_id /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicedebug /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicepair /usr/local/Cellar/libimobiledevice/1.3.0/bin/ideviceimagemounter /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicecrashreport /usr/local/Cellar/libimobiledevice/1.3.0/bin/ideviceenterrecovery /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicename /usr/local/Cellar/libimobiledevice/1.3.0/bin/ideviceprovision /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicedebugserverproxy /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicesyslog /usr/local/Cellar/libimobiledevice/1.3.0/bin/ideviceinfo /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicenotificationproxy /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicesetlocation /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicebackup /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicescreenshot /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicedate /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicediagnostics /usr/local/Cellar/libimobiledevice/1.3.0/bin/idevicebackup2 使用此命令查看设备信息。
ideviceinstaller的功能与libimobiledevice几乎,都可以得到iOS设备的udid、安装App、卸载App、获取bundleid等,但ideviceinstaller仅支持iOS系统环境9以下,libimobiledevice支持iOS系统环境10以上 安装ideviceinstaller: brew install ideviceinstaller 通过ideviceinstaller -h具体命令可查看 例如:安装ipa包 ideviceinstaller -I xxx.ipa
ssh连接越狱手机
通过USB使用SSH连接 iOS手机配置: 打开cydia-点击搜索-输入OpenSSH,安装OpenSSH MAC计算机端配置: 1.安装usbmuxd brew install usbmuxd 安装usbmuxd库后,还安装了一个小工具iproxy,该工具将设备上的端口号映射到计算机上的某个端口 2.映射端口 iproxy 2222 22 上述命令是连接当前设备的22端口(SSH端口)映射到计算机的2222端口,然后想要与设备的22端口通信,直接与当地的2222端口通信。 3. 连接设备 新的终端窗口执行Mac需要设备和终端命令Mac电脑在USB连接: ssh -p 2222 root@localhost 或 ssh -p 2222 root@127.0.0.1 (root默认密码用户alpine) 参考本部分:https://www.codenong.com/js31962cf8b19b/
砸壳过程
环境需要配置,包括砸壳过程iphone端和mac端配置,参考https://www.jianshu.com/p/5b4111c754e5。 通过frida-ios-dump实现砸壳 1.mac打开命令行,执行proxy 2222 22 2.进入/opt/dump/frida-ios-dump目录(这是我自己的安装目录,可能有点不同) 执行命令:python3 dump.py -l 查看应用name和bundle identifier 三、执行砸壳命令: python3 dump.py app’s-name(或者bundle identifier) 最终,在执行上述砸壳命令的目录位置生成一个新的目录ipa包,然后通过IDA查看即可。
报错: 错误1:zhangyandeMacBook-Pro:frida-ios-dump zhangyan$ frida-ps -U Failed to enumerate processes: this feature requires an iOS Developer Disk Image to be mounted; run Xcode briefly or use ideviceimagemounter to mount one manually。提示可以解释frida安装不匹配。 通过ssh进入到iPhone端,执行命令,提示错误 iPhone7:~ root# frida-server -h -sh: /usr/sbin/frida-server: Bad CPU type in executable
错误2:执行砸壳命令提示0.00B [00:00, ?B/s] 此时ctrl C终止程序,然后再次运行。