codesign 签名查看工具。
codesign -dvvvv xxx
codesign -d --entitlements - --xml xxx | xq
codesign --remove-signature xxx
codesign --force --deep --sign - xxx
otool(object file displaying tool) macOS 自带的machO文件分析工具:
$ otool --version
llvm-otool(1): Apple Inc. version cctools-994.1
otool(1): Apple Inc. version cctools-994.1
disassmbler: LLVM version 13.1.6, (clang-1316.0.21.2.5)
llvm object file dumper.
# -m/--macho 解析为Mach-O文
# --dylibs-used 所加载的dylibs
$ objdump -m --dylibs-used toolsdemo
$ objdump -m --dylibs-used shared_cache/usr/lib/libSystem.B.dylib
# 使用 -h 或 --section-headers 将显示每节的标题信息
$ objdump -m -h toolsdemo
# 展示符号表
$ objdump -m --syms toolsdemo
# Mach-O头文件和所有的加载命令
$ objdump -m --all-headers toolsdemo
# 转储原始数据
## __cstring <==> C字符串
## __objc_methname <==> Objective-C方法名称
$ objdump -m --full-contents toolsdemo
# 代码反汇编
# -x86-asm-syntax=att
$ objdump --disassemble-symbols=_hello -x86-asm-syntax=intel toolsdemo
$ objdump -d toolsdemo
安装:brew install --cask jtool2
# 加载命令
$ jtool2 -l toolsdemo
# 加载动态
$ jtool2 -L toolsdemo
# 显示符号信息
$ jtool2 -S toolsdemo
# --sig 签名信息
$ ARCH=arm64e jtool2 --sig /System/Applications/Automator.app/Contents/MacOS/Automator
$ ARCH=x86_64 jtool2 --sig /System/Applications/Automator.app/Contents/MacOS/Automator
# --ent 权限信息
$ ARCH=arm64e jtool2 --ent /System/Applications/Automator.app/Contents/MacOS/Automator
$ ARCH=x86_64 jtool2 --ent /System/Applications/Automator.app/Contents/MacOS/Automator
# 反编译 (only arm)
$ jtool2 -d toolsdemo
A fast and clever open source hex editor for macOS.
在 Github 上搜索MachOView能看到多个版本但大多都没有持续更新,挑个顺眼下载使用不行就下一个。
巴斯使用的版本:fangshufeng/MachOView
Hopper Disassembler 在mac平台上一款不错的反编译工具,官网有免费和付费版。
$ pip3 install frida-tools
命令一键安装,更多内容查看文档。
Wireshark世界上最重要和广泛使用的网络协议分析器。
越狱设备中安装 frida,打开Cydia添加软件源:https://build.frida.re
并安装 Frida-server
。
macOS 运行frida-ls-devices
命令查看 通过 usb 连接的越狱设备:
macOS 运行frida-ps -U
命令查看设备上的进程:
iOS App Signer可以(重新)签署应用程序,并将其捆绑成ipa文件,准备安装在iOS设备上。
usbmux是苹果的私有协议,苹果设计该协议的原因是为了自家的macOS APP能够和iDevice进行通信,从而实现诸如iTunes备份iPhone、Xcode真机调试等功能。只是后来该协议被开发者破解了,于是为众人所知。 usbmux协议:https://zyqhi.github.io/2019/08/20/usbmuxd-protocol.html lockdown service:https://jon-gabilondo-angulo-7635.medium.com/understanding-usbmux-and-the-ios-lockdown-service-7f2a1dfd07ae
安装usbmuxd
brew install usbmuxd
将通过usb连接的越狱设备上的22
端口映射到本机的2222
端口
$ iproxy 2222 22
多个设备加上UUID:$ iproxy 2223 22 [uuid]