计算机应用 ›› 2017, Vol. 37 ›› Issue (6): 1803-1807.DOI: 10.11772/j.issn.1001-9081.2017.06.1803

• 计算机软件技术 • 上一篇    下一篇

基于同余方程和改进的压扁控制流的混淆算法

王岩1,2,3, 黄章进1,2,3, 顾乃杰1,2,3   

  1. 1. 中国科学技术大学 计算机科学与技术学院, 合肥 230027;
    2. 中国科学技术大学 安徽省计算与通信重点实验室, 合肥 230027;
    3. 中国科学技术大学 先进技术研究院, 合肥 230027
  • 收稿日期:2016-11-15 修回日期:2016-12-21 出版日期:2017-06-10 发布日期:2017-06-14
  • 通讯作者: 黄章进
  • 作者简介:王岩(1991-),男,山东济南人,硕士研究生,CCF会员,主要研究方向:软件技术、程序优化;黄章进(1980-),男,湖北天门人,副教授,博士,CCF会员,主要研究方向:计算机图形学、图形处理器计算;顾乃杰(1961-),男,江苏南通人,教授,硕士,CCF会员,主要研究方向:并行算法、并行处理、并行体系机构。
  • 基金资助:
    安徽省自然科学基金资助项目(1408085MKL06);高等学校学科创新引智计划项目(B07033)。

Obfuscating algorithm based on congruence equation and improved flat control flow

WANG Yan1,2,3, HUANG Zhangjin1,2,3, GU Naijie1,2,3   

  1. 1. School of Computer Science and Technology, University of Science and Technology of China, Hefei Anhui 230027, China;
    2. Anhui Province Key Laboratory of Computing and Communication Software, University of Science and Technology of China, Hefei Anhui 230027, China;
    3. Institute of Advanced Technology, University of Science and Technology of China, Hefei Anhui 230027, China
  • Received:2016-11-15 Revised:2016-12-21 Online:2017-06-10 Published:2017-06-14
  • Supported by:
    This work is partially supported by the Anhui Provincial Natural Science Foundation (1408085MKL06), the Program for Innovation of the Discipline Higher Education (B07033).

摘要: 针对现有控制流混淆算法的混淆结果单一的问题,提出了一种基于同余方程和改进的压扁控制流混淆算法。首先,使用密钥和一组同余方程来生成源代码的基本块中需要使用的不透明谓词;其次,基于Logistic混沌映射提出了一种新的N态不透明谓词构造算法,并将其应用到现有的压扁控制流算法中,对现有的压扁控制流算法进行改进;最后,将上述两个对源码进行混淆的算法结合,以此来增加源代码中控制流的复杂度,使其更难被破解。与现有的基于混沌不透明谓词的压扁控制流算法相比,所提混淆算法使混淆后代码的防篡改攻击时间平均提高了22%以上,总圈复杂度平均提高了34%以上。实验结果表明,所提算法能够保证混淆后程序执行结果的正确性并且具有很高的圈复杂度,能够有效地抵抗静态攻击和动态攻击。

关键词: 代码混淆, N态不透明谓词, 同余方程, 压扁控制流算法

Abstract: Aiming at the simple obfuscating result of the existing control flow obfuscating algorithm, an obfuscating algorithm based on congruence equation and improved flat control flow was presented. First of all, a kind of opaque predicate used in the basic block of the source code was created by using secret keys and a group of congruence equation. Then, a new algorithm for creating N-state opaque predicate was presented based on Logistic chaotic mapping. The proposed algorithm was applied to the existing flat control flow algorithm for improving it. Finally, according to the combination of the above two proposed algorithms for obfuscating the source code, the complexity of the flat control flow in the code was increased and make it more difficult to be cracked. Compared with the flat control flow algorithm based on chaotic opaque predicate, the code's tamper-proof attack time of the obfuscated code was increased by above 22% on average and its code's total cyclomatic complexity was improved by above 34% on average by using the proposed obfuscating algorithm. The experimental results show that, the proposed algorithm can guarantee the correctness of execution result of the obfuscated program and has a high cyclomatic complexity, so it can effectively resist static and dynamic attacks.

Key words: code obfuscation, N-State opaque predicate, congruence equation, flat control flow algorithm

中图分类号: