Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for achieving code obfuscation through finite automaton

A technology of code obfuscation and code, applied in the field of computer programs, to achieve the effect of increasing difficulty

Inactive Publication Date: 2016-06-29
国家信息技术安全研究中心
View PDF5 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This is a very serious security issue

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for achieving code obfuscation through finite automaton
  • Method for achieving code obfuscation through finite automaton
  • Method for achieving code obfuscation through finite automaton

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0015] Example 1: Such as figure 1 , figure 2 , image 3 , Figure 4 As shown, a method of using finite automata to achieve code obfuscation is not limited to the past obfuscation methods and then a little innovation, changing the soup without changing the medicine, but based on the new language features provided by C++11\14, using a A brand-new way and cooperating with finite automata for code obfuscation, not only improves efficiency but also is easy to implement.

[0016] By using the new features provided by the C++11\14 language standard, the template meta-programming feature of the compiler is used to realize a variety of obfuscators, including hidden string obfuscators, non-explicit call function obfuscators, and automatic The machine model performs various debugging and identification functions, and then realizes the protection of software or special code fragments.

[0017] A method for implementing code obfuscation using finite automata, including the following technica...

Embodiment 2

[0036] Example 2: Such as figure 1 , figure 2 , image 3 , Figure 4 As shown, a method for implementing code obfuscation using finite automata includes the following steps:

[0037] Step 1. Obfuscate the constant string; for the constant string A in the program source code to be obfuscated, perform the following steps:

[0038] Step 1-1: Randomly select one of the preset encryption methods as the encryption method for the constant string A; among them, the preset encryption method needs to meet the symmetric encryption; this step should occur in the program compilation process, That does not affect the operating efficiency of the program;

[0039] Step 1-2: Use a time-based pseudo-random number algorithm to generate a random number K. The value K is used as the key used in the encryption method selected in step 1-1 to participate in the encryption of the constant string A; this step should happen In the process of program compilation, that does not affect the operating efficiency...

Embodiment 3

[0054] Example 3: Such as Figure 4 As shown, a method for implementing code obfuscation using finite automata, a Markov chain constructed when obfuscating function calls includes the following steps:

[0055] Step 1-1: Set several automata states. According to the complexity required in this example, set 5 states (State1, State2, State3, State4, State5), and use State1 as the starting state of the automaton and State5 as the end state of the automaton;

[0056] Step 1-2: Set the state you can jump to for each state. In this example, State1 can jump to State2, State3; State2 can jump to State3, State4; State3 can jump to State1 or its own state; State4 can jump to State3, State5; State5 will end the operation of the automaton;

[0057] Steps 1-3: Set the jump probability for all jumpable states of each state, and the sum of the jump probabilities of all jumpable states of each state must be 1.

[0058] In this example, State1 has a probability of 0.3 to jump to State2, and a probabi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for achieving code obfuscation through a Markov chain, and belongs to the field of computer safety.A constant character string in a code can be encrypted in a compiling stage of the program source code so as not to be recognized during disassembling; meanwhile, in a function calling process, an independent execution instruction is generated through a forward Markov chain code, in other words, the protected function is called after transfer of multiple states, function obfuscation in a running memory is achieved, and then software or a special code segment is protected.The constant character string and a function address can be effectively obfuscated, and reverse engineering analysis program difficulty is greatly increased.

Description

Technical field [0001] The invention relates to a method for implementing code obfuscation by using a finite automaton, and belongs to the technical field of computer programs. Background technique [0002] In recent years, with the advancement of information technology, a large number of excellent software and APP have been produced on the market, which provide many convenient functions. Currently, there are two main types of code obfuscation techniques, one is source code obfuscation and the other is binary code obfuscation. Among them, there are several types of source code obfuscation: direct source code obfuscation, preprocessing obfuscation, abstract syntax tree, byte code obfuscation (JAVA). However, due to the characteristics of the platform and language, these software can be easily cracked by reverse engineering to obtain highly readable source code (especially Android platform and JAVA language). Once cracked, not only will the author’s intellectual property rights b...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/14
CPCG06F21/14
Inventor 李京春陈瑞东杨韬向琦李冰卓中流梁利李战宝宫亚峰潘克峰刘楠孙浩云
Owner 国家信息技术安全研究中心
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products