In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about several kinds of obfuscation technologies in Java. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
So far, the obfuscation technology is still the most basic protection method for the protection of Java programs. There are also many Java obfuscation tools, including commercial, free, and open source. Sun also provides its own obfuscation tools. Most of them confuse Class files, and there are a few tools to deal with the source code first, and then Class, which increases the intensity of confusion. At present, the commercially successful confusion tools include JProof's 1stBarrier series, Eastridge's JShrink and 4thpass.com 's SourceGuard.
The main obfuscation technologies can be classified according to obfuscation objectives as follows: symbolic obfuscation (Lexical Obfuscation), data obfuscation (Data Obfuscation), control obfuscation (Control Obfuscation), control flow reorganization (Control-flow restructuring), and preventive obfuscation (Prevent Transformation).
I. symbol confusion
In Class, there is a lot of information that has nothing to do with the execution of the program itself, such as method names, variable names, and the names of these symbols often have some meaning. For example, if a method is named getKeyLength (), it is likely to be used to return the length of the Key. Symbol confusion is to disrupt the information and turn it into meaningless representations, such as numbering all variables from vairant_001 and numbering all methods from method_001. This will bring some difficulties to decompilation. For private functions and local variables, you can usually change their symbols without affecting the running of the program. But for some interface names, public functions, member variables, if there are other external modules need to reference these symbols, we often need to keep these names, otherwise the external module can not find these methods and variables. Therefore, most obfuscation tools provide a wealth of options for symbolic obfuscation, allowing users to choose whether and how to do symbolic obfuscation.
Second, data confusion
Data obfuscation is the confusion of the data used by the program. There are also many methods of confusion, which can be divided into changing data storage and coding (Store and Encode Transform) and changing data access (Access Transform).
Changing data storage and coding can disrupt the way the program uses data storage. For example, a 10-member array is split into 10 variables, and the names of these variables are confused; a two-dimensional array is converted into an one-dimensional array, and so on. For some complex data structures, we will disrupt their data structures, such as replacing a complex class with multiple classes.
Another way is to change data access. For example, when accessing the subscript of an array, we can do some calculation. Figure 5 is an example. In the practice of confusion, these two methods are usually used in combination, disrupting not only the data storage, but also the way of data access. After confusing the data, the semantics of the program becomes complex, which increases the difficulty of decompilation.
III. Control confusion
Control confusion is to confuse the control flow of the program, which makes the control flow of the program more difficult to decompil. usually, the change of control flow requires some additional calculation and control flow, so it will have a negative impact on the performance of the program. Sometimes, there is a tradeoff between the performance of the program and the degree of confusion. The techniques for controlling confusion are the most complex and the most skillful. These technologies can be divided into the following categories:
Adding confusion control can hide the original semantics of the program by adding additional and complex control flow. For example, for two statements An and B executed sequentially, we can add a control condition to determine the execution of B. In this way, disassembly is made more difficult. But all interference control should not affect the execution of B.
IV. Control flow reorganization
Reorganizing the control flow is also an important method of confusion. For example, a program calls a method, and after confusion, the method code can be embedded in the calling program. Conversely, a piece of code in the program can be converted into a function call. In addition, for the control flow of a loop, it is a control flow that can split multiple loops, or convert the loop into a recursive process. This method is the most complex, and there are a lot of researchers.
V. Preventive confusion
This confusion is usually designed for specialized decompilers, and in general, these techniques take advantage of decompilers' weaknesses or Bug to design obfuscation schemes. For example, some decompilers do not decompile instructions that follow Return, while some obfuscation schemes put code just after Return statements. The effectiveness of this confusion has different effects on different decompilers. A good obfuscation tool usually uses a combination of these obfuscation techniques.
Thank you for reading! This is the end of this article on "there are several confusion technologies in Java". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.