mirror of
https://codeberg.org/dabao1955/apk-reverse.git
synced 2026-11-30 03:50:22 +08:00
Complete the xvmp IR virtualizer end to end and measure the de-virtualization chain on a real fixture
The public xvmp tree ships a compiler half that was never compiled (no TU includes the virtualizer headers; on dev trees they do not build), a weak empty vm_exec stub, silent skips for unsupported IR, and a companion article describing an earlier prototype that is not in the tree. This change completes and measures the chain: - Completed toolchain, merged into all four omp branches of that tree: gated new-PM pass wiring (-mllvm -irobf-irvm, section .irvm), FORMAT v3 bytecode (8-byte aligned slots, explicit load/store widths, stable CC_ cast kinds, per-index GEP byte scales, branch condition = operand 0), a strong-symbol vm_exec interpreter with a 23-check unit suite, and a VMP.h user header. Virtualized vs native output identical at -O0/-O1/-O2 on all four branches. One branch's ungated IRVM call in Obfuscation::runOnModule (rewrote .irvm functions in plain native builds) removed; IRVM is strictly flag-gated. - Fixture measured end to end (fco+bcfobf+subobf+IRVM build): native-identical output; 17,961-step guest trace via VMP_TRACE; 24.6M-instruction host trace via a ptrace single-stepper; vm_handler_slice yields 95,184 segments / 18 unique signatures; the fla outer state machine separates as a shuttle class, round-boundary segments split the trajectory, positional alignment names every handler segment (59/59 in a round; counts match the guest histograms exactly), zero unmapped with --opcode-map. - Tooling hardening measured on the real fixture: opcode maps key by signature (first-block keys collide under a shared dispatch successor); apply_map keeps first-block keys as fallback, regression tests added. - Environment boundary recorded: frida stalker does not work in these containers (measured past the syscall layer: primitives pass, agent loads, zero denied syscalls; the failure is inside the injected agent's hook machinery), an outer ptrace tracer conflicts with frida spawn, and the ptrace stepper is the working host capture path. Design lesson: a pure virtualized call can still be LICM-hoisted by the compiling optimizer. Records: EXTENSION-sampling-crash.md SS5-SS6 (final-state rewrite), known-limitations.md, ete-diff-tracing.md SS5, vm_handler_slice.py header, capability matrix.
This commit is contained in:
1 parent
e151d7d605
commit
cd1df50a2a
20 files changed
+1151
-151
No files matched your search
+7
-1
@@ -215,6 +215,11 @@ references/ 按需加载,每个文件一个主题
|
||||
栈不可信时的崩溃取证(BRBE 分支记录 / ETE 尾部),
|
||||
以及把运行时地址变成符号与静态偏移
|
||||
(`trace_addr2sym.py`,PIE vaddr/文件偏移规则)
|
||||
native-vm-recovery.md native VM 还原:VM 存在信号、区分叠在一起的 CFF/VM 双层
|
||||
dispatcher 的行为判据表、用 relocation 恢复分发表、三重
|
||||
验证的寄存器锚定、嵌套 VM 的段栈、从 STORE 反向切片加
|
||||
字节道的操作数恢复,以及干净重实现 VM 的验证闭环 —— 吸收自
|
||||
两篇公开实战文
|
||||
kernel-event-injection.md 把驱动当伸进目标里的手:从内核布置、无 tracer 关系的
|
||||
观察点、陷阱处的寄存器改写、按路线(KPM/LKM/eBPF/
|
||||
Zygisk)的能力对照表,以及把这一层与另外两层叠加的
|
||||
@@ -362,7 +367,8 @@ scripts/ 参数化、与路径无关
|
||||
或裸地址列表;用真实交叉编译的 aarch64 .so 验证过
|
||||
vm_handler_slice.py 把解释器轨迹去虚拟化:dispatcher 识别、按分发入口切成
|
||||
handler 段、签名聚类,以及通过可选 handler→opcode 映射
|
||||
得到的 guest opcode 轨迹 —— 按开源 xvmp IR 虚拟机校准
|
||||
得到的 guest opcode 轨迹 —— 按开源 xvmp IR 虚拟机校准,
|
||||
并带 VM 嵌套调用的循环诊断
|
||||
rasc_build.py 构建并验证 rasc,即 ASC 索引器的 Rust 重实现:
|
||||
--check 检查已有什么、--build 克隆并 cargo、--verify 用
|
||||
droidasc 校验一个 APK,并在任何类集合差异上失败
|
||||
|
||||
Reference in new issue
Block a user