feat(defender): 可集成静态库 + readoor 接入方案(检测→分级→数据毒化闭环)
在 iOSGuard 侧产出可集成产物与接入文档,不修改 readoor 代码。 - defender/: anti_hook/anti_frida/anti_debug/anti_jailbreak 探针 + syscall 直发、 policy 分级层、poison 数据依赖毒化、dispatch/resolve/call_bridge 等子模块 - poison: 三副本冗余、无分支掩码;健康恒等、毒化破坏 key(替代 if-exit 处置) - policy: STRONG/MEDIUM/WEAK 分级,守误报底线,仅 DETECTED 参与、组合命中才毒化 - anti_jailbreak: IGSyscall 直发 svc 检测越狱文件(400)/沙盒逃逸(401),绕 libc hook - tools/build_defender_lib.sh: 一键交叉编译打包 libIGDefender.a(arm64) + umbrella 头 - docs/18_READOOR_DEFENDER_INTEGRATION.md: 精确到文件/bridging/替换点/代码片段 - docs/05-17 + evidence + tests + macho_guard/static_sdk_redirect 工具链 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ff0aee7f47
commit
599e1da5ce
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* IGDefender.c — 运行时防护聚合入口。
|
||||
*
|
||||
* 一次性运行 anti_hook + 注入/Frida 全部探针,证据统一经 sink 上报;不做任何处置。
|
||||
* 典型用法(观察模式):App 启动 / 回前台 / 关键操作前调用 ig_defender_scan,
|
||||
* 由上层策略根据 reason 组合决定是否限制功能——本库绝不 exit。
|
||||
*/
|
||||
#include "IGDefender.h"
|
||||
#include "anti_hook/IGAntiHook.h"
|
||||
#include "anti_hook/IGObjCBaseline.h"
|
||||
#include "anti_frida/IGAntiInject.h"
|
||||
#include "anti_debug/IGAntiDebug.h"
|
||||
#include "anti_jailbreak/IGAntiJailbreak.h"
|
||||
#include "dispatch/IGDispatch.h"
|
||||
|
||||
int ig_defender_scan(const char *bundle_path, int probe_port,
|
||||
IGFindingSink sink, void *ctx) {
|
||||
int hits = 0;
|
||||
hits += ig_dispatch_check(sink, ctx);
|
||||
hits += ig_anti_hook_check_default(sink, ctx);
|
||||
hits += ig_objc_baseline_check(sink, ctx);
|
||||
hits += ig_anti_inject_check(bundle_path, sink, ctx);
|
||||
hits += ig_anti_frida_check(probe_port, sink, ctx);
|
||||
hits += ig_anti_debug_check(sink, ctx);
|
||||
hits += ig_anti_jb_check(sink, ctx);
|
||||
return hits;
|
||||
}
|
||||
Reference in New Issue
Block a user