Font Size: a A A

Research And Implementation Of Anti-reversal Method Based On Python Opcode

Posted on:2018-06-30Degree:MasterType:Thesis
Country:ChinaCandidate:X Q WangFull Text:PDF
GTID:2348330512486740Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
Python programming language since its birth in the 20th century,90 years,thanks to its simple and easy to learn,simple and concise syntax,scalability,support for object-oriented and many other advantages,has been widely used in systems management tasks and Web programming and many other areas.However the bytecode file(.pyc)com-piled from Python source code file(.py),which written in Python programming lan-guage,is easily decompiled by the reverse tool,that will not only infringes the devel-oper's intellectual property and economic interests,but also has serious security hidden danger.But at the same time,the code confusing technology,file encryption technology,local compilation technology,digital watermarking technology and other anti-reversal method is lack of security,easily resulting in the decrease of byte code file's efficiency,or application's volume increases and other issues.So this paper working on anti-reversal strategy the of Python bytecode files's op-erate code replacement and merging,The main contents and achievements of this paper include the following three aspects:(1)By the analysis of Python runtime framework and the Python bytecode file' s compilation execution,base on the characteristics of Python Virtual Machine work on bytecode file's opcodes one by one,simplify the bytecode file's co_code domain,set up the opcode sequence and it's basic block model of the bytecode file.(2)Focus on the lack of security of existing code obfuscation technology and digi-tal watermarking technology,This article based on the opcode sequence in the bytecode file,combined with the single table replacement encryption,design an opcode replace-ment strategy for Python opcodes.The strategy is replace the opcodes in the opcode sequence to achieve the purpose of change the contents opcode sequence contents and achieve the purpose of anti-reverse.At Last,implement the opcode replacement strat-egy in Python 2.7.9 and according to the single table replacement encryption's charac-teristic,use the opcodes' statistical law,evaluate the it's security.(3)Aim at the efficiency problem caused by file encryption technology and stor-age problem of the native compile technology,this article design a opcode merge strat-egy.This strategy base on the opcode sequence in the bytecode file,take peephole op-timization technique to merge a serious of opcodes who located in same basic block to a expanded value.The opcode mergeing strategy not only greatly decrease the length opcodes sequence and change it's structure and content but also achieve the purpose of reverse.At last,the opcode merging stratagy is implement in Python 2.7.9,and evalu-ate and experimente on the security,execution efficiency,and file size of the bytecode file generated by the strategy.
Keywords/Search Tags:Python, Bytecodefile, Virtual Machine, Anti-reversal Engine, Opcode Re-placement, Opcode Merging
PDF Full Text Request
Related items