• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2012, Vol. 34 ›› Issue (1): 79-85.

• 论文 • 上一篇    下一篇

基于程序流敏感的自修改代码混淆方法

何炎祥,陈勇,吴伟,陈念,徐超,刘健博,苏雯   

  1. (武汉大学计算机学院软件工程国家重点实验室,湖北 武汉 430072)
  • 收稿日期:2010-05-20 修回日期:2010-10-26 出版日期:2012-01-25 发布日期:2012-01-25

A Program FlowSensitive SelfModifying Code Obfuscation Method

HE Yanxiang,CHEN Yong,WU Wei,CHEN Nian,XU Chao,LIU Jianbo,SU Wen   

  1. (State Key Lab of Software Engineering,
    School of Computer Science,Wuhan University,Wuhan 430072,China)
  • Received:2010-05-20 Revised:2010-10-26 Online:2012-01-25 Published:2012-01-25

摘要:

自修改代码混淆方法是一种隐藏程序重要信息的有效技术。为减少代码混淆造成的额外开销而又不影响代码混淆的质量,利用程序流敏感分析方法选择比较重要的指令进行混淆。为提高代码混淆的质量,有效地防止反汇编,提出一个二步比较混淆模型。该模型包括两个子混淆器,混淆器1采用程序流敏感分析方法获得混淆的指令并产生两个混淆代码文件和一个混淆代码映射文件。混淆器2通过比较两个混淆代码文件精确地定位混淆指令在二进制代码中的位置,然后利用混淆代码映射文件对二进制代码进行混淆,以进一步提高代码混淆的质量。通过实验分析,混淆后二进制文件的额外开销只占整个代码的3%左右,并且混淆后的反汇编代码明显异于原始的反汇编代码,甚至出现了一些无法识别的错误指令。

关键词: 程序流敏感, 自修改代码, 代码混淆, 二进制数据定位, 代码保护

Abstract:

Selfmodifying code obfuscation is an effective technique to hide the important information of programs. In this paper, we focus on reducing the cost of obfuscated codes and enhancing the degree of obfuscation to use a flowsensitive method to select the obfuscated codes that are important relatively such as control instruction and propose a twostep comparing obfuscation model that can locate the obfuscated instructions in binary codes precisely that can help change these codes to illegal codes to defense the disassembly. The model contains two parts. The first part uses the flowsensitive analyses to get the obfuscated instructions and generate two obfuscated codes and one obfuscated code mapping file. Then, the second part compares these two obfuscated codes to generate the final obfuscated codes containing the illegal instruction codes based on the obfuscated code mapping file. Through the experiments, the obfuscated instructions are about 3% of the whole codes and the disassemble codes are much different with the source codes and even some error instructions appear.

Key words: program flowsensitive;selfmodifying codes;code obfuscation;binary codes location;code protection