基于同余方程和改进的压扁控制流的混淆算法
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:Obfuscating algorithm based on congruence equation and improved flat control flow
  • 作者:王岩 ; 黄章进 ; 顾乃杰
  • 英文作者:WANG Yan;HUANG Zhangjin;GU Naijie;School of Computer Science and Technology,University of Science and Technology of China;Anhui Province Key Laboratory of Computing and Communication Software,University of Science and Technology of China;Institute of Advanced Technology,University of Science and Technology of China;
  • 关键词:代码混淆 ; N态不透明谓词 ; 同余方程 ; 压扁控制流算法
  • 英文关键词:code obfuscation;;N-State opaque predicate;;congruence equation;;flat control flow algorithm
  • 中文刊名:JSJY
  • 英文刊名:Journal of Computer Applications
  • 机构:中国科学技术大学计算机科学与技术学院;中国科学技术大学安徽省计算与通信重点实验室;中国科学技术大学先进技术研究院;
  • 出版日期:2017-06-10
  • 出版单位:计算机应用
  • 年:2017
  • 期:v.37;No.322
  • 基金:安徽省自然科学基金资助项目(1408085MKL06);; 高等学校学科创新引智计划项目(B07033)~~
  • 语种:中文;
  • 页:JSJY201706050
  • 页数:5
  • CN:06
  • ISSN:51-1307/TP
  • 分类号:289-293
摘要
针对现有控制流混淆算法的混淆结果单一的问题,提出了一种基于同余方程和改进的压扁控制流混淆算法。首先,使用密钥和一组同余方程来生成源代码的基本块中需要使用的不透明谓词;其次,基于Logistic混沌映射提出了一种新的N态不透明谓词构造算法,并将其应用到现有的压扁控制流算法中,对现有的压扁控制流算法进行改进;最后,将上述两个对源码进行混淆的算法结合,以此来增加源代码中控制流的复杂度,使其更难被破解。与现有的基于混沌不透明谓词的压扁控制流算法相比,所提混淆算法使混淆后代码的防篡改攻击时间平均提高了22%以上,总圈复杂度平均提高了34%以上。实验结果表明,所提算法能够保证混淆后程序执行结果的正确性并且具有很高的圈复杂度,能够有效地抵抗静态攻击和动态攻击。
        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.
引文
[1]苏庆,吴伟民,李忠良,等.混沌不透明谓词在代码混淆中的研究与应用[J].计算机科学,2013,40(6):155-159.(SU Q,WUW M,LI Z L,et al.Research and application of chaos opaque predicate in code obfuscation[J].Computer Science,2013,40(6):155-159.)
    [2]COLLBERG C,THOMBORSON C,LOW D.A taxonomy of obfuscating transformations,TR#148[R].Auckland,New Zealand:U-niversity of Auckland,1997.
    [3]COLLBERG C,THOMBORSON C,LOW D.Manufacturing cheap,resilient,and stealthy opaque constructs[C]//Proceedings of the 25th ACM SIGLAN-SIGACT Symposium on Principles of Programming Languages.New York:ACM,1998:184-196.
    [4]COLLBERG C,THOMBORSON C,LOW D.Breaking abstractions and un-structuring data structures[C]//ICCL'98:Proceedings o1998 International Conference on Computer Languages.Piscataway,NJ:IEEE,1998:28-38.
    [5]COLLBERG C S,THOMBORSON C D,LOW D W K.Obfuscation techniques for enhancing software security:US,6668325[P].2003-12-23.
    [6]ARBOIT G.A method for watermarking Java programs via opaque predicates[C/OL]//Proceedings of the 2002 International Conference on Electronic Commerce Research.[2016-10-16].http://profs.scienze.univr.it/~giaco/download/Watermarking-Obfuscation/sp-paper.pdf.
    [7]MYLES G,COLLBERG C.Software watermarking via opaque predicates:implementation,analysis,and attacks[J].Electronic Commerce Research,2006,6(2):155-171.
    [8]袁征,冯雁,温巧燕,等.构造一种新的混淆Java程序的不透明谓词[J].北京邮电大学学报,2007,30(6):103-106.(YUANZ,FENG Y,WEN Q Y,et al.Manufacture of a new opaque predicate for Java programs[J].Journal of Beijing University of Posts and Telecommunications,2007,30(6):103-106.)
    [9]WANG C X.A security architecture for survivability mechanisms[D].Charlottesville,VA:University of Virginia,2001:65-68.
    [10]吴伟民,林水明,林志毅.一种基于混沌不透明谓词的压扁控制流算法[J].计算机科学,2015,42(5):178-182.(WU WM,LIN S M,LIN Z Y.Chaotic-based opaque predicate control flow flatten algorithm[J].Computer Science,2015,42(5):178-182.)
    [11]陈代梅,范希辉,朱静,等.基于同余方程和中国剩余定理的混淆算法[J].计算机应用研究,2015,32(2):485-488.(CHEND M,FAN X H,ZHU J,et al.Obfuscation algorithms based on congruence equation and Chinese remainder theorem[J].Application Research of Computers,2015,32(2):485-488.)
    [12]王兴元,朱伟勇.二维Logistic映射中混沌与分形的研究[J].中国图象图形学报,1999,4(4):340-344.(WANG X Y,ZHUW Y.Researches on chaos and fractal of the coupled Logistic map[J].Journal of Image and Graphics,1999,4(4):340-344.)
    [13]潘承洞,潘承彪.简明数论[M].北京:北京大学出版社,1998:150-162.(PAN C D,PAN C B.Simplified Number Theory[M].Beijing:Peking University Press,1998:150-162.)
    [14]赵玉洁,汤战勇,王妮,等.代码混淆算法有效性评估[J].软件学报,2012,23(3):700-711.(ZHAO Y J,TANG Z Y,WANGN,et al.Evaluation of code obfuscating transformation[J].Journal of Software,2012,23(3):700-711.)
    [15]LACCHIA M.Radon:a code metrics tool in Python[EB/OL].[2016-10-16].https://pypi.python.org/pypi/radon.