Files
iOSGuard/docs
shenleiandClaude Opus 4.8 e3d2a48d56 harden(poison): 修命名段挂牌泄漏——毒化副本改匿名数组分散(对抗自验)
对「链接+strip 的宿主」做攻击者视角自验(nm/otool -l/-tV/strings),揪出上一版
§7.2 的反效果设计:三副本用自定义命名段 __DATA,__ig_p0/p1/p2/pd,而命名段原样留在
Mach-O load command、strip 也抹不掉——otool -l | grep __ig_p 一把定位毒化副本位置,
比匿名 BSS 更糟(等于在 header 上挂牌)。

修法:三真副本+诱饵散进一个匿名数组 g_state[12] 的非相邻下标(IG_LANE={2,7,11}、
IG_DECOY=5,其余陪衬槽),全进匿名 __bss/__data;每槽存 baseline^lane_k(i) 使各槽值
互不相同,消除「数组里几个相同的字=一组健康值」的静态 tell;mask 只读三真副本。
mask 语义不变(健康→0,毒化→非0,无分支),毒化语义测试全过。

回归守卫:tests/test_static_hardening.py 新增 test_no_telegraphing_sections,
守 .a 不再出现 __ig_/__poison 等泄漏性命名段。

另记录自验第二发现(已写进 docs/18 §7.0):四个 public 入口名 _ig_poison_* 的字样
本身泄露用途,strip -x 抹不掉,须 readoor Release 用完整 strip(style=all) 或接入层包中性名。

设备 poison_device.m 全模块 iphoneos 交叉编译 arm64 通过;全量 70 测试通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-13 11:11:52 +09:00
..