tr4m0ryp/tr4mpass
GitHub: tr4m0ryp/tr4mpass
tr4mpass 是一款免费开源的 iCloud 激活锁绕过工具,支持 iPhone 5s 至 15 Pro,利用 checkm8 硬件漏洞和会话激活协议实现全离线操作。
Stars: 180 | Forks: 73
# tr4mpass:iCloud 激活锁绕过
免费的开源工具,可移除 iPhone 和 iPad 上的 iCloud 激活锁。在您的本地计算机上运行 —— 无需服务器、无需付费、无需账号。只需插入您的设备并运行即可。
**支持 iOS 12 至 26.1 | iPhone 5s 至 iPhone 15 Pro**
***面向开发者和安全研究员:阅读 [`26.3-vulnerability.md`](26.3-vulnerability.md) 了解可能在 iOS 26.3 及更高版本上实现绕过的潜在漏洞。***
## 如何使用
### 1. 下载
```
git clone https://github.com/tr4m0ryp/tr4mpass.git
cd tr4mpass
```
### 2. 运行
```
./start.sh
```
就是这样。该脚本将会:
- 安装所有必需的依赖(支持 macOS、Linux,以及通过 WSL 运行的 Windows)
- 自动构建工具
- 在您插入设备时进行检测
- 逐步引导您进入 DFU 模式
- 运行绕过程序
- 在完成时通知您
### 3. 将您的设备置于 DFU 模式
脚本会引导您完成此操作,以下是简要说明:
**iPhone 7 及更早机型(带 Home 键):**
1. 通过 USB 连接到您的计算机
2. 同时按住电源键 + Home 键 10 秒钟
3. 松开电源键,继续按住 Home 键 5 秒钟以上
4. 屏幕应保持全黑(无 Apple logo)
**iPhone 8、X 及更新机型(Face ID / 无 Home 键):**
1. 通过 USB 连接到您的计算机
2. 快速按下音量加键,然后快速按下音量减键
3. 按住侧边按钮直到屏幕变黑
4. 同时按住侧边按钮 + 音量减键 5 秒钟
5. 松开侧边按钮,继续按住音量减键 10 秒钟
6. 屏幕应保持全黑
## 支持的设备
### iPhone
| 设备 | 芯片 | 绕过方法 | 保留信号 |
|--------|------|---------------|------------------|
| iPhone 5s | A7 | 路径 A (checkm8) | 否(仅限 WiFi) |
| iPhone 6 / 6 Plus | A8 | 路径 A (checkm8) | 否(仅限 WiFi) |
| iPhone 6s / 6s Plus | A9 | 路径 A (checkm8) | 是 |
| iPhone SE(第 1 代) | A9 | 路径 A (checkm8) | 是 |
| iPhone 7 / 7 Plus | A10 | 路径 A (checkm8) | 是 |
| iPhone 8 / 8 Plus | A11 | 路径 A (checkm8) | 是 |
| iPhone X | A11 | 路径 A (checkm8) | 是 |
| iPhone XR | A12 | 路径 B (session) | 是 |
| iPhone XS / XS Max | A12 | 路径 B (session) | 是 |
| iPhone 11 / Pro / Pro Max | A13 | 路径 B (session) | 是 |
| iPhone SE(第 2 代) | A13 | 路径 B (session) | 是 |
| iPhone 12 / Mini / Pro / Pro Max | A14 | 路径 B (session) | 是 |
| iPhone 13 / Mini / Pro / Pro Max | A15 | 路径 B (session) | 是 |
| iPhone SE(第 3 代) | A15 | 路径 B (session) | 是 |
| iPhone 14 / Plus | A15 | 路径 B (session) | 是 |
| iPhone 14 Pro / Pro Max | A16 | 路径 B (session) | 是 |
| iPhone 15 / Plus | A16 | 路径 B (session) | 是 |
| iPhone 15 Pro / Pro Max | A17 | 路径 B (session) | 是 |
### iPad
| 设备 | 芯片 | 绕过方法 |
|--------|------|---------------|
| iPad Air | A7 | 路径 A (checkm8) |
| iPad Air 2 | A8X | 路径 A (checkm8) |
| iPad mini 4 | A8 | 路径 A (checkm8) |
| iPad Pro(第 1 代) | A9X | 路径 A (checkm8) |
| iPad(第 5-7 代) | A9-A10 | 路径 A (checkm8) |
| iPad Pro(第 2 代) | A10X | 路径 A (checkm8) |
| iPad Pro(第 3/4 代) | A12/A12Z | 路径 B (session) |
| iPad Air(第 4/5 代) | A14/M1 | 路径 B (session) |
| iPad Pro(第 5/6 代) | M1/M2 | 路径 B (session) |
### 其他
| 设备 | 芯片 | 绕过方法 |
|--------|------|---------------|
| iPod touch(第 6 代) | A8 | 路径 A (checkm8) |
| iPod touch(第 7 代) | A10 | 路径 A (checkm8) |
| Apple TV 4K(第 1 代) | A10X | 路径 A (checkm8) |
| Apple Watch Series 1-3 | S1P/S3 | 路径 A (checkm8) |
## “保留信号”是什么意思?
- **是** —— 绕过后,您的 iPhone 将保留完整的蜂窝网络服务(通话、短信、数据)。SIM 卡正常工作。
- **否(仅限 WiFi)** —— 绕过后,设备可在 WiFi 下使用,但蜂窝网络服务被禁用。这适用于较旧的设备(A7/A8)以及所有仅支持 WiFi 的 iPad。
## 高级用法
如果您希望手动运行而不是使用 `start.sh`:
```
# Build
make
# 仅识别你的设备(无 bypass)
./tr4mpass --detect-only
# 使用完整 debug output 运行
./tr4mpass --verbose
# 强制指定 bypass path
./tr4mpass --force-path-a # checkm8 (A5-A11 devices)
./tr4mpass --force-path-b # session activation (A12+ devices)
# 预览执行后会发生什么但不实际操作
./tr4mpass --dry-run
```
## 工作原理(技术层面)
tr4mpass 有两条绕过路径,根据您的设备芯片自动选择:
### 路径 A —— checkm8(A5 至 A11)
利用 BootROM(设备开机时运行的第一段代码)中一个永久性的硬件漏洞。Apple 无法修补此漏洞,因为 BootROM 在出厂时已被烧录到芯片中。
```
DFU Mode -> checkm8 exploit -> load ramdisk -> jailbreak kernel
-> inject activation record -> cleanup Setup.app -> verify
```
### 路径 B —— Session 激活(A12 及更高版本)
不使用硬件漏洞。相反,它会在 DFU 模式下篡改设备的身份标识,然后利用 Apple 自己的激活协议(drmHandshake 会话模式)来更改锁定状态。
```
DFU Mode -> identity manipulation -> signal detection
-> session handshake -> activation record -> cleanup -> verify
```
### 架构
```
+-------------------------+
| start.sh | Guided wrapper (OS detect, deps, DFU guide)
+-------------------------+
| main.c | CLI, device detection, path selection
+-------------------------+
| Path A | Path B | Bypass strategies
+------------+------------+
| checkm8 | identity | Exploit / manipulation
| jailbreak | session | Activation protocol
+------------+------------+
| DFU protocol | activation record | deletescript |
+--------------+-------------------+--------------+
| libusb | libimobiledevice | libplist | OpenSSL |
+--------+------------------+---------+----------+
```
### 源代码文件
代码库使用 C99 编写(21 个源文件,20 个头文件)。每个文件都在 300 行以内。Makefile 会自动发现所有源代码 —— 无需手动维护文件列表。
| 模块 | 功能说明 |
|--------|-------------|
| `src/main.c` | 入口点、CLI 参数、调度逻辑 |
| `src/device/` | 设备检测(USB + libimobiledevice),芯片数据库(A5-A17) |
| `src/exploit/` | checkm8 漏洞利用阶段、DFU 协议、payload 组装 |
| `src/bypass/` | 路径 A、路径 B、信号检测、deletescript、AFC 工具 |
| `src/activation/` | 激活客户端、会话协议、record 构建器 |
| `src/util/` | 日志记录、plist 辅助工具、USB 辅助工具 |
## iOS 26.3+(研究中)
当前的绕过方法最高支持到 iOS 26.1。对于 iOS 26.2 及更高版本,Apple 强化了多个安全层,破坏了现有的绕过方式。
我们已经通过 **VU#346053** 找到了一个潜在的绕过向量 —— 这是 Apple 激活服务器中一个未修补的漏洞,该漏洞会接受未签名的 XML payload。这可能会在设备设置期间通过强制门户实现绕过,而无需任何漏洞利用或越狱。
**目前尚未实现。** 请参阅 [`26.3-vulnerability.md`](26.3-vulnerability.md) 获取完整的技术分析、攻击链构想以及实施路线图。
## 免责声明
此工具仅供**授权的安全研究**(Apple 安全赏金计划)使用。
- 仅在您拥有或获得书面授权进行测试的设备上使用。
- 对被盗设备绕过激活锁是违法行为。
- 不提供任何担保。使用风险自负。
- 不保证对所有设备或 iOS 版本均有效。
## 参考文献
本项目建立在广泛的研究与分析基础之上,资料来源于开源工具、安全披露、Apple 官方文档以及社区知识。
### 开源工具和库
| 项目 | 我们的用途 |
|---------|-------------------|
| [gaster](https://github.com/0x7ff/gaster) | C 语言编写的 checkm8 漏洞利用实现 —— 芯片偏移量、ROP 链、漏洞利用阶段、shellcode 结构 |
| [ipwndfu](https://github.com/axi0mX/ipwndfu) | 原始的 checkm8 漏洞利用参考(Python) —— payload 结构、堆喷射参数 |
| [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice) | 设备通信、lockdownd、mobileactivation API |
| [libideviceactivation](https://github.com/libimobiledevice/libideviceactivation) | 激活 record 处理、drmHandshake 协议 |
| [go-ios](https://github.com/danielpaulus/go-ios) | mobileactivation 模块 —— 会话协议、握手序列、激活流程 |
| [pymobiledevice3](https://github.com/doronz88/pymobiledevice3) | 激活协议和移动服务的 Python 参考 |
| [checkra1n / PongoOS](https://github.com/checkra1n/PongoOS) | 预启动执行环境,针对 A5-A11 的越狱参考 |
| [palera1n](https://github.com/palera1n/palera1n) | 基于 checkm8 的现代越狱工具,ramdisk 构建器 |
| [jbinit](https://github.com/tihmstar/jbinit) | 用于 checkm8 设备的 iOS booter ramdisk 创建器 |
| [Lockra1n](https://github.com/alwaysappleftd/Lockra1n_v2.0) | 不完美绕过 iCloud 参考(iOS 15-16.7.8) |
| [LIBRE-HACKTIVATOR](https://github.com/i3T4AN/LIBRE-HACKTIVATOR_iOS_12-16) | deletescript 参考 —— 针对 iOS 版本的清理脚本 |
| [iOS-Hacktivation-Toolkit](https://github.com/Hacktivation/iOS-Hacktivation-Toolkit) | 针对版本的 mobileactivationd 修补脚本 |
| [Onii_Ramdisk](https://github.com/LinhOnii/Onii_Ramdisk) | 免费的 iCloud 绕过 ramdisk 工具 |
| [img4tool](https://github.com/Tihmstar/img4tool) | IMG4 固件容器提取 |
| [iBoot64Patcher](https://github.com/Tihmstar/iBoot64Patcher) | 用于加载 ramdisk 的 Bootloader 修补 |
| [ramdiskutil](https://github.com/cfw-project/ramdiskutil) | iOS 恢复 ramdisk 自定义 |
| [iExtractor](https://github.com/malus-security/iextractor) | 自动化 IPSW 固件提取 |
### 安全研究与披露
| 来源 | 相关性 |
|--------|-----------|
| [VU#346053 -- iOS 激活漏洞](https://github.com/JGoyd/iOS-Activation-Flaw) | humb.apple.com/humbug/baa 处未修补的 XML 注入(iOS 26.3+ 绕过向量) |
| [全面披露:iOS 激活漏洞](https://seclists.org/fulldisclosure/2025/Jun/27) | VU#346053 的原始公开披露(2025 年 6 月) |
| [CVE-2019-8900 -- checkm8](https://theapplewiki.com/wiki/Checkm8_Exploit) | BootROM 释放后使用(UAF)漏洞(A5-A11) |
| [CVE-2023-41991 -- CoreTrust](https://theapplewiki.com/wiki/CoreTrust) | 代码签名绕过(已在 iOS 17.0.1 修补),解释了为何在 iOS 18+ 上持久签名会失败 |
| [CVE-2026-20687 -- 内核 UAF](https://support.apple.com/en-us/100100) | AppleKeyStore 竞态条件导致的 IOCommandGate 释放后使用(iOS 26.1-26.3) |
| [CVE-2026-28859 -- WebKit 沙盒逃逸](https://support.apple.com/en-us/100100) | 导致进程逃逸沙盒的内存处理 bug(已在 iOS 26.4 修补) |
### Apple 官方文档
| 来源 | 涵盖内容 |
|--------|---------------|
| [Apple Activation Lock](https://support.apple.com/en-us/108794) | 官方锁文档 |
| [Apple Security Bounty](https://security.apple.com/bounty/) | 本研究所属的漏洞赏金计划 |
| [Secure Enclave](https://support.apple.com/guide/security/sec59b0b31ff) | SEP 架构与激活状态存储 |
| [The Apple Wiki -- 固件密钥](https://theapplewiki.com/wiki/Firmware_Keys) | 用于 IPSW ramdisk 提取的解密密钥 |
| [The iPhone Wiki -- 激活令牌](https://www.theiphonewiki.com/wiki/Activation_Token) | 激活 record plist 格式与字段 |
| [The iPhone Wiki -- WildcardTicket](https://www.theiphonewiki.com/wiki/WildcardTicket) | 激活 ticket 结构(TEA-CBC 加密) |
| [The iPhone Wiki -- Setup.app](https://www.theiphonewiki.com/wiki//Applications/Setup.app) | 被 deletescript 定向移除的设置助理路径 |
| [Albert Server](https://theapplewiki.com/wiki/Albert) | Apple 激活服务器端点 |
### 分析与文章
| 来源 | 主题 |
|--------|-------|
| [GBHackers -- iOS 激活漏洞](https://gbhackers.com/apple-ios-activation-flaw-enables-injection/) | VU#346053 技术分析 |
| [CyberSecurity News -- 激活漏洞](https://cybersecuritynews.com/apples-ios-activation-vulnerability/) | VU#346053 影响分析 |
| [checkm8 深入剖析 (Medium)](https://medium.com/@saadanashraf86/the-unpatchable-flaw-a-deep-dive-into-apples-dfu-mode-and-the-checkm8-exploit-0d3dae2a2075) | checkm8 漏洞利用机制 |
| [Zimperium -- checkm8 分析](https://zimperium.com/blog/zimperium-analysis-of-checkm8) | 安全行业对 checkm8 的分析 |
| [Habr -- checkm8 技术分析](https://habr.com/en/companies/dsec/articles/472762/) | 对 DFU UAF 的详细技术拆解 |
| [Black Hat 2016 -- 揭秘 SEP](https://blackhat.com/docs/us-16/materials/us-16-Mandt-Demystifying-The-Secure-Enclave-Processor.pdf) | Secure Enclave 架构研究 |
| [Dynastic Research -- iOS 代码签名绕过](https://research.dynastic.co/2019/03/01/codesign-bypass) | CoreTrust/AMFI 绕过历史 |
### 分析过的商业工具
在开发过程中,我们分析了以下专有工具,以了解其绕过流程和协议实现:
| 工具 | 版本 | 我们提取出的内容 |
|------|---------|------------------|
| Checkm8.info Software | 9.5 | 两段式架构(A5-A11 对比 A12+)、DFU 漏洞利用流程、FActivation 协议、离线绕过方法、捆绑的 go-ios 二进制文件、ipwndfu payload |
| iRemoveTools | 9.5 | A12+ 激活 API、有信号与无信号的处理方式、MobileDeviceFramework 用法、与 mobileactivationd 的交互 |
手动安装依赖 —— macOS
``` brew install libimobiledevice libirecovery libusb libplist openssl pkg-config ```手动安装依赖 —— Linux (Debian/Ubuntu)
``` sudo apt-get install -y \ libimobiledevice-dev libirecovery-1.0-dev libusb-1.0-0-dev \ libplist-dev libssl-dev pkg-config build-essential ```手动安装依赖 —— Linux (Fedora)
``` sudo dnf install -y \ libimobiledevice-devel libirecovery-devel libusb1-devel \ libplist-devel openssl-devel pkg-config gcc make ```Windows
不支持原生 Windows。请先安装 WSL: ``` wsl --install ``` 然后打开 WSL 终端并按照 Linux 的说明进行操作。标签:checkm8, Cutter, iOS, 安全测试工具, 客户端加密, 激活锁绕过, 移动设备, 越狱, 足迹探测