iOS逆向工具之Theos 工程创建

992 阅读1分钟

前几天郁闷了一下, 没有继续, 今天重新开始整理逆向

今天的重点是 Theos

Theos是一个越狱开发工具包,使用它可以创建Tweak项目,动态Hook第三方程序。GitHub链接:github.com/theos/theos ,官网安装教程可以参考:github.com/theos/theos…

安装

1. 安装依赖库:

安装Theos之前先安装三个依赖库,dpkgfakerootldid (brew这个没安装的自定查询安装)


 brew install ldid fakeroot

 brew pin dpkg

  • ldid

越狱 iPhone 下的签名工具(更改授权 entitlements ),可以为 theos 开发的程序进程签名(支持在 OS XiOS 上运行)。

  • dpkg 使用很简单

 dpkg -i/-r deb包安装/卸载

 dpkg -s com.iosre.myiosreproject 查看安装包信息

2. 检查 Mac 电脑是否存在 /opt 目录,没有自己创建一个。
cd /opt

3. 在新建的 /opt 目录下 clone 项目源码

$ git clone --recursive https://github.com/theos/theos.git

4. 下载完成后执行以下命令,修改 theos 权限

 sudo chown -R $(id -u):$(id -g) theos

5. 修改环境变量

打开 ~/.bash_profile 文件,添加以下两行


export THEOS=/opt/theos

export PATH=/opt/theos/bin/:$PATH

6. 配置好后,命令行查看下是否成功。
echo $THEOS

/opt/theos

如果你 Mac 安装了 omyzsh ,可能上面配置后并不会成功,解决办法是:在 ~/.zshrc 中添加下面一行。

source ~/.bash_profile

配置好之后重新查看, 如果成功了, 则说明这个环境配置好了

ps: 由于我安装了 omyzsh, 在 .bash_profile 中添加一行 source ~/.zshrc 这样, 以后再修改 .bash_profile.zshrc 文件之后直接 source ~/.bash_profile 命令就能直接配置好所有的了


End