Check patentability & draft patents in minutes with Patsnap Eureka AI!

Scrambling and obfuscating method for Lua language and decryption method

A language and conversion method technology, applied in the field of program scrambling and obfuscation, can solve the problems of hindering reverse engineering, lack of obfuscation methods, and difficulty in assembling instructions, and achieve the effect of preventing reverse or tampering

Inactive Publication Date: 2016-02-24
北京鼎源科技有限公司
View PDF3 Cites 24 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] CullenLinn studied the object code obfuscation technology from another angle in "Obfuscation of executable code to improve resistance to static Disassembly". Through the analysis of the disassembly process, an obfuscation method can hinder reverse engineering, making it very difficult to obtain the assembly instructions of the program or to obtain the assembly of the program correctly. instruction
[0007] To sum up, most of the existing scrambling and obfuscation methods are for C language and Java language, and lack of mature obfuscation methods for Lua language

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
  • Scrambling and obfuscating method for Lua language and decryption method
  • Scrambling and obfuscating method for Lua language and decryption method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0065] In order to confuse 500 Lua source code files in a certain folder, firstly, preprocess them, perform lexical analysis and syntax analysis on the Lua source code, and obtain the data dictionary and abstract syntax tree. The data dictionary stores variable names, function names, parameter names, table names, etc., and the abstract syntax tree stores the abstract syntax structure of the source code. According to the requirements of the function item, choose to perform the encryption or decryption process.

[0066] In the encryption process, the Lua source code file is recursively read, and the Lua source code is initially confused by the minimum vocabulary sorting method. The minimum vocabulary sorting method is specifically: according to the position k of the string in the array, k is modulo 26 , set the resulting remainder to num, add the numth lowercase letter to the head of the new character, divide k after each remainder by 26 and round to get a new k, repeat the abov...

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 present invention discloses a scrambling and obfuscating method for the Lua language and a decryption method. The scrambling and obfuscating method for the Lua language comprises: using a code preprocessing method, an obfuscating method and a call stack conversion method to perform lexical analysis on code and establish a data dictionary, wherein word sequences are combined into grammar phrases so as to obtain an abstract syntax tree; performing primary obfuscation by using a minimum vocabulary ranking method; and performing high-level obfuscation by using a control flow obfuscating method, so that the obfuscated Lua source code cannot be understood while a semantic meaning is not changed, so as to achieve an objective that program code is protected without affecting normal execution of the program. During decryption, the Lua source program code is read, and the source code is reversed according to a correspondence stored in the data dictionary, so as to acquire decrypted Lua code, i.e, the Lua source program code before scrambling and obfuscating. According to the scrambling and obfuscating method and the decryption method provided by the present invention, copyright protection can be effectively performed on a Lua source program, and the reverse or tampering of the Lua source program can be prevented.

Description

technical field [0001] The invention relates to a program scrambling and obfuscation method, in particular to a Lua language-oriented scrambling and obfuscation method and a decryption method. Background technique [0002] With the increasing popularity of computer technology and the rapid development of the software industry, at the same time, there are more and more attacks, unauthorized use and pirated copies of software by attackers using software reverse technology. Reverse analysis technology can be used to analyze the functional flow of the application program, tamper with the data code of the application program, etc. without knowing the source code of the application program. If the reverse analysis technology is used maliciously without restriction, the user can analyze and obtain the application program. The core technology of the program can also tamper with the signature and author information of the application, and can also inject malicious code into the exist...

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
IPC IPC(8): G06F21/14
CPCG06F21/14
Inventor 文伟平
Owner 北京鼎源科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More