test(anti_tamper): IGAntiTamper 真机正反双向验证达标(D9,iPhone 16 Plus 非越狱)

poison_device.m 加 D9a–d 四条环境无关不变量 + csops_status/501 两条观察,
复用 build/run_poison_device harness。实测(verdict PASS,不变量 9/9):
- 误报底线:expect_*=0 → 零 DETECTED,对应 finding UNAVAILABLE
- cryptid 真读主镜像:expect=1 → reason500=1(dev 包 cryptid==0),mh=0x104390000
- 整入口贯通:ig_anti_tamper_check(1,1) → 500 + 501
- csops 真机活性:rc=0 status=0x22003305 valid=1 adhoc=0 get_task_allow=1
  (坐实 csops 在 iOS arm64 活着,排除 501 假阴性)

残留缺口(只能在真 App Store/TestFlight 包验):cryptid==1 正向 CLEAR +
分发签名零误触——dev profile 无法复现 FairPlay 加密/分发签名。docs/18 §7.7、docs/19 §6。
证据 test-results/step12-device-poison/20261113-antitamper-R/(gitignore)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-11-13 12:14:37 +09:00
co-authored by Claude Opus 4.8
parent cb51fdc6f0
commit 1094cc2760
3 changed files with 103 additions and 1 deletions
+3 -1
View File
@@ -210,7 +210,9 @@ ig_poison_mix_key_inline(key, key_len); // 健康→key 不变→正常解密
**边界**:`csops` 经 libc,可被 hook 伪造(但攻击者若已能 hook csops,环境已失陷,anti_hook/anti_inject 会先命中);`cryptid` 读进程内 Mach-O 头,patch 头部也能伪装——与整体「抬成本、非不可破」哲学一致,不作唯一安全锚点。
回归:`tests/test_anti_tamper.py`(合成 Mach-O 头跑 cryptid 核心:加密正常/脱壳/剥除/非分发跳过/NULL 五例)。csops 与真实主镜像那部分由设备测试覆盖(待设备解锁)。
回归:`tests/test_anti_tamper.py`(合成 Mach-O 头跑 cryptid 核心:加密正常/脱壳/剥除/非分发跳过/NULL 五例)。
**真机验证已达标(2026-11-13,iPhone 16 Plus 非越狱,dev 包 `poison_device.m` D9a–d)**:`expect_*=0` 零 DETECTED(误报底线);`expect_*=1` cryptid 命中 500、csops 读到 get-task-allow 命中 501;`csops_status rc=0 status=0x22003305 valid=1 get_task_allow=1` 坐实 csops 在真机 arm64 活着。详见 docs/19 §6。**残留缺口**:cryptid==1 正向 CLEAR 与分发签名零误触只能在真 App Store/TestFlight 包验(dev profile 无法复现 FairPlay 加密)。
---