Modern cloud computing systems distribute software executables over a network to keep the software sources, which are typically compiled in a security-critical cluster, secret. We develop ERIC, a new, efficient, and general software obfuscation framework. ERIC protects software against (i) static analysis, by making only an encrypted version of software executables available to the human eye, no matter how the software is distributed, and (ii) dynamic analysis, by guaranteeing that an encrypted executable can only be correctly decrypted and executed by a single authenticated device. ERIC comprises key hardware and software components to provide efficient software obfuscation support: (i) a hardware decryption engine (HDE) enables efficient decryption of encrypted hardware in the target device, (ii) the compiler can seamlessly encrypt software executables given only a unique device identifier. Both the hardware and software components are ISA-independent, making ERIC general. The key idea of ERIC is to use physical unclonable functions (PUFs), unique device identifiers, as secret keys in encrypting software executables. Malicious parties that cannot access the PUF in the target device cannot perform static or dynamic analyses on the encrypted binary. We develop ERIC's prototype on an FPGA to evaluate it end-to-end. Our prototype extends RISC-V Rocket Chip with the hardware decryption engine (HDE) to minimize the overheads of software decryption. We augment the custom LLVM-based compiler to enable partial/full encryption of RISC-V executables. The HDE incurs minor FPGA resource overheads, it requires 2.63% more LUTs and 3.83% more flip-flops compared to the Rocket Chip baseline. LLVM-based software encryption increases compile time by 15.22% and the executable size by 1.59%. ERIC is publicly available and can be downloaded from https://github.com/kasirgalabs/ERIC
Khaos: The Impact of Inter-procedural Code Obfuscation on Binary Diffing Techniques
软件混淆技术通过对第三方代码进行混淆,防止二进制差分技术定位脆弱代码,达到保护嵌入式设备软件的目的。随着二元差分技术的迅速发展,通过提取函数内部的特征,可以实现越来越精确的函数匹配和识别。这使得现有的软件混淆技术,主要集中在过程内的代码混淆,不再有效。在本文中,我们提出了一个新的过程间代码混淆机制Khaos,它通过使用编译优化将代码跨函数移动以混淆函数。提出了两种混淆原语来分离和聚合函数,分别称为裂变和融合。Khaos的原型是基于LLVM编译器实现的,并在大量真实世界的程序上进行了评估,包括SPEC CPU 2006 & 2017,CoreUtils,JavaScript引擎,实验结果表明,Khaos算法优于现有的代码混淆算法,可以显著降低五种二进制差分算法的正确率(低于19%),运行时开销更低(低于7%)。
Obfuscating Code Vulnerabilities against Static Analysis in JavaScript Code
University of Verona(维罗纳大学);University of Cagliari(卡利亚里大学);School of Advanced Defense Studies (CASD)(高级防务研究学院(CASD));National Interuniversity Consortium for Informatics(国家大学间信息学联盟)