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:
@@ -0,0 +1,22 @@
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* 仅用于已核实只查询当前线程 ID 的 SDK 引用。保留 Darwin syscall 的 int 返回 ABI。 */
|
||||
int IG_sdk_thread_selfid(int operation) {
|
||||
if (operation != 372) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint64_t thread_id = 0;
|
||||
int incoming = errno;
|
||||
int status = pthread_threadid_np(NULL, &thread_id);
|
||||
if (status != 0) {
|
||||
errno = status;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errno = incoming;
|
||||
return (int)(uint32_t)thread_id;
|
||||
}
|
||||
Reference in New Issue
Block a user