跳过内容

MASTG-TOOL-0074: iOS 版 objection

Objection 提供了几个专门用于 iOS 的功能。 你可以在项目的页面上找到 完整的功能列表,但这里有一些有趣的功能

  • 重新打包应用程序以包含 Frida gadget
  • 禁用常用方法的 SSL pinning
  • 访问应用程序存储以下载或上传文件
  • 执行自定义 Frida 脚本
  • 转储 Keychain
  • 读取 plist 文件

所有这些任务以及更多任务都可以通过使用 objection 的 REPL 中的命令轻松完成。 例如,您可以通过运行以下命令来获取应用程序中使用的类、类的函数或有关应用程序 bundle 的信息

$ ios hooking list classes
$ ios hooking list class_methods <ClassName>
$ ios bundles list_bundles

如果您有一个安装了 frida-server 的越狱设备,Objection 可以直接连接到正在运行的 Frida 服务器,以提供其所有功能,而无需重新打包应用程序。 但是,并非始终可以越狱最新版本的 iOS,或者您可能拥有具有高级越狱检测机制的应用程序。

在非越狱设备上执行高级动态分析的能力是 Objection 非常有用的功能之一。 按照重新打包过程 ( 签名 IPA 文件) 后,您将能够运行所有上述命令,这使得快速分析应用程序或绕过基本安全控制变得非常容易。

在 iOS 上使用 Objection

启动 Objection 取决于您是否已修补 IPA,或者您是否正在使用运行 Frida-server 的越狱设备。 要运行修补的 IPA,objection 将自动查找任何连接的设备,并搜索正在侦听的 Frida gadget。 但是,使用 frida-server 时,您需要明确告诉 frida-server 您想要分析哪个应用程序。

# Connecting to a patched IPA
$ objection explore

# Using frida-ps to get the correct application name
$ frida-ps -Ua | grep -i Telegram
983  Telegram

# Connecting to the Telegram app through Frida-server
$ objection --gadget="Telegram" explore

进入 Objection REPL 后,您可以执行任何可用命令。 以下是一些最有用的命令的概述

# Show the different storage locations belonging to the app
$ env

# Disable popular ssl pinning methods
$ ios sslpinning disable

# Dump the Keychain
$ ios keychain dump

# Dump the Keychain, including access modifiers. The result will be written to the host in myfile.json
$ ios keychain dump --json <myfile.json>

# Show the content of a plist file
$ ios plist cat <myfile.plist>

有关使用 Objection REPL 的更多信息,请访问 Objection Wiki