Code obfuscation is the process of making applications difficult or impossible to decompile or disassemble, and the retrieved application code more difficult for humans to parse. Obfuscation is part of a broader mobile application shielding strategy.
The goal of code obfuscation is to prevent any unauthorized party from accessing and gaining insight into the logic of an application, which prevents them from extracting data, tampering with code, exploiting vulnerabilities, and more.
Mobile applications can be reverse engineered using readily available disassemblers and/or decompilers, making it easy for hackers to access and analyze the source code of your applications.
Then hackers can:
Steal intellectual property
Extract sensitive information
Add malicious code to apps and repackage them
Data of a sensitive nature may include:
Valuable intellectual property (such as custom algorithms)
In-app payment mechanisms
Keys (API keys, hardcoded encryption keys etc.)
Credentials (database passwords etc.)
The logic behind server communication
& much more
Code obfuscation protects mobile applications from reverse engineering and hacking.
Application developers must harden the code at various layers. This is the only way to achieve the level of protection necessary to safeguard sensitive data and property in mobile applications.
Where Code Obfuscation Fits into a Broader Security Strategy
Application shielding is a broad term for the process of making it more difficult for hackers to reverse engineer or modify an app. There are various techniques that can be used for application shielding, including code obfuscation and other code hardening techniques, as well as runtime mobile application self-protection (RASP).
A robust combination of application shielding techniques will deter the vast majority of hackers.
Why use code obfuscation?
All of this is undertaken without altering the function of the code or the end user experience in a meaningful way.
Code obfuscation strategies include:
- Renaming classes, fields, methods, libraries etc.
- Altering the structure of the code
- Transforming arithmetic and logical expressions
- Encryption of strings, classes etc.
- Removing certain metadata
- Hiding calls to sensitive APIs, and more
Types of code obfuscation
There are several techniques available today to obfuscate code. These include:
Definition: The replacement of readable names in the code by difficult to decipher alternatives
Control Flow Obfuscation
Definition: The modification of the logical structure of the code to make it less predictable and traceable
Definition: The conversion of simple arithmetic and logical expressions into complex equivalents
Definition: The transformation of method implementation into instructions for randomly generated virtual machines