Obfuscation As a Protection of Intellectual Property
Obfuscation is the process of transforming bytecode to a less human-readable form with the purpose of complicating reverse engineering. It typically includes stripping out all the debug information, such as variable tables and line numbers, and renaming packages, classes, and methods to machine-generated names. Advanced obfuscators go further and change the control flow of Java code by restructuring the existing logic and inserting bogus code that will not execute. The premise of the obfuscation is that the transformations do not break the validity of the bytecode and do not alter the exposed functionality.
Obfuscation is possible for the same reasons that decompiling is possible: Java bytecode is standardized and well documented. Obfuscators load Java class files, parse their formats, and then apply transformations based on supported features. When all the transformations are applied, the bytecode is saved as a new class file. The new file has a different internal structure but behaves just like the original file.
Obfuscators are especially necessary for products and technologies in which the implementation logic is delivered to the user. That is the case for HTML pages and JavaScript where the product is distributed in source code form. Java doesn't fare much better because, even though it is typically distributed in binary bytecode, using a decompiler as described in the previous chapter can produce the source code—which is almost as good as the original.
本文介绍了代码混淆作为保护知识产权的方法。代码混淆将字节码转换为难以阅读的形式,增加逆向工程难度,包括去除调试信息、重命名包和类等。由于Java字节码标准化,混淆器可加载、解析并转换类文件。对于以源代码形式分发的HTML和JavaScript,以及可反编译出源码的Java,混淆器尤为必要。
2590

被折叠的 条评论
为什么被折叠?



