Code obfuscation is a form of technology that goes on to make the life of the reverse engineers by making the code safe and secure. It goes on to turn the actual source code to an understandable code. When you are in an obfuscated code, the names of the variables would be changed into a form of a random hex. Even unnecessary loops or variables would be added indicating no reverse engineer might be able to have an idea about it.
The scenario where you would obfuscate the code
Let us take an example where your company is working on the commercial application and obviously it is paid. Even you might have gone on to release the first version. After a couple of days you will come to know that the app would be available as a free download on the website of 3rd torrent. A feeling of sadness is bound to emerge in such cases. The reason being your years of hard work have gone over the internet.
Such a situation could have been prevented if you had compiled and released into the market. It is going to prevent the real source code before it would be viewed by any reverse engineer. Now the question is how as already mentioned code obfuscation is bound to alter the variable names in the form of numbers or unnecessary loops so that it becomes really difficult to understand it.
Numerous obfuscates are present on the internet, as some of them will be free whereas the others is going to be open source. Their presence is important to obfuscate the code.
The benefits and points to guard for code obfuscation
Code obfuscation has a series of benefits.
- Code shrinking- often it would remove the unused code. If the code has an empty else, then during obfuscation it will be removed
- Protection of the source code- this seems to be obvious
- Optimization- Because of code shrinking, the code that is obfuscated, which is optimized
Though there are numerous benefits there are certain points to guard
- The malicious applications would be obfuscated- the creators of malicious apps would obfuscate the code so as to bypass the anti -virus protection.
- Anti – virus might be in trouble- the moment you go on to visit a website that has an obfuscated code
To sum up thins obfuscation of a code is important when you work on an app. numerous decompiles are available on the internet. Though it goes on to protect the code to a large extent but take note of the fact everything is hack able.