[Paper Review] GANG-MAM: GAN based enGine for Modifying Android Malware
This paper proposes GANG-MAM, a GAN-based framework that generates adversarial feature vectors to modify existing Android malware while preserving its malicious functionality. The system uses a Generative Adversarial Network (GAN) to produce evasion-inducing feature vectors, which are then applied via a modular APK modification engine (MAM) to repackaged malware, successfully evading classifiers without altering core behavior, as validated on 10 real APKs with minimal runtime differences.
Malware detectors based on machine learning are vulnerable to adversarial attacks. Generative Adversarial Networks (GAN) are architectures based on Neural Networks that could produce successful adversarial samples. The interest towards this technology is quickly growing. In this paper, we propose a system that produces a feature vector for making an Android malware strongly evasive and then modify the malicious program accordingly. Such a system could have a twofold contribution: it could be used to generate datasets to validate systems for detecting GAN-based malware and to enlarge the training and testing dataset for making more robust malware classifiers.
Motivation & Objective
- To develop a system that generates adversarial Android malware samples that evade machine learning-based malware detectors.
- To enable the creation of large-scale, robust training and testing datasets for malware classifiers by generating evasive malware variants.
- To support research into detecting GAN-generated malware by providing a reproducible tool for generating such samples.
- To maintain the functional integrity of modified malware after feature perturbation through automated APK reassembly.
- To offer a modular, open-source tool that decouples GAN-based feature generation from APK modification for flexible use in research.
Proposed method
- A Generative Adversarial Network (GAN) is trained to generate feature vectors that are adversarial to a given malware classifier, making the malware appear benign.
- The GAN's output is a modified feature vector that induces evasion by altering static APK characteristics such as permissions, components, and manifest entries.
- The MAM (Malware Modifier) engine parses the input APK using Apktool, modifies the specified features based on the GAN-generated vector, and rebuilds the APK.
- The tool supports dynamic feature modification via smali code injection for new activities, services, broadcast receivers, and content providers.
- The modified APK is signed and tested in an Android emulator using the 'monkey' utility to ensure functional equivalence before and after modification.
- Feature changes are specified via a CSV input file, enabling independent use of the MAM engine without the GAN component.
Experimental results
Research questions
- RQ1Can a GAN be effectively used to generate feature vectors that make Android malware undetectable by machine learning-based classifiers?
- RQ2To what extent can the functional behavior of modified malware be preserved after adversarial feature perturbations?
- RQ3Can the proposed system generate large-scale, diverse, and realistic adversarial malware samples for training and testing robust classifiers?
- RQ4How effective is the MAM engine in modifying APKs without altering their core malicious functionality?
- RQ5Can the tool be used independently for generating modified APKs from precomputed feature vectors, enabling modular use in research pipelines?
Key findings
- The GANG-MAM system successfully modified 10 real-world Android APKs with minimal functional changes, as evidenced by nearly identical execution logs before and after modification.
- Only 1–3 lines of difference were observed in execution logs across 10 tested APKs, all attributable to non-functional factors like timestamps or dynamic inputs.
- The modified APKs maintained their original behavior and functionality when tested in an Android emulator using the 'monkey' tool with the same seed.
- The system demonstrated that adversarial feature vectors generated by the GAN can be effectively mapped to concrete, executable changes in the APK structure without breaking the application.
- The MAM engine successfully handled various feature types (permissions, components, etc.) and supported smali-level code injection for new components.
- The tool is fully functional in both end-to-end mode (with GAN) and standalone mode (using precomputed feature vectors), enabling flexible deployment in research workflows.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.