反编译x86深度神经网络可执行文件
Decompiling x86 Deep Neural Network Executables
摘要:
由于它们在异构硬件设备上的广泛使用,深度学习(DL)模型由DL编译器编译成可执行文件,以充分利用低级硬件原语。这种方法允许在各种计算平台上以低成本进行DL计算,包括CPU、GPU和各种硬件加速器。我们提出了BTD(Bin to DNN),这是一个针对深度神经网络(DNN)可执行文件的反编译器。BTD获取DNN可执行文件并输出完整的模型规范,包括DNN操作符的类型、网络拓扑、维度和参数,这些参数与输入模型的参数(几乎)相同。BTD提供了一个实用的框架来处理由不同DL编译器编译的DNN可执行文件,并在x86平台上启用了全面优化。它采用基于学习的技术来推断DNN运算符,动态分析来揭示网络架构,符号执行来帮助推断DNN运算符的维度和参数。我们的评估表明,BTD能够准确恢复具有数百万参数的复杂DNN的完整规范(例如,ResNet)。恢复的DNN规范可以被重新编译为新的DNN可执行文件,该新的DNN可执行文件表现出与输入可执行文件相同的行为。我们表明,BTD可以提高两个代表性的攻击,对抗性的例子生成和知识窃取,对DNN可执行文件。我们还展示了使用BTD的跨架构遗留代码重用,并设想将BTD用于其他关键的下游任务,如DNN安全加固和修补。
英文摘要:
Due to their widespread use on heterogeneous hardware devices, deep learning (DL) models are compiled into executables by DL compilers to fully leverage low-level hardware primitives. This approach allows DL computations to be undertaken at low cost across a variety of computing platforms, including CPUs, GPUs, and various hardware accelerators. We present BTD (Bin to DNN), a decompiler for deep neural network (DNN) executables. BTD takes DNN executables and outputs full model specifications, including types of DNN operators, network topology, dimensions, and parameters that are (nearly) identical to those of the input models. BTD delivers a practical framework to process DNN executables compiled by different DL compilers and with full optimizations enabled on x86 platforms. It employs learning-based techniques to infer DNN operators, dynamic analysis to reveal network architectures, and symbolic execution to facilitate inferring dimensions and parameters of DNN operators. Our evaluation reveals that BTD enables accurate recovery of full specifications of complex DNNs with millions of parameters (e.g., ResNet). The recovered DNN specifications can be re-compiled into a new DNN executable exhibiting identical behavior to the input executable. We show that BTD can boost two representative attacks, adversarial example generation and knowledge stealing, against DNN executables. We also demonstrate cross-architecture legacy code reuse using BTD, and envision BTD being used for other critical downstream tasks like DNN security hardening and patching.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。