Categories
Risk Management

How Your Android App Can Be Stolen for Hacking

Reading Time: 5 minutes

Android is the most common mobile OS by far, cornering 87% of the market share — a number which is expected to grow. Android’s open platform and extensive library of resources make it easy for developers to create and integrate new apps. However, the same features that make Android easy for developers to use also make it easy for hackers to exploit

Android apps have become the most widely used alternative to desktop software. Because apps are used for banking, shopping, and transmitting personal information, they’re a prime target for cybercriminals. One of the most common methods hackers use to carry out various attacks is reverse engineering your code.

1. Reverse Engineering

Android’s open environment makes it an easy target for reverse engineering. Reverse engineering analyzes an app to figure out how it works and its design and implementation process. This is done by examining the compiled code, observing the app during runtime, or both. There are numerous free tools available to reverse engineer the binary code of Android apps. 

Attackers can use reverse engineering to steal your intellectual property, modify your code, attack your back-end systems, discover security vulnerabilities, and gain access to confidential data. The first step in almost all Android hacking attempts is reverse engineering the code. 

2. Repackaging Attacks

Repackaging, or cloning, attacks are a problem for apps of all sizes. Hackers often take good but not very popular apps and reverse engineer their code. They then modify the code to suit their purpose, which could be embedding malware to steal credentials or ad revenue. The modified code is then repackaged, and consumers may be convinced to install it, thinking they’re installing a trusted app. Another variation of the repackaging app is when hackers rebrand an app and publish it as their own, often making more than the original developer. 

3. String Table Analysis

String tables are frequently used for storing sensitive information such as license keys, credentials, and other confidential data on both the client and server sides. Hackers can analyze the string tables to gather information, identify algorithms, understand database designs, and more. The string table may contain the data they want to steal, or they may use the information they gather to launch a different type of attack. 

4. Functional Cross Referencing

Cross-referencing can help hackers determine where a particular function was called from. They can use that to detect vulnerable code they can use to execute malware or find the code that does the encryption of data they want to steal. Cross-referencing can show how information was accessed, which is invaluable to hackers trying to steal intellectual property, sensitive data, or insert malicious code. 

5. Debugging and Emulator Attacks

Hackers can use debuggers and emulators for dynamic analysis during runtime. Using these tools, they’re able to identify vulnerabilities and exploit them with runtime attacks. Unlike the other methods, these attacks require active hardening. Your app needs to be able to modify its behavior and response during runtime if an active threat is detected. 

Preventing Reverse Engineering With Obfuscation

Almost any code can be reverse-engineered given enough time and resources. However, obfuscating your code can make it more difficult, expensive, and time-consuming for hackers to reverse engineer. The free decompilers make it extremely simple for hackers to reverse engineer code that isn’t obfuscated. 

If your code is obfuscated, hackers are more likely to give up and move on rather than investing time and money into reverse engineering the source code. Code obfuscation can consist of a number of different techniques designed to disguise your code from hackers while not interfering with its execution. 

Data obfuscation 

Data obfuscation scrambles data via tokenization or encryption to make it unreadable to hackers. 

Code obfuscation 

Obfuscating your code makes it look like unusable nonsense to hackers. There are many ways to obfuscate your code, and your hardening process should use a layered approach to make it harder to crack. At PreEmptive, we employ a range of different obfuscation techniques to provide a high level of security. 

Our DashO security application provides passive hardening through the following types of code obfuscation: 

Rename obfuscation 

Renaming changes the name of methods and variables. 

String encryption 

Even when you rename your methods and variables, your strings may still be discoverable. String encryption provides an additional layer of security to your software by making it harder for threat agents to decipher and understand.

Protecting Against Runtime Attacks

Obfuscating your data and code isn’t enough to secure your Android app. You also need to use active hardening to protect against runtime attacks. Some of the methods DashO uses to deflect runtime hacking attempts include: 

Tamper detection and defense

You can prohibit or modify your app’s behavior if it detects an unauthorized attempt to gain access. 

Root detection and defense

Jailbreaking a device compromises the security of your app. Control whether your app will run on a rooted device and how it will respond.

Emulator detection and defense

Running an app on an emulator allows a hacker to understand and analyze an app’s functioning in a controlled environment. DashO can sense when your app is being used in an emulator. You can decide whether or not your app will run in an emulator and how it will respond if it is. 

Hooking detection and defense

Hackers use hooking frameworks to modify your app at runtime without altering the binaries. If DashO detects a hooking framework, the app can respond by shutting down, throwing an exception, or sending an alert, among other options. 


Multi-faceted App Hardening

App hardening

To protect your Android app from ever-evolving cybersecurity threats, you must take a multi-pronged approach. However, hardening your app is pointless if your app breaks as the runtime platform evolves. At PreEmptive, we are constantly monitoring, testing, and upgrading our solutions to protect your app from runtime issues and to respond to new hacker threats and tools.

Your organization can’t afford the expense, exposure, or possible brand damage associated with having your app hacked. Contact us today to find out how our solutions can integrate with your current DevOps practices to provide the security and protection you need.