XuanJia: 一种基于虚拟化的综合代码混淆器用于二进制保护
XuanJia: A Comprehensive Virtualization-Based Code Obfuscator for Binary Protection
AI总结:
XuanJia是一种基于虚拟化的综合代码混淆器,通过消除异常处理元数据泄漏,实现对二进制保护的端到端保护。
摘要:
基于虚拟化的二进制混淆被广泛用于保护软件知识产权,但现有方法在保护异常处理(EH)元数据时留有漏洞,以保持ABI兼容性。这些暴露的元数据泄露了丰富的结构信息,如堆栈布局、控制流边界和对象生命周期,这些信息可以被利用来促进逆向工程。在本文中,我们提出了XuanJia,一种综合的基于虚拟机的二进制混淆框架,为可执行代码和异常处理语义提供端到端的保护。XuanJia的核心是ABI兼容的异常阴影机制,这是一种新型的异常感知保护机制,能够在不修改操作系统运行时的情况下保持兼容性,同时消除静态异常处理元数据的泄漏。XuanJia用ABI兼容的阴影展开信息替代原生异常处理元数据,以满足操作系统驱动的展开需求,并安全地将异常处理重定向到受保护的虚拟机中,在虚拟机中使用混淆代码解密、逆向和回放真实的异常处理语义。我们从零开始实现XuanJia,支持385种x86指令编码和155种虚拟机处理模板,并将其设计为一个可扩展的研究测试平台。我们从正确性、鲁棒性和性能维度评估了XuanJia。我们的结果表明,XuanJia在广泛的动态和符号测试中保持语义等价性,有效干扰了如IDA Pro等自动逆向工程工具,并导致空间开销微小且运行时开销适度。这些结果表明,XuanJia在不牺牲正确性或实用性的情况下实现了对异常处理逻辑的强保护。
英文摘要:
Virtualization-based binary obfuscation is widely adopted to protect software intellectual property, yet existing approaches leave exception-handling (EH) metadata unprotected to preserve ABI compatibility. This exposed metadata leaks rich structural information, such as stack layouts, control-flow boundaries, and object lifetimes, which can be exploited to facilitate reverse engineering. In this paper, we present XuanJia, a comprehensive VM-based binary obfuscation framework that provides end-to-end protection for both executable code and exception-handling semantics. At the core of XuanJia is ABI-Compliant EH Shadowing, a novel exception-aware protection mechanism that preserves compatibility with unmodified operating system runtimes while eliminating static EH metadata leakage. XuanJia replaces native EH metadata with ABI-compliant shadow unwind information to satisfy OS-driven unwinding, and securely redirects exception handling into a protected virtual machine where the genuine EH semantics are decrypted, reversed, and replayed using obfuscated code. We implement XuanJia from scratch, supporting 385 x86 instruction encodings and 155 VM handler templates, and design it as an extensible research testbed. We evaluate XuanJia across correctness, resilience, and performance dimensions. Our results show that XuanJia preserves semantic equivalence under extensive dynamic and symbolic testing, effectively disrupts automated reverse-engineering tools such as IDA Pro, and incurs negligible space overhead and modest runtime overhead. These results demonstrate that XuanJia achieves strong protection of exception-handling logic without sacrificing correctness or practicality.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。