论文标题
HyperDBG:重新发明硬件辅助调试(扩展版)
HyperDbg: Reinventing Hardware-Assisted Debugging (Extended Version)
论文作者
论文摘要
软件分析,调试和逆向工程对当今软件行业产生了关键影响。高效且隐秘的调试者与恶意软件分析特别相关。但是,由于可检测到的指纹,复杂性和实施限制,现有的调试平台无法解决透明,有效和高性能的低级调试器。在本文中,我们介绍了HyperDBG,这是一种新的管理范围辅助调试器,用于对用户和内核应用程序进行高性能和隐形调试。为此,HyperDBG依赖于当今CPU中可用的最新硬件功能,例如VT-X和扩展页面表。与其他广泛使用的现有辩论者相反,我们使用自定义机体范围设计了HyperDBG,使其独立于OS功能或API。我们通过扩展页面表提出了基于硬件的指令级仿真和OS级API挂钩,以提高隐身性。我们对10,853个恶意软件样本的动态分析结果表明,HyperDBG的隐身性平均比WINDBG和X64DBG分别进行22%和26%的样本调试。此外,与现有的辩论者相反,13个经过测试的包装工和保护器中的任何一个都没有检测到HyperDBG。我们通过部署兼容VMX兼容的脚本引擎,消除了不必要的上下文开关来改善其他调试者的性能。我们对三个具体调试场景的实验表明,与WINDBG相比,HyperDBG分别更快地将WINDBG作为唯一的内核调试器,有条件的断裂和Syscall记录,分别是2.98倍,1319x和2018x。我们最终显示了现实世界中的应用程序,例如0天分析,逆向工程,软件性能分析和代码覆盖分析的结构重建。
Software analysis, debugging, and reverse engineering have a crucial impact in today's software industry. Efficient and stealthy debuggers are especially relevant for malware analysis. However, existing debugging platforms fail to address a transparent, effective, and high-performance low-level debugger due to their detectable fingerprints, complexity, and implementation restrictions. In this paper, we present HyperDbg, a new hypervisor-assisted debugger for high-performance and stealthy debugging of user and kernel applications. To accomplish this, HyperDbg relies on state-of-the-art hardware features available in today's CPUs, such as VT-x and extended page tables. In contrast to other widely used existing debuggers, we design HyperDbg using a custom hypervisor, making it independent of OS functionality or API. We propose hardware-based instruction-level emulation and OS-level API hooking via extended page tables to increase the stealthiness. Our results of the dynamic analysis of 10,853 malware samples show that HyperDbg's stealthiness allows debugging on average 22% and 26% more samples than WinDbg and x64dbg, respectively. Moreover, in contrast to existing debuggers, HyperDbg is not detected by any of the 13 tested packers and protectors. We improve the performance over other debuggers by deploying a VMX-compatible script engine, eliminating unnecessary context switches. Our experiment on three concrete debugging scenarios shows that compared to WinDbg as the only kernel debugger, HyperDbg performs step-in, conditional breaks, and syscall recording, 2.98x, 1319x, and 2018x faster, respectively. We finally show real-world applications, such as a 0-day analysis, structure reconstruction for reverse engineering, software performance analysis, and code-coverage analysis.