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:
@@ -25,6 +25,9 @@ class DispatchTests(unittest.TestCase):
|
||||
def run_mode(self,mode):
|
||||
p=subprocess.run([str(self.exe),mode],capture_output=True,text=True,env=self.env,timeout=30)
|
||||
self.assertEqual(p.returncode,0,p.stdout+p.stderr)
|
||||
def test_extended_file_semantics(self):self.run_mode('extended')
|
||||
def test_extended_tamper_rejected(self):self.run_mode('extended-tamper')
|
||||
def test_read_eintr(self):self.run_mode('read-eintr')
|
||||
def test_semantics(self):self.run_mode('semantics')
|
||||
def test_short_write(self):self.run_mode('short-write')
|
||||
def test_eintr(self):self.run_mode('eintr')
|
||||
@@ -52,6 +55,15 @@ class DispatchTests(unittest.TestCase):
|
||||
'-c',str(ROOT/'defender'/p),'-o',str(Path(self.tmp.name)/f'{i}.o')],
|
||||
capture_output=True,text=True)
|
||||
self.assertEqual(r.returncode,0,r.stderr)
|
||||
# The Release objects must not introduce direct references to
|
||||
# any of the 12 report symbols they shield or use internally.
|
||||
forbidden = {'_write','_close','_read','_open','_unlink','_getpid','_fopen',
|
||||
'_exit','_fork','_dlopen','_dlsym','_syscall'}
|
||||
for i in range(len(SOURCES)):
|
||||
r=subprocess.run(['xcrun','nm','-u',str(Path(self.tmp.name)/f'{i}.o')],
|
||||
capture_output=True,text=True,check=True)
|
||||
undefined={line.split()[-1] for line in r.stdout.splitlines() if line.split()}
|
||||
self.assertFalse(undefined & forbidden, f'{SOURCES[i]}: {r.stdout}')
|
||||
def test_initialization_failure(self):
|
||||
obj=Path(self.tmp.name)/'missing-resolver.o'
|
||||
exe=Path(self.tmp.name)/'init-failure'
|
||||
|
||||
Reference in New Issue
Block a user