Abstract
Android applications are usually obfuscated before release, making it difficult to analyze them for malware presence or intellectual property violations. Obfuscators might hide the true intent of code by renaming variables and/or modifying program structures. It is challenging to search for executables relevant to an obfuscated application for developers to analyze efficiently. Prior approaches toward obfuscation resilient search have relied on certain structural parts of apps remaining as landmarks, un-touched by obfuscation. For instance, some prior approaches have assumed that the structural relationships between identifiers are not broken by obfuscators; others have assumed that control flow graphs maintain their structures. Both approaches can be easily defeated by a motivated obfuscator. We present a new approach, Macneto, to search for programs relevant to obfuscated executables leveraging deep learning and principal components on instructions. Macneto makes few assumptions about the kinds of modifications that an obfuscator might perform. We show that it has high search precision for executables obfuscated by a state-of-the-art obfuscator that changes control flow. Further, we also demonstrate the potential of Macneto to help developers understand executables, where Macneto infers keywords (which are from the relevant unobfuscated program) for obfuscated executables.
Introduction
Android developers and security analysts often need to search for code similarity to detect plagiarism, identify vulnerable third-party libraries, or analyze malware. However, most Android apps are obfuscated before release. Basic obfuscators rename variables, but advanced "industrial-strength" tools like Allatori encrypt strings, inject junk code, and rewrite control flow. Existing search tools usually rely on "landmarks"—like control flow graph shapes—which these advanced obfuscators easily destroy. This research addresses the need for a search method that is semantics-aware and resilient to radical structural changes.
Methodology
MACNETO creates a robust "fingerprint" of an executable through a four-stage pipeline:
- Instruction Distribution (ID): Instead of structural order, MACNETO counts instruction frequencies. It groups similar operations (e.g., all "add" types) into 252 distinct categories, including Android API calls.
- Principal Component Analysis (PCA): To find the "essence" of the code and optimize search speed, PCA projects these 252-dimensional vectors into a 32-dimensional Principal Component Vector (PCV).
- Deep Learning (ANN): A three-layer Artificial Neural Network is trained for invariance. It learns to map both original and obfuscated versions of an app to the same PCV, effectively filtering out "obfuscation noise."
- Obfuscation Resilient Search: During deployment, an unknown obfuscated app's PCV is predicted by the ANN. MACNETO then uses cosine similarity to find the closest matches in a database of known, un-obfuscated apps.
The core insight is that while structure is easily changed, the statistical distribution of what a program does (its instruction mix) is much harder to alter without breaking functionality.
Experimental Evaluation
The study utilized 1,559 real-world Android apps from F-Droid, processed with the Allatori obfuscator. The system was evaluated using 8-fold cross-validation.
MACNETO achieved a Top@1 precision of up to 84%, meaning the correct original app (or a very similar one) was the top result in most queries. As shown in the experimental results, it significantly outperformed both a "Naïve" approach (using raw counts) and a "Pure PCA" approach (without deep learning).
Beyond search, MACNETO demonstrated the ability to infer keywords (e.g., "game," "QR") for obfuscated apps by analyzing the descriptions of top search results, even when the original app's text was completely obscured.
Conclusion
MACNETO provides a high-precision, efficient solution for searching obfuscated Android executables by prioritizing instruction semantics over fragile structural features. While potential vulnerabilities exist regarding massive "junk code" injection, the deep learning-based de-noising approach offers a significant step forward in obfuscation resilience. Future work will explore autoencoders for improved behavior representation and user studies to validate the practical utility of inferred keywords for security analysts.
Summary updated