feat: 集成 LLVM IR 混淆体系、Route 2 全量合规与系统调用调度加固
- defender: 扩展 IGDispatch/IGArchiveGuard/IGAntiHook/IGObjCBaseline/IGResolve,支持 Route 2 静态库桥接 (IGThreadID.c) 与防重签名检测 - llvm_passes: 新增 IGObfuscator LLVM IR 插件源码(控制流平坦化、字符串加密、间接跳转/调用、不透明常量/字段、MBA、函数外提、基本块拆分、反 Hook 序言) - tools & config: 新增 Xcode 归档编译/链接包装器、LLVM 自愈工具链 (ig_toolchain_resolver)、IPA 审计门禁、崩溃符号还原及最新 ig_llvm_policy.json(文件级匹配 + 3.0 全业务 Handler 平坦化) - tests & docs: 补齐 M0~M3、Pass 单测及系统调用调度/Route 2/LLVM 方案文档;.gitignore 忽略 *.bc 与 .obfuscate_extraction_cache.json
This commit is contained in:
@@ -1,18 +1,34 @@
|
||||
#ifndef IG_DISPATCH_H
|
||||
#define IG_DISPATCH_H
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include "../include/IGDefender.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* 固定签名试点:首次按线程安全方式解析;异常时不调用未经校验的地址。 */
|
||||
/* 线程安全解析并缓存目标;每次调用前校验,失败不调用目标。
|
||||
* 检查依赖 pthread/dlsym/Mach,不可用于异步信号处理器或 fork 后的子进程。
|
||||
* 仅供逐调用点接入,不能作为全局 libc interpose 实现。 */
|
||||
ssize_t IG_dispatch_write(int fd, const void *buffer, size_t count);
|
||||
int IG_dispatch_close(int fd);
|
||||
/* Only redirect reviewed ordinary call sites, never signal handlers or post-fork
|
||||
* child paths. getpid returns -1 with errno if validation fails (unlike libc).
|
||||
* These declarations do not automatically redirect existing IPA imports. */
|
||||
ssize_t IG_dispatch_read(int fd, void *buffer, size_t count);
|
||||
int IG_dispatch_open(const char *path, int flags, ...);
|
||||
int IG_dispatch_unlink(const char *path);
|
||||
pid_t IG_dispatch_getpid(void);
|
||||
FILE *IG_dispatch_fopen(const char *path, const char *mode);
|
||||
__attribute__((noreturn)) void IG_dispatch_exit(int status);
|
||||
pid_t IG_dispatch_fork(void);
|
||||
void *IG_dispatch_dlopen(const char *path, int mode);
|
||||
void *IG_dispatch_dlsym(void *handle, const char *symbol);
|
||||
int ig_dispatch_check(IGFindingSink sink, void *ctx);
|
||||
|
||||
#ifdef IG_OBSERVATION
|
||||
/* 仅观察构建导出只读计数,不提供地址覆盖或关闭校验的接口。 */
|
||||
/* 保留原 write/close 试点计数 ABI;新增入口不计入这四个字段。
|
||||
* 仅观察构建导出只读计数,不提供地址覆盖或关闭校验的接口。 */
|
||||
typedef struct {
|
||||
uint64_t write_attempted, write_dispatched;
|
||||
uint64_t close_attempted, close_dispatched;
|
||||
|
||||
Reference in New Issue
Block a user