fix(defender): ObjC 方法基线改用构建期签名清单,修复误报 110 导致的延迟闪退
- 构建期生成随包签名的 IGMethods.bin(仅主程序),运行时按镜像 UUID、 入口偏移与函数边界内指令摘要校验;导出审计复核清单与最终镜像一致 - 系统函数、调度与解包保护的代码前缀按 LC_FUNCTION_STARTS 限定在函数边界内 - 边界内识别 B / LDR+BR / ADRP+ADD+BR / MOVK+BR 蹦床并确认目标归属,避免系统尾调用误报 - 登记前 IMP 已落入匿名内存判为改写;清单读取改走 IG_dispatch_open - 函数边界长度按入口缓存;镜像未重新链接时复用基线;Debug 附加调试器时不按入口摘要判定改写 - 补充宿主测试;删除已过时的 README 与 docs 历史文档,保留 THIRD_PARTY_NOTICES
This commit is contained in:
@@ -368,6 +368,13 @@ def audit_ipa(
|
||||
f'变体符号 {invalid_images}'
|
||||
)
|
||||
|
||||
from objc_method_baseline import NAME, generate
|
||||
expected = unpacked / 'expected-method-baseline.bin'
|
||||
report['objc_method_count'] = generate(app, main_bin, expected)
|
||||
sealed = app / NAME
|
||||
if not sealed.is_file() or sealed.read_bytes() != expected.read_bytes():
|
||||
raise ValueError('导出的 IPA 方法基线缺失或与最终镜像不一致')
|
||||
|
||||
hygiene = _check_static_hygiene(app, main_bin, info)
|
||||
report['static_hygiene'] = hygiene
|
||||
if not hygiene['passed']:
|
||||
|
||||
Reference in New Issue
Block a user