iOS逆向:工具安装
二〇二三年〇八月二十三日(2023版,iOS逆向笔记)
对其他APP的实现感兴趣,对技术报以热枕,不去做违反职业道德和违法乱纪的事情,欢迎来到iOS逆向。
工欲善其事必先利其器 ------我说的。
网络不好可配置DNS 114.114.114.114
和 8.8.8.8
, 科学上网。
Mac端
安装Homebrew
安装homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
卸载homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
- 查询已安装包列表:brew list
- 查看brew版本:brew -v
- 更新brew版本:brew update
安装Theos
Theos官网
安装
sudo git clone --recursive https://github.com/theos/theos.git /opt/theos
Theos 安装失败 可以按照Theos官网下载,下载完,要移动到 /opt/theos
下载Theos
bash -c "$(curl -fsSL https://raw.githubusercontent.com/theos/theos/master/bin/install-theos)"
下载失败
Error: Cannot download non-corrupt https://formulae.brew.sh/api/formula.jws.json!
先下载大文件
brew untap homebrew/core homebrew/cask
再次下载,安装完成
==> SDKs successfully installed!
==> Theos Installer: Theos has been successfully installed! Restart your shell and then run $THEOS/bin/nic.pl to get started.
找到theos文件夹,移动到 /opt/theos
修改文件权限
sudo chown $(id -u):$(id -g) /opt/theos
把theos的执行路径加入到环境变量之中
vim ~/.bash_profile
export THEOS=/opt/theos
export PATH=/opt/theos/bin/:$PATH
安装class-dump和ldid
brew install class-dump
brew install dpkg ldid
安装Frida
Frida官网
pip install frida-tools # CLI tools
pip install frida # Python bindings
安装frida-ios-dump
git clone https://github.com/AloneMonkey/frida-ios-dump.git
cd frida-ios-dump
sudo pip install -r requirements.txt --upgrade
安装MonkeyDev
MonkeyDev官方Wiki
选择 XCode
sudo xcode-select -s /Applications/Xcode.app
git clone https://github.com/AloneMonkey/MonkeyDev.git
cd MonkeyDev/bin
sudo ./md-install
使用过程中遇到的错误
报错 (Xcode13以后找不到这个目录了)
Modifying Bash personal initialization file...
File /Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/Resources/Embedded-Device.xcspec not found
创建目录
sudo mkdir -p /Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/Resources/
找到这个文件在哪 复制粘贴过去
find . -name Embedded-Device.xcspec
复制粘贴过去 再次安装
Xcode14.3找不到libarclite_iphoneos.a
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
来到这个路径创建 arc
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
#执行第一个命令后需要输入Mac用户的登录密码以获取root权限
sudo mkdir arc
cd arc
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.gitsudo chmod +x *
重启Xcode
各种 No module named ‘’
ModuleNotFoundError: No module named 'frida'
找不到谁,就安装谁
pip install frida
安装iproxy
brew install libimobiledevice
安装Reveal
Reveal是ITTY BITTY发布的UI分析工具,可以很直观的查看App的UI布局。
支持正版,传递爱心
Reveal官网
穷人请点这里
Reveal-21-xclient.info.dmg
1、拖动Reveal.app到Applications目录完成安装;
2、打开Reveal20_Patcher.app,将应用程序目录内的Reveal.app拖到Reveal20_Patcher.app窗口内,然后打开Reveal.app输入任意序列号即可激活。
说你电脑端的 Reveal Library 与手机上的不一致,是旧版的,这个时候就需要将 MAC 端的 Reveal Library 覆盖一下手机上的,点击 Show Reveal Library in Finder
手机端
手机越狱
我用的是iPhone6 12.5.7。
你们可以先用爱思助手的一键越狱功能试试,我的手机是越狱失败了,各种尝试,最后问的爱思客服,最后采用了CheckRa1n 越狱,找个windows电脑端的爱思助手,制作U盘(对U盘还有要求,我换了三个才识别出来),然后作为启动U盘,对手机越狱成功。
iOS 12.3 - iOS 13.X:Windows 版 CheckRa1n 越狱教程
进入BIOS系统的按键。
我这样的是不完美越狱,不可以重启手机,可以重启SpringBoard
越狱这块,按照爱思助手的指导一步步来就可以了。
配置Cydia
这是我的软件源
这是我安装的插件
为什么安装这些,后面用到了再解释