在 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>
32 lines
963 B
C
32 lines
963 B
C
#ifndef IG_DISPATCH_H
|
|
#define IG_DISPATCH_H
|
|
#include <sys/types.h>
|
|
#include "../include/IGDefender.h"
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* 固定签名试点:首次按线程安全方式解析;异常时不调用未经校验的地址。 */
|
|
ssize_t IG_dispatch_write(int fd, const void *buffer, size_t count);
|
|
int IG_dispatch_close(int fd);
|
|
int ig_dispatch_check(IGFindingSink sink, void *ctx);
|
|
|
|
#ifdef IG_OBSERVATION
|
|
/* 仅观察构建导出只读计数,不提供地址覆盖或关闭校验的接口。 */
|
|
typedef struct {
|
|
uint64_t write_attempted, write_dispatched;
|
|
uint64_t close_attempted, close_dispatched;
|
|
} IGDispatchObservation;
|
|
IGDispatchObservation ig_dispatch_observation(void);
|
|
#endif
|
|
|
|
#ifdef IG_DISPATCH_TESTING
|
|
/* 只编入宿主测试,不允许在 App 发布包定义此宏。 */
|
|
void ig_dispatch_test_override(unsigned index, void *address);
|
|
void ig_dispatch_test_reentry(int enabled);
|
|
#endif
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|