Article
GodFather
GodFather - Part 1 - A multistage dropper
29 août 2025
Randorisec - Shindan
Authors: Paul (R3dy) Viard
This article is the first installment in a comprehensive technical analysis of the GodFather malware. In this part, we focus specifically on the packing technique used by the dropper responsible for distributing the latest, more sophisticated variant of the malware, first identified by Zimperium in June.
According to their report, this dropper:
Uses a session-based installation technique to install the actual payload on the victim’s device, in order to bypass the accessibility permissions restrictions.
Special thanks to Fernando Sanchez Ortega for providing a sample of this new variant.
Informations | Value |
|---|---|
SHA256 |
|
Package name |
|
State of Art
As the first part of this article, the state of the art will focus on droppers that employ the same dispensing technique.
In August 2022, Google released Android 13 (API level 33), introducing Restricted Settings as a security and privacy enhancement. This feature prevents applications installed from unknown sources from automatically receiving sensitive permissions and capabilities.
Before and after the introduction of this feature, many droppers adapted their distribution techniques:
BugDrop, uncovered by ThreatFabric in August 2022, was still under development at the time of discovery, as indicated by numerous incomplete code sections. Notably, the presence of the string
"com.example.android.apis.content.SESSION_API_PACKAGE_INSTALLED"suggested an intent to leverage session-based installation.SecuriDropper, identified by ThreatFabric in November 2023, successfully used the session-based installation API to side-load malicious payloads such as SpyNote and Ermac.
TiramisuDropper also utilizes session-based installation, extracting the payload from an APK embedded within the assets folder, as described in this analysis.
Our analysis focuses on one of the most recent variants, with the SHA-256 hash:49002e994539fa11eab6b7a273cf90272dda43aa3dd9784fde4c23bf3645fdcb
Anti-Reversing technique
We couldn't open the APK using jadx-gui because of an encrypted entry error.
Using unzip showed us that files are password protected. However, this is a misinterpretation of the tool. APKs cannot function properly with encrypted core files like classes.dex or resources.arsc. This trick is often used to confuse basic tools and hinder static analysis, while the application remains fully functional on Android devices.
Inspecting the APK with zipdetails revealed that the General Purpose Bit Flag values have been modified, and an extra JADXBLOCK section has been added to some files.
Each file within a .ZIP archive has a local file header preceding its data. These local file headers follow a consistent structure.

General Purpose Bit Flag is a field in the local file header that controls how the file is stored and processed. Modified flags may indicate tampering, encryption or special handling.
Setting bit 0 of the General Purpose Bit Flag to 1, marks the file as encrypted. Here, this APK deliberately set this bit without actually encrypting the file.
A Python script is provided in the Annexes to disable the tampering on the APK
Nevertheless, the archive structure is deliberately crafted so that tools like jadx or apktool replace essential APK files, such as AndroidManifest.xml, resources.arsc, and classes.dex, with directories bearing the same names, effectively concealing the original contents.
For example, using unzip to extract the archive, results in a misleading output:
In this case, the real classes.dex file conflicts with the folder of the same name, forcing a rename during extraction with "unk_classes.dex". This technique is a form of archive obfuscation meant to confuse both analysis tools and manual reviewers, making it harder to locate key APK files after extraction.
Understanding the Manifest
Using Androguard, we converted the Android Binary XML to a readable XML file.
According to Android Developers documentation:
The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play.
First, let's take a look at the Android versions targeted and the name of the package used by the dropper.
SDK Targeting & package
The application uses the package name com.metaprescutal.systematist and targets Android 13 (API level 33).
Next, to understand the capabilities of this variant, we need to examine the permissions it requests.
Requested Permissions
The AndroidManifest.xml file includes two noteworthy permissions: REQUEST_INSTALL_PACKAGES and QUERY_ALL_PACKAGES.
REQUEST_INSTALL_PACKAGESallows the application to prompt the user to install other APK files, typically used by marketplaces or updaters.QUERY_ALL_PACKAGESgives the app visibility into all installed packages on the device, bypassing the scoped package visibility restrictions introduced in Android 11 (API level 30).
The presence of both permissions is significant. It suggests that the dropper may attempt to bypass recent restrictions enforced by Google on newer Android versions, particularly Android 13 and above. In these versions, Google has tightened controls around package visibility and app installations to limit abuse by malicious apps.
We'll explore how the malware potentially leverages these permissions to bypass security policies in the Dropper - Stage 2 part.
Finally, we will examine the application’s declared components, including its activities, as defined in the manifest file. This analysis helps identify potential entry points, UI decoys and behavior triggers used by the dropper.
Application & Activities
According to Android Developers documentation, the android:name is:
The fully qualified name of an Application subclass implemented for the application. When the application process is started, this class is instantiated before any of the application's components.
In this case, it's:
It often serves as an initial entry point for malware to perform early-stage tasks such as setting up dynamic class loaders, modifying system properties or preparing the execution environment as we will see in Dropper - Stage 1.
Here is a relevant snippet from the AndroidManifest.xml:
Then, three activities in the com.metaprescutal.systematist package are listed. One of them is worth noting as it represents the application's entry point com.metaprescutal.systematist.gresil.
In a nutshell, the manifest reveals a custom Application class com.henguhbrehti.rthierhtjhrt.b which is likely responsible for early initialization and preloading of malicious components. Combined with the presence of multiple exported activities and a clearly defined launcher activity (com.metaprescutal.systematist.gresil), these elements suggest a carefully structured dropper designed to evade detection and prepare the environment for subsequent stages.
In the next section, Dropper – Stage 1, we will analyze the behavior of this Application class and uncover the techniques it employs to load and execute the actual malicious payload.
Dropper - Stage 1
This sample of the GodFather malware employs a multistage dropper architecture, a common technique used to evade detection and obfuscate malicious behavior (in this case, hiding the technique used to side-load the core of GodFather).
The initial stage acts as a loader or stub, whose main purpose is to dynamically load the actual dropper code at runtime. It achieves this by embedding a ZIP archive from the application assets, which contains two encrypted
dexfiles.
Once the tampering flags applied to the APK are removed, we proceeded to open it in jadx-gui for analysis.
The package com.metaprescutal.systematist, which defines critical components such as the UI entry point, is absent from the decompiled code, suggesting that it is dynamically loaded at runtime.
Before dissecting how the second stage is deployed, understanding how the sample is obfuscated is essential, especially since all the strings are encrypted.
Multiple Obfuscations
Strings
To hide important strings such as filename or encryption algorithm names, the malware calls a function, renamed as decryptStrings, with an integer key as parameter, that returns a XOR decrypted string.
Each decimals are converted into signed bytes, XORed and then returned as a string with the UTF-8 charset.In the above example, the returned string is "classes.zip".
A Python script is provided in the Annexes to assist analysts in the strings decryption process.
Dead codes
To obfuscate the malicious code as much as possible, threat actors can add dead codes. These lines will never be executed during runtime, to make detection of intrusive functions more complicated.
For instance, inside the decryption strings function:
These obfuscation techniques make code analysis more time-consuming and slow down analysts' work.
Nevertheless, by deciphering its strings, we are able to understand how the dropper's core code is loaded.
Dynamic Code Loading
Following the execution of the attachBaseContext method in the com.henguhbrehti.rthierhtjhrt.b class, we identified the code responsible for accessing a file stored in the application assets directory.
The malware opens a file named bhgdtczzkbjacwee from the assets folder:
Using standard Linux command-line tools such as file and unzip, we examined the file and retrieved information about its format and contents.
unzip -l : list files (short format)
The file bhgdtczzkbjacwee is actually a .zip archive containing two DEX files: classes2.dex and classes.dex. This pattern suggests that the dropper loads multiple payloads from the `assets` folder using a ZIP archive as a container.
The malware first creates a ZIP file inside the cache directory of the file system. It then extracts both .dex files and stores them in a newly created dex directory. This folder is used to store the .dex file that will later be executed in memory.
After extraction, the malware constructs a list of DEX files using:
Each file in the fileArray is then passed through a decryption routine, preparing the payloads for dynamic loading and execution in the next phase.
DES Decryption
During execution, each file in fileArray is processed by the malware’s custom decryption routine. The loop iterates over all entries and performs the following operations:
Each file is passed to the decryptFile() function, which handles two key operations: decompression and decryption.
Step 1: Decompression (DEFLATE Algorithm)
The first stage involves decompressing the file using the DEFLATE algorithm. Internally, the malware leverages Java’s built-in InflaterInputStream and InflaterOutputStream classes:
This indicates that the original .dex files are stored in a compressed format to reduce file size and evade static detection.
Step 2: DES Decryption
After decompression, the next stage is decryption using the DES (Data Encryption Standard) algorithm. The malware uses a hardcoded key "ahwxshehavinqtgz"
This decryption step transforms the compressed and encrypted payloads into valid, readable DEX files that are loaded dynamically by the malware at runtime.
A Java snippet is available in the Annexes, which extracts the two dex files from the bhgdtczzkbjacwee archive, decompress and decrypt them.
To continue our analysis, we executed the provided code. As a result, two files are created:
These .dex files represent the second stage of the dropper payload dynamically loaded in memory. With these decrypted files, we are able to statically inspect the second stage of the dropper.
Dropper - Stage 2
> The second stage of the dropper bypasses the Restricted Settings feature added by Google on Android 13 which forbid side-loaded applications (applications from non-official app-stores) to request Accessibility settings, Notification Listener access and Display over apps.
Bypass restriction
Opening the two newly decrypted .dex files inside jadx-gui revealed the missing package com.metaprescutal.systematist, including its entry-point: .gresilclass.
Within the onCreate method of this class, numerous Base64-encoded strings are used to populate the user interface.
These strings are written in Turkish and indicate that the malware tries to imitate a Turkish music download platform.
For example:
This fake interface serves as a social engineering lure, encouraging the user to grant permissions under the pretense of unlocking full application functionality.

In parallel, the malware programmatically checks whether it can request installation permissions by invoking:
According to Android Developers documentation:
Checks whether the calling package is allowed to request package installs through package installer.
In order to use this function, the application must declare in the manifest the REQUEST_INSTALL_PACKAGES permissions, as seen earlier in the article.
Subsequently, the malware issues an intent requesting the MANAGE_UNKNOWN_APP_SOURCES permission using the startActivityForResult function with the request code 100.

This action opens a system dialog, prompting the user to allow installations from unknown sources specifically for this app. It serves as a preparatory step, enabling the malware to install an external APK, which contains the core payload of the GodFather banking trojan, without further user intervention.
Next, when the MANAGE_UNKNOWN_APP_SOURCES is accepted, the malware continues to the method onRequestPermissionsResult.
If the request code is 100, the snippet below calls again canRequestPackageInstalls and uses the shared preferences key "permission" to store the value "ok", meaning that the permission has been accepted.
Following the onCreate method in the Android activity lifecycle, the malware proceeds to execute the onResume method. This function is responsible for verifying whether the user has granted the necessary permission to proceed to the component of the dropper.
The logic checks whether the Shared Preferences key "permission"contains the string "ok".If so, the application calls the levoglucose activity to continue the infection chain.
In the newly loaded class levoglucose, the control flow follows a typical Android activity pattern. The onCreate method is used to setup a new content view.Immediately after, the activity transitions into onResume which calls a custom showDialog function if GodFather package named "com.heb.reb", isn't installed on the system.
This method sets up an AlertDialog that repeatedly prompts the user to install a plugin, specifically the GodFather core APK. Like the previous class, Base64-encoded strings are used to prompt the user to click on the UPLOAD button of the AlertDialog.
When the user interacts with the AlertDialog by clicking the confirmation button, the dropper initiates a new app installation process via the Android PackageInstaller API.

Specifically, the code invokes:
The malware explicitly requests a full installation session (MODE_FULL_INSTALL). This mode allows the malware to install an entire APK file, not just incremental updates, effectively enabling it to side-load and deploy the next stage of its payload without relying on external tools or user-initiated actions beyond the initial tap.
Once the session is created, the method calls a custom function named addApkToInstallSession with 2 parameters : a filename umbras.apk and the session.
The following function is responsible for loading the file umbras.apk from the application assets folder and writing it into the packageInSession:
As soon as umbras.apk is written inside the session, showDialog method commits the install session, which starts the actual APK installation using the package installer session.
In addition, it uses a PendingIntent to restart the activity class leveoglucose when the install is complete.
Back to onResume again after restarting the activity, the APK is now installed on the system with the package name "com.heb.reb" and then started via the launchIntentForPackage intent.

At this stage, the GodFather core application is now installed on the device and directly launched via the previous code. Once active, the core program immediately requests Accessibility Service privileges, enabling it to bypass user interaction barriers. With these elevated permissions, the malware can perform a wide range of intrusive actions on the victim’s phone, effectively transitioning from the dropper phase to full spyware functionality.
