Android apk How to harden to prevent being cracked (prevent reverse compilation)

Source: Internet
Author: User

Now the main tool is to touch the SDK, in order to prevent the game pack from being cracked compiled, and to discover the encrypted string, I would like to share the following points: anti-cracking technology is mainly four ways to achieve: 1. Code obfuscation (Proguard) technology 2. Technology Dynamic Library Technology of signature comparison 4. Dynamic loading Technology 5. Third-party platform encryption and detection vulnerability this Android security how to decompile and encrypt APK package The relevant knowledge points are also mentioned in this article.

The first: Code obfuscation Technology (Proguard) This technology is mainly for code obfuscation, reducing the readability of the code after the reverse compilation, but the technology can not prevent Shell technology shell (added to the charge, advertising, viruses and other code), and as long as the careful person, still can the code can still reverse analysis of code, So the technology does not solve the problem from the root, but increases the difficulty of cracking.

The second type: Signature comparison technology This technology mainly prevents shell technology, but the risk of code reverse analysis still exists. And the technology does not fundamentally solve the problem of Packers, if the cracker will be signed than the code comments off, and then compiled back, the technology has been cracked.

Third: NDK. So dynamic Library technology, the implementation of this technology is to put all the important core code in the C file, the use of NDK technology, the core code compiled into a. So dynamic library, and then called by JNI. Although the technology can protect the core code, the risk of being Packers still exists.

Fourth: Dynamic loading technology, which is a relatively mature technology in Java, and the technology has not been fully exploited in Android.
Fifth: third-party platform uses the fourth method, the technology can effectively prevent reverse analysis, cracked, shell and other problems, Dynamic loading technology is divided into the following steps: The jar package that compiles the core code into a DEX file encrypts the jar package, decrypts it using the NDK at the main entrance of the program, and uses the ClassLoader to dynamically load the jar package using the reflection technology to ClassLoader Set the ClassLoader of the system.

The main advantages are: The core code in the jar is encrypted, so the cracker can not extract the class file, if the encryption key is cracked to get, it will be another level of security issues. The technology can also effectively prevent the shell technology, the code is dynamically loaded up, the shell of the Cracker program can not be added to the encrypted jar package, timely cracker injected shell program entrance, shell program because not in the ClassLoader jar package, www.lieqibiji.com/ Www.myqunliphoto.com/www.senta7.net therefore cannot be executed unless the cracker replaces the ClassLoader jar package and turns off the NDK decryption code. But this installation to the mobile phone, is no longer our application, the user must      It will be uninstalled.   Therefore, a comprehensive comparison, the fourth dynamic loading technology is the safest, but the efficiency of the problem, I did not do a rigorous test, a rough experiment, the efficiency has not been significantly reduced. www.ycyc66.cn/Cloud Entertainment www.yunfeizao.cn Fiyun International Fun Pack Encryption encrypt decrypt file//}//get secret

The jar file that needs to be converted (absolute path) For example: 12 then encrypt the jar file with the encryption tool and then load it dynamically via code:}}}      1234567891011121314151617181920212223 The main advantages are: The core code in the jar is encrypted, so the cracker can not extract the class file, if the encryption key is cracked to get, it will be another level of security issues. The technology can also effectively prevent the shell technology, the code is dynamically loaded up, the shell of the Cracker program can not be added to the encrypted jar package, timely cracker injected shell program entrance, shell program because not in the ClassLoader jar package, www.lieqibiji.com/ Www.myqunliphoto.com/www.senta7.net therefore cannot be executed unless the cracker replaces the ClassLoader jar package and turns off the NDK decryption code. But this installation to the mobile phone, is no longer our application, the user must      It will be uninstalled.   Therefore, a comprehensive comparison, the fourth dynamic loading technology is the safest, but the efficiency of the problem, I did not do a rigorous test, a rough experiment, the efficiency has not been significantly reduced. www.ycyc66.cn/Cloud Entertainment www.yunfeizao.cn Fiyun Entertainment package encryption encryption decrypt file//}//get secret 24252627282930313233343536373839 processing complete if in Applicatio It is also possible to do special treatment in N. Some people have analyzed the encryption of love encryption, but there is no elaboration, interested can be discussed together.

Android apk How to harden to prevent being cracked (prevent reverse compilation)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.