← Back to index
Research / filed

Static analysis of nextgenmparivahana APK

A deep static analysis of a fake NextGen mParivahan dropper (com.apkinstallerstable) and its encrypted banking RAT payload (com.veltrix.documents): anti-analysis tradecraft, LCG cipher, and full C2 toolkit.

9,877 words45 min readFamily / dropper
Filed under
#android#malware#mparivahan#dropper#banking-trojan#reverse-engineering

This static analysis is done mostly by me and therefore there might be typos, missing sections/parts where I had completely forgot. This might be imperfect but this is me actually learning and putting effort and also having fun. Also, this is part 1 of a larger part where I analyze the APKs from maparivahan. Expect more of the same kind of APK analysis in the next coming days.

This APK is actually part of the same group of malware/fake android apps pertaining to rto-mparivahan APK in the sense that it is being spread by the same bot account on GitHub:

mparivahan malicious github profile

I aim to do two things at once in this analysis first I plan to do static analysis of the malicious APK and then compare it to the original legitimate APK.

THIS ANALYSIS WILL BE A LONG READ YOU HAVE BEEN WARNED.

Now the names and naming schemes by which the GitHub repository are named might sound ridiculous, similar and outright bizzare but I will try my best to make sense of it. I want to set some base knowledge here. The mparivahan repository from the maparivahan profile (or rather the bot) on GitHub accidentally uploaded the original and legitimate NextGen mParivahan app as an APK but later decided to delete it as you can see below:

the delete message

This was clearly a mistake, basically whoever is using the bot to upload the malicious APKs to GitHub they decided to download the legitimate NextGen mParivahan app and reverse engineered it to serve their goals. Meanwhile the bot kept making commits:

commit and delete

What Is NextGen mParivahan

NextGen mParivahan is the Government of India's mobile transport services application, developed by the National Informatics Centre, NIC, for the Ministry of Road Transport and Highways ecosystem. The official Android package is: com.nic.mparivahan Google Play currently lists the developer as National Informatics Centre, categorizes it as a government application, and shows 50M+ downloads. The current Play Store listing says it was updated on 16 August 2026.

The official Parivahan infrastructure also identifies mParivahan as a citizen facing platform for transport information and services.

So, in simple terms:

NextGen mParivahan is essentially the government's mobile interface to India's vehicle registration and driving licence ecosystem.

It is not itself the RTO database. It acts as a client/interface through which citizens can access information and services backed by government transport systems. There are several major things it does.

1. Vehicle registration lookup

You can enter an Indian vehicle registration number and retrieve available information about that vehicle.

The current official listing describes information including:

Owner information
Registration date
Registering authority
Make and model
Fuel type
Vehicle age
Vehicle class
Insurance validity
Fitness validity

This is useful for things such as checking a vehicle you encounter, verifying your own registration information, or researching a second hand vehicle.

There are limitations around what information is publicly exposed. The Ministry's data sharing policy specifies that mobile access to another person's vehicle or licence information is restricted to selected, non sensitive information, with some fields masked.


2. Virtual RC

This is one of the application's most important functions.

Instead of carrying only the physical Registration Certificate, you can obtain a digital representation of your RC through mParivahan.

The underlying system retrieves the relevant vehicle information from the government's transport databases and generates the virtual document.

The Ministry describes the virtual RC and virtual DL functionality as pulling information from the Vahan and Sarathi databases through APIs.

The app also provides an encrypted QR code associated with the virtual documents, which can be used for verification.


3. Virtual Driving Licence

The same concept applies to your Driving Licence.

You can retrieve your DL information and create a virtual DL within the application.

The government specifically states that citizens can access their own complete DL or RC information through mParivahan and DigiLocker, and that virtual DL and RC documents available through these systems have been notified as legally valid documents.

There are also government advisories specifically concerning acceptance of electronic DL and RC information presented through mParivahan and DigiLocker.


4. Checking your own vehicle

You can associate your vehicle with your mParivahan account and access its information rather than repeatedly entering the registration number.

This gives you a convenient place to check things such as:

RC status
Insurance validity
Fitness validity
PUC/PUCC validity
Tax status
Permit information
Vehicle status

The official Parivahan documentation describes mParivahan's backend connectivity as providing updated transport document status, including RC, DL, insurance, tax, fitness, PUCC, permit and challan history.


5. Driving licence services

NextGen mParivahan isn't merely an information lookup application.

The government's published service list includes numerous DL related services, including:

Search DL
Virtual DL
Duplicate DL
DL renewal
Change of address
DL replacement
DL extract
International Driving Permit
Update mobile number
Application status
View uploaded documents
Download forms

These services depend on the particular state and service being available through the underlying transport infrastructure.


6. Vehicle services

There is a similar collection of vehicle related services.

The published NextGen service list includes:

Search RC
Virtual RC
Duplicate RC
Change of address
Hypothecation termination
Hypothecation continuation
Hypothecation addition
NOC
RC particulars against fee
Application status
Download receipt
Payment status
Dispose application

Again, availability can depend on the state and the particular service.

The wider Parivahan system provides services such as registration, transfer of ownership, change of address and hypothecation related operations.


7. eChallan

NextGen mParivahan also interfaces with the eChallan ecosystem.

The official mParivahan service portal currently exposes separate categories for:

Sarathi
Vahan
eChallan

and lists numerous services under each.

The government's published NextGen service catalogue includes eChallan functions such as:

Challan status
Challan payment

So the app can act as a mobile access point for traffic offence and challan information.


8. PUC, insurance and other vehicle status

Another important function is keeping track of vehicle compliance information.

For a vehicle, the system can expose information such as:

Insurance validity
Fitness validity
PUCC validity
Tax status
Permit status
Vehicle status

The government explicitly describes mParivahan as a way for citizens to keep track of vehicle insurance and find PUC centres.


9. RTO and traffic office information

The current application also provides RTO and traffic office locations.

This fits the broader purpose of the application, which is to give citizens a single mobile interface for transport related information and services.


10. Notifications and transport information

The app can provide transport related notifications to citizens.

The Play Store listing specifically identifies:

Virtual RC/DL, encrypted QR code, information services, DL/RC search, transport notifications, and RTO/traffic office locations.

So it is not simply an APK that displays a static database. It is intended to communicate with government services and provide current information. Furtheremore, mParivahan sits on top of the government's broader transport information architecture.

Two major systems are:

VAHAN

VAHAN deals primarily with vehicle registration and related vehicle information.

SARATHI

SARATHI deals primarily with driving licences.

NIC developed and operates these systems across India's RTO infrastructure. Government documentation describes VAHAN and SARATHI as the core applications used for vehicle registration and driving licences. The official mParivahan portal itself groups its services under Sarathi, Vahan and eChallan.

Now that we have established that the actual NextGen mParivahan is a well known app in India since it is a legitimate govt app which helps with aforementioned services. We now move onto its static analysis phase and I will try keep it short and provide the interesting findings only.

NextGen mParivahan APK analysis

The app's Package Name is : com.nic.mparivahan

SHA256: c4c3cf45f05d176208041d17192b52f4484c1ba65f66924e2685581e5c7665e1
SHA1: edd52acd8020b6d1a05d3fbd96b195f108510a0c
MD5: 81096409b1ab159d9c6dde549295ea32

APK signature:

Owner/Issuer: CN=PMU Transport, OU=Transport, O=National Informatics Centre, L=Delhi, ST=Delhi, C=IN

Serial: 4611d5df

Valid: 2017-01-05 to 2041-12-30

Signature Algorithm: SHA256withRSA, 2048-bit RSA

SHA1: D5:3D:22:5E:B1:C9:6D:84:A2:CA:83:81:4D:37:3D:D0:F8:D7:D9:16

SHA256: 54:20:8E:16:EE:9D:32:1F:54:85:44:C2:56:B4:EB:A2:D4:04:4C:AA:D2:82:55:D2:55:78:B5:0C:19:0B:D9:AB

Permissions

All the permissions are justified for this app if you take into consideration the work it does. There are overall 16 (sixteen) total permissions: INTERNET ACCESS_NETWORK_STATE ACCESS_WIFI_STATE ACCESS_FINE_LOCATION ACCESS_COARSE_LOCATION CAMERA USE_BIOMETRIC USE_FINGERPRINT POST_NOTIFICATIONS RECEIVE_BOOT_COMPLETED VIBRATE WAKE_LOCK FOREGROUND_SERVICE HIDE_OVERLAY_WINDOWS com.google.android.c2dm.permission.RECEIVE (FCM) `com.nic.mparivahan.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION (signature)

Risk read: no SMS, CALL, CONTACTS, STORAGE, or device-admin. Location = RTO/traffic office + accident-report + reverse-geocode Camera = QR scan + docs + Face auth Biometric = login / virtual DL-RC unlock HIDE_OVERLAY_WINDOWS = anti-tapjacking

What each permission is for

PermissionPurpose
INTERNETCommunicate with government/backend services
ACCESS_NETWORK_STATEDetect network connectivity/type
ACCESS_WIFI_STATERead Wi-Fi connection state
ACCESS_FINE_LOCATIONPrecise location based features
ACCESS_COARSE_LOCATIONApproximate location
CAMERAQR scanning, document capture, face authentication
USE_BIOMETRICAndroid biometric authentication
USE_FINGERPRINTLegacy fingerprint authentication compatibility
POST_NOTIFICATIONSDisplay notifications
RECEIVE_BOOT_COMPLETEDReceive notification when Android finishes booting
VIBRATEHaptic feedback
WAKE_LOCKKeep device awake during certain operations
FOREGROUND_SERVICERun permitted long running foreground tasks
HIDE_OVERLAY_WINDOWSPrevent other apps from drawing overlays over sensitive UI
com.google.android.c2dm.permission.RECEIVEReceive Firebase Cloud Messaging notifications
com.nic.mparivahan.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSIONSignature protected internal broadcast permission

The permission set is actually useful for our later comparison because the absence of certain high risk permissions is informative too.

Notably, this legitimate APK does not request:

READ_SMS
RECEIVE_SMS
SEND_SMS
READ_CONTACTS
WRITE_CONTACTS
READ_EXTERNAL_STORAGE
WRITE_EXTERNAL_STORAGE
MANAGE_EXTERNAL_STORAGE
READ_CALL_LOG
READ_PHONE_STATE
BIND_DEVICE_ADMIN

However that does not mean certain permission in the legitimate NextGen mParivahan apk is not suspicious, sensitive & dangerous. For example ACCESS_FINE_LOCATION is a genuine double-edged sword and it can be used as spyware to track locations of an individual is just one such example. However context matters and in this regard the application has legitimate reasons to ask for such permissions.

Full AndroidManifest.xml of NextGen mParivahan.apk below:

legitmanifest

Moving on, The APK's DEX contains 55 filtered HTTP(S) endpoint strings. The screenshot shows these notable endpoints: https://delhiwq.napix.gov.in/nic/parivahan/mparivahan/ https://164.100.69.249:8443/sarathiservice/mob/authenticationaction.do?authtype=Anumathi https://vahan.parivahan.gov.in/vahancapi-common/getVehicleParticularDobj/ https://vahan.parivahan.gov.in/AFMS/#/ https://mparivahan.parivahan.gov.in/pdf/ https://sarathi.parivahan.gov.in/ https://reversegeocoding.nic.in https://staging.parivahan.gov.in/ https://staging.parivahan.gov.in/echallan/mparivahan-api/ https://staging.parivahan.nic.in/ https://traffic.delhipolice.gov.in/notice/api/pay-notice? https://firebaseinstallations.googleapis.com

Network Security Configuration

The APK contains:

res/xml/network_security_config.xml

with:

<domain-config cleartextTrafficPermitted="false">
    <domain>delhiwq.napix.gov.in</domain> → @raw/napix
    <domain>staging.parivahan.gov.in</domain> → @raw/staging_parivahan_ssl_cert
    <domain>mparivahan.parivahan.gov.in</domain> → @raw/mparivahan
</domain-config>

<base-config cleartextTrafficPermitted="false">

Application flags

The legitimate application declares:

name=Application
label=@string/app_name
icon=@drawable/ic_launcher

allowBackup=false
extractNativeLibs=false
hardwareAccelerated=true
largeHeap=true

requestLegacyExternalStorage=true
supportsRtl=true

taskAffinity=com.nic.mparivahan.Application

usesCleartextTraffic=true

There is an important apparent contradiction here:

usesCleartextTraffic=true

while the network security configuration has:

<base-config cleartextTrafficPermitted="false">

res/raw: mparivahan.crt (2508B), napix.crt (1880B), staging_parivahan_ssl_cert.crt (2470B). So despite usesCleartextTraffic=true , effective policy is no cleartext. This is the correct pattern for gov MITM protection. Fakes rarely ship these 3 custom CAs. The latter is the effective restriction where the network security configuration applies. In other words

And the APK contains these certificate files:

res/raw/mparivahan.crt
res/raw/napix.crt
res/raw/staging_parivahan_ssl_cert.crt

The important security property is that cleartext HTTP traffic is globally disabled through the base configuration.

The domain specific configuration also associates custom certificates with:

delhiwq.napix.gov.in
staging.parivahan.gov.in
mparivahan.parivahan.gov.in

So this is not simply an APK making ordinary HTTPS requests. It has an explicit certificate pinning/trust configuration for selected government endpoints. This will be particularly helpful for our later comparison with the suspicious APKs. Now that we have established that what the legitimate NextGen mParivahan app is and what it is and what permissions it require let us move to our Malicious candidate.

Static Analysis of nextgenmparivahana.apk

This is where things actually start to get interesting, readers might have already noticed the subtle extra character. Where NextGen mParivahan is a clean govt app, the so called nextgenmparivahana.apk is malicious by design.

The file identity of the APK is as below:

File name:nextgenmparivahana.apk File size: 23,918,609 bytes (~22.8 MB)| SHA-256e5666f91576db5e4fc31275d9672079e01e2507bb3cbfec632fb252adfc8c618| Package:com.apkinstallerstable| DEX:classes.dex (16,159,736 bytes) + classes2.dex (2,266,992 bytes), DEX v035| Native lib:lib/arm64-v8a/libandroidx.graphics.path.so (10,096 bytes, benign AndroidX graphics lib, not part of the malicious chain)| Assets of interest:assets/dbliqgnjl.dat (15,165,380 bytes, encrypted payload), assets/icon_display.png, assets/dexopt/baseline.prof/.profm| ZIP entries: 298 total; ~290 are junk/obfuscation entries

Unsurprisingly the Signature is INVALID. keytool -printcert -jarfile fails with SHA-256 digest error for AndroidManifest.xml. The APK cannot be attributed to any legitimate developer; it will fail apksigner verify. And, no NIC certificate material present. No com.nic.* code, no parivahan endpoints, no NIC trust anchors in fact none of the markers of the genuine app are present.

One of the very first glaring things one will see if they open it for analysis is that it lacks the very important AndroidManifest.xml. Take a look by yourself:

no xml

Do note that due to automatic renaming the original and legitimate NextGen mParivahan.apk came out as "nextgenmparivahan.apk", one must give a closer look to figure out that the mailicious apk name which has been kept unchanged is "nextgenmaparivahana.apk" with an extra "a" at the end.

As the reader can see that the Manifest is empty but one would be a fool to imagine that the AndroidManifest.xml is empty. It looks empty but its not, it is however damaged. The AndroidManifest.xml enty exists with 15,488 bytes or around 15.13 kilobytes. AndroidManifest.xml exists but its binary AXML chunk structure is tampered: aapt dump xmltree dies with ***BAD DEPTH, apktool crashes on it, and jadx's resource decoder renders nothing. So every normal tool will show you can empty manifest. Yet I still recovered the AndroidManifest.xml file. How? you might ask, well I did raw UTF-16LE string-pool extraction of that binary, the string pool itself is intact. Only the XML tree structure was lost which was assembled by hand. let us take a look at the AndroidManifest.xml file now:

manifest remade

Extracted:

xml
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.BIND_VPN_SERVICE" />
    <uses-permission android:name="android.permission.DUMP" />
    <permission android:name="com.apkinstallerstable.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
        android:protectionLevel="signature" />

As one can see the AndroidManifest.xml contains several high-value permissions. Lets decode and understand them one by one.

  • REQUEST_INSTALL_PACKAGES - the crown jewel. Lets the app request install of other APKs (the decrypted update.apk) via PackageInstaller + unknown-sources consent screen. A "transportr info" app has zero reason to hold this. This single permission reclassifies the app from viewer to installer
  • QUERY_ALL_PACKAGES - enumerate every installed app. Used by AppInfoHelper.checkAndLaunchIfInstalled()/resolveTargetPackage(): check whether the payload (com.veltrix.documents) is already present (then just launch it), and profile the victim device. Google restricts this to genuine installer/file-manager use cases.
  • BIND_VPN_SERVICE+ VpnServicecomponent - run a VPN tunnel (VpnKillService, VpnHelper.prepareVpn/stopVpn). In a dropper this is akill-switch: during install it can blackhole traffic, block the victim's own security VPN, or later MITM traffic. Note this is a signature-level binding the OS grants the tunnel once the user taps through one consent dialog, which the fake installer UI engineers.
  • RECIEVE_BOOT_COMPLETED(+QUICKBOOT_POWERON, incl. HTC variant) - start AutoLaunchRecieverat boot. Gurantees the drop completes even if the victoom reboots mid-install, and re-launches the payload afterward. Pure persistence.
  • FOREGROUND_SERVICE + FOREGROUND_SERVICE_DATA_SYNC - keep the install worker alive with a foreground notification while decrypting 15 MB and driving the PackageInstaller session, immune to background-execution limits and swipes (plus onTaskRemoved restart in code).
  • READ/WRITE_EXTERNAL_STORAGE - stage the decrypted APK (cache/apks/update.apk) and support the fallbackInstall() path (FileProvider + VIEW intent) on devices where session install fails.
  • INTERNET + ACCESS_NETWORK_STATE - highly important as one can tell the ability to access the network state and access internet grants it the ability to perform malicious actions at will.
  • POST_NOTIFICATIONS , specifically the foreground-service install notification and the "installation complete / tap to open" lures.
  • DUMP. Attached to the ProfileInstallReceiver baseline-profile receivers. Standard AndroidXdeclared permission, low risk, but notable: it shows the builder kept a fully standard Compose app scaffold and weaponized it, rather than writing malware from scratch.
  • com.apkinstallerstable.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION (signature). Custom permission guarding the INSTALL_STATUS broadcast (PendingIntent.getBroadcast → registerSessionReceiver). Ensures only the dropper itself receives install-commit results, i.e., it hides the install outcome from security apps listening for package events.

Now that we have cleared out the permissions and what they are doing now comes how they help the nextgenmparivahana.apk act as a dropper for the main payload (which we will analyze later in this blog).

How they chain

ComponentRole in kill chain
MainActivity (only MAIN/LAUNCHER activity; no deep links, no BROWSABLE)Fake installer UI ("Installing…"), VPN consent, unknown-sources consent. Single exported entry = minimal exposure, maximal deception
MainApplication.onCreateKicks the flow at process start
InstallHelper (not a manifest component, bound to the Activity)Decrypt → session install → fallback → launch
VpnKillServiceTunnel up before install, down after (stopVpn)
AutoLaunchReceiverBoot retry + payload launch
FileProvider (…​.provider, grantUri=true)Serves the decrypted APK to the system installer without exposing storage
androidx.startup InitializationProvider, ProfileInstallReceiverLegitimate scaffolding that makes the app look and behave like a normal Compose app

Honorable Mention: The APK also has one:

xml
<meta-data android:name="dApp.binance.Trading.Signals" android:value="" />

This is a singular mention of the dApp.binance.Trading.Signalsin the entire APK and there is no signal or any code anywhere which mentions that this does anything at all. There are a few likely explanation for this:

  1. Lure skin from a dropper-builder kit: these kits ship with trendy disguises (crypto-trading dApps are a favorite); the builder stamps the meta-data so the APK looks Binance-adjacent to cursory inspectors and to users sideloading a "trading signals" app.
  2. Analyst misdirection: a crypto string in a "transport" APK sends reversers down the wrong path.
  3. Leftover: the operator reused a previous campaign's manifest template and didn't clean it.

The 1st and 3rd theory sound very plausible when taken into consideration that the application is basically a shell of the legitimate NextGen mParivahan app from the National Information Centre, India. This shell app is once again, simply being used as a dropper to hold the payload which is a .dat file.

The APK has a very interesting packaging as well:

  • Junk ZIP entries. The central directory is flooded with entries such as AndroidManifest.xml/..png, /AndroidManifest.xml///.xml, kotlin/collections/AndroidManifest.xml, res/values/strings.xml////.9.png. These break apktool (crash in ResPluralsValue / ARSCDecoder) and confuse automated unpackers, while Android's installer tolerates them.
  • DEX offset corruption. Every malware-relevant method fails in jadx 1.5.5 and baksmali 2.5.2 with IllegalArgumentException: newPosition < 0 / > limit (corrupted debug_info_off / code-item offsets, a known intentional anti-decompilation technique). Lower-level dexdump (Android SDK build-tools 36.0.0) parses the file correctly and was used for this analysis.

Now let me expand on anti-analysis structure of nextgenmparivahana.apk.

How nextgenmparivahana.apk Fights the Analyst

The governing idea

Most Android malware obfuscates its code. This sample goes a step further: it obfuscates the containers (the ZIP archive, the binary manifest, and the DEX headers) so that the analyst's toolchain fails before a single instruction is ever examined. The design exploits a structural asymmetry that the author clearly understands: Android's on-device parsers are forgiving, while reverse-engineering tools are strict. A ZIP entry with a nonsense name, a manifest tree with an impossible depth, a debug offset pointing past the end of the file, the phone shrugs and installs anyway, but apktool crashes, aapt aborts, and jadx emits three hundred thousand errors. Each layer in the sections below targets a different stage of a standard analysis pipeline, and together they form a gauntlet in which every conventional tool breaks at a different point. What follows reconstructs each layer from the evidence, explains precisely which tooling it defeats and why the device remains unaffected, and closes with the supporting tradecraft: the cryptographic and organizational choices that make the shell around the payload almost unremarkable to scanners.

First layer: drowning the archive in junk entries

Open the APK as a ZIP and the first thing you notice is the scale of the clutter. Of 298 central-directory entries, roughly 290 are chaff: names like AndroidManifest.xml/..png, /AndroidManifest.xml///.xml, kotlin/collections/AndroidManifest.xml, res/values/strings.xml////.9.png, resources.arsc/////.9.png, permutations of real paths suffixed and prefixed with slashes, dots, and image extensions until they resemble a filesystem that has been through a blender. The genuine entries (the manifest, the resource table, the two DEX files, the native library, the assets including the 15 MB encrypted blob) sit quietly at the end of the listing, outnumbered fifty to one.

The effect on tooling is immediate and total. Apktool, which walks the archive to rebuild the resource table, dies inside its own ARSC decoder with an ArrayIndexOutOfBoundsException in ResPluralsValue (Apktool 2.12.1, reproduced). Tag-based triage scripts, the kind that iterate entry names looking for classes.dex or count medias, drown in noise or, worse, latch onto a junk entry and report garbage. An analyst skimming the listing can easily conclude the archive is corrupt and move on, which is precisely the intended outcome.

And yet none of this troubles the device in the slightest, because Android never walks the archive the way apktool does. The platform's ZipFile implementation resolves entries by direct lookup: asked for classes.dex, it finds classes.dex and ignores the three hundred impostors. The junk is inert weight as far as installation is concerned. The lesson for the laboratory is correspondingly narrow but absolute: with this family, only exact-name extraction is trustworthy: Python's zipfile.read("assets/dbliqgnjl.dat"), unzip -p, or their equivalents. Anything that enumerates, walks, or rebuilds will choke, and that choking is the feature, not a bug in your tools.

Second layer: gutting the manifest while leaving its shadow

The binary AndroidManifest.xml (15,448 bytes) is the most elegant sabotage in the sample. Parsed as what it physically is, a binary AXML document, it is broken: feed it to aapt dump xmltree and the tool dies with the terse verdict ***BAD DEPTH in XMLBlock. The tree depth fields, the structural skeleton that turns a flat pool of strings into nested manifest > application > activity elements, have been tampered with, so every parser that trusts the skeleton (aapt, apktool's manifest decoder, jadx's resource frontend) either aborts or renders an empty document. Three independent tools agree, falsely, that there is no manifest here.

But decode the same bytes as what they also are, a UTF-16LE string pool with the tree grafted on top, and the "empty" manifest is revealed as fully present. The package name com.apkinstallerstable, all twelve permissions, the activity, service, receivers, providers, intent actions, even the bizarre dApp.binance.Trading.Signals meta-data, sit in the pool verbatim and in order. The author destroyed the map but left the territory. Recovery therefore meant ignoring the tree entirely, extracting the pool, and reassembling the XML hierarchy by hand against the known grammar of a manifest. The document published alongside this report as AndroidManifest.reconstructed.xml, with each inferred attribute honestly flagged as such.

The discerning point for your report is the selectivity of the damage. Random corruption (a bad download, a failing flash chip) does not surgically destroy tree depth while preserving every string. Nor does it preserve a 15 MB payload byte-perfect such that it later decrypts to a valid ZIP. This was a scalpel, applied at build time, calibrated to the exact strictness gap between aapt and Android's own manifest parser, which evidently tolerates the damage just as its ZIP parser tolerates the junk.

Third layer: salting the DEX fields that decompilers trust

If the archive stuffing stops the unpackers and the manifest sabotage stops the resource decoders, the DEX corruption stops the decompilers, and it does so with a cruelty worth describing in detail, because it produces the most misleading failure mode of all. The two DEX files (classes.dex at 16 MB, DEX version 035; classes2.dex at 2.2 MB) carry falsified offset fields in their code items, of exactly the species Fortinet documented in NOP-erased droppers and jadx maintainers have since confirmed as intentional in issues #1653 and #2424: debug_info_off values and code-section references pointing to negative positions or past the end of the file. Crucially, the corruption concentrates on the malware's own methods (the support-library code decompiles normally), which is the fingerprint of a post-build mutation pass rather than toolchain damage.

Run jadx 1.5.5 over it and you get the worst possible outcome for triage: apparent success. The class tree builds beautifully: InstallHelper, VpnHelper, VpnKillService, AutoLaunchReceiver, AppInfoHelper, all present with correct signatures, fields, and Kotlin metadata. But every method body is a stub throwing UnsupportedOperationException, each annotated with IllegalArgumentException: newPosition < 0 / > limit, nearly three hundred thousand errors in a full-project pass. Baksmali 2.5.2 fares no better, skipping whole classes (LA.f among them). An analyst who stops at "jadx processed it" walks away with the class roster and none of the logic, never realizing the bodies were salted.

What broke the stalemate was descending a level: the SDK's dexdump (build-tools/36.0.0), a dumb disassembler with no decompilation ambitions, parses the same file cleanly because it never follows the poisoned references the clever tools chase. Through dexdump all 52 wrapper classes yielded complete Dalvik disassembly: the InstallHelper field initializers (HEADER=16, SEED=0x4394D, CHUNK=65536), the LCG decrypt loop, the session-install sequence, the entire dropper logic recovered instruction by instruction. The moral generalizes beyond this sample: when jadx and baksmali agree that method bodies are unloadable but the file header is sane, reach for the dumber tool before concluding the code is gone.

Fourth layer: burning the signature

keytool and apksigner both refuse the file with SHA-256 digest error. The V1 signature no longer covers the mutated archive, as it cannot after the stuffing and splicing described above. In many automated pipelines, a signature failure is a sorting event: the sample is filed as a corrupt download and never reaches a human. That is exactly the outcome the author purchases with this layer, and it costs them nothing, because the sideloading flow the fake installer UI engineers (user taps through unknown-sources consent) never checks the signature in the first place. Trust verification, the layer of the ecosystem designed to catch precisely this kind of repackaging, is thus converted into a filter that hides the sample from defenders while remaining invisible to victims.

The dynamic layer: a VPN that blinds the observer

Static defenses buy the sample time; the dynamic layer spends it. VpnKillService, a genuine VpnService subclass driven by VpnHelper.prepareVpn/handleVpnResult/stopVpn, raises a device VPN tunnel during the install window. From the victim's perspective nothing visible happens; from the traffic analyst's perspective, the most interesting seconds of the sample's life (asset decryption, package installation, first launch, initial panel check-in) occur inside a tunnel the sample itself controls, or equivalently with the analyst's own MITM VPN preempted and neutralized. Then, the window closed, stopVpn drops the tunnel and the device looks normal again. Around this core, the standard persistence furniture does its quiet work: AutoLaunchReceiver on BOOT_COMPLETED (plus QUICKBOOT_POWERON variants) re-fires the drop after reboots, foreground-service execution with data-sync type plus onTaskRemoved restart survives swipes and background restrictions, and exact-alarm re-checks close the remaining gaps. Each mechanism is individually legitimate; composed, they guarantee the drop completes even under active interruption.

Supporting tradecraft I: cryptography chosen for invisibility, not strength

Perhaps the most instructive choice in the sample is what it did not do: it used no AES, no Cipher, no SecretKey, no keystore, no DexClassLoader string anywhere. The entire pre-existing decryption playbook (XOR with guessed words, AES-CBC with MD5/SHA-derived keys, the filename-derived-key technique (SHA1(asset_name)[:16]) that breaks MiningDropper and Mamont variants, all of which were tested here and ruled out) assumes standard crypto, and this sample simply declined to use any. In its place sits a hand-rolled stream cipher out of Numerical Recipes: state evolved by state × 1664525 + 1013904223 mod 2³², keystream byte state >>> 24, seeded at 276813, skipping a 16-byte header and streaming in 64 KB chunks. It is cryptographically frail and analytically devastating, because every YARA rule, every crypto-detector heuristic, and every analyst instinct that fires on the tokens of standard cryptography stays silent. The lesson is that in the asset-protection game, unfamiliar beats strong: a weak cipher nobody's signatures name outperforms AES that every sandbox knows how to spot and every guessing script knows how to try.

Supporting tradecraft II: the clean shell and the sealed payload

The final technique is organizational rather than technical, and it is what makes the wrapper scan nearly clean. All fraud capability (SMS theft and transmission, notification listening, contact and call-log harvesting, call-forwarding hijack, panel command-and-control) is absent from the dropper and sealed inside the encrypted blob. The shell's manifest holds installer and VPN permissions but no SMS, phone, or messaging permissions whatsoever; its DEX holds no URLs, no API keys, no exfiltration code. Static reputation engines scoring the wrapper see a pushy installer with a VPN fetish, suspicious but below most conviction thresholds, and trivially mistaken for aggressive adware. The payload's own manifest, with its RECEIVE_SMS/SEND_SMS/CALL_PHONE/notification-listener battery, would convict it instantly, which is why it never appears in plaintext until the victim's own device decrypts it. Staged knowledge like this also compartmentalizes takedowns: sinkholing one layer's infrastructure leaves the other intact, and signatures written against the shell will not fire on the payload or vice versa.

Supporting tradecraft III: recursion

The decrypted second stage, com.veltrix.documents, reuses the same ZIP-stuffing and signature-breaking as its carrier. The gauntlet must therefore be run twice, with fresh hashes and fresh IOCs at each stage, and any detection content written from the wrapper alone (package, asset name, permission cluster) will miss the payload, just as content written from the payload (panel URL, Firebase project, SMS permissions) will miss the wrapper. Defenses must be staged to match: installer-behavior rules for the shell, exfiltration and C2 rules for the contents, and above all a pipeline whose first response to "corrupt file" is suspicion rather than dismissal, because in this campaign, corruption is the camouflage.

We have exhausted our approach and analysis for the main nextgenmparivahana APK which we now can conclude is simply a shell android app and a dropper which drops the actual payload. And so now comes our Villain the actual payload.

**Before we can even analyze the payload we must first decrypt the damn thing. Because to make things hard for us the payload had been encrypted -->

The .dat Encryption: Anatomy of a Hand-Rolled Stream Cipher

What the blob physically is

assets/dbliqgnjl.dat is 15,165,380 bytes long and divides, functionally, into two regions: a 16-byte header of pure zeroes, followed by 15,165,364 bytes of ciphertext with Shannon entropy near 7.8 bits per byte, statistically indistinguishable from random. There is no magic number, no version field with meaning, no key block, no trailer. Scanned for every container signature in the analyst's repertoire (ZIP local headers, ELF, DEX, gzip, zlib streams) it returns zero hits and 67,000-odd garbage fragments of printable ASCII, the inevitable confetti of high-entropy data. The sixteen zeroes are, as the disassembly later confirmed, not an IV and not a version: they are simply skipped. The cipher state never touches them.

The algorithm, exactly

Recovery came not from guessing but from reading: dexdump disassembly of InstallHelper.writeAssetToFile() lays the loop bare, instruction by instruction, and the constants fall out of <init> beside it. Paraphrased into honest pseudocode, the routine is:

text
HEADER = 16, SEED = 0x4394D (276813), CHUNK = 65536
skip(HEADER bytes of asset stream)
state = SEED
loop over input in 64 KB chunks:
    for each byte b at position i:
        state = (state × 0x19660D + 0x3C6EF35F) mod 2³²
        keystream = (state >>> 24) & 0xFF
        output[i] = b ^ keystream
write output to cache/apks/update.apk

The constants deserve a moment. 0x19660D is 1,664,525 and 0x3C6EF35F is 1,013,904,223, the multiplier and increment of the Numerical Recipes linear congruential generator, one of the oldest PRNGs in computing, appearing here verbatim. The state is held in a 64-bit Dalvik wide register but masked to 32 bits after every step (and-long with 0x00000000FFFFFFFF), the keystream byte is the top octet of the state (the standard prescription for LCGs, whose low bits are notoriously non-random), and the state carries continuously across chunk boundaries rather than reseeding, forming one unbroken 15-million-step stream from a single 19-bit seed. Encryption and decryption are the same operation, XOR being its own inverse, and the 15-line Python reimplementation decrypted the blob on its first run to a valid ZIP: PK\x03\x04 header, 1,136 entries, a single well-formed end-of-central-directory, SHA-256 38bf7fa1….

Why this cipher, and why it worked

The choice is instructive precisely because it is cryptographically contemptible. A 19-bit seed falls to brute force in milliseconds if you know the construction, but nothing advertises the construction. There is no Cipher.getInstance, no SecretKeySpec, no BouncyCastle import, no AES S-box table, no RSA public key anywhere in the wrapper's DEX; the opcodes are mul-long, add-long, and-long, ushr-long, all arithmetic, not cryptography, invisible to every crypto-detector heuristic and YARA rule that hunts the vocabulary of standard encryption. The pre-existing decrypt_payload.py in the workspace is the casualty that proves the point: it assumed AES-CBC with MD5/SHA-derived keys and XOR with guessed words (xyAeS, dbliqgnjl, package names), and every combination failed, because the file was never AES at all. My own follow-up barrage (single-byte XOR brute force, repeating-key derivation (which tantalizingly faked a PK header from key 8342f847 before dissolving into noise, properly ruling the family out), java.util.Random seed sweeps, filename-derived AES keys after the MiningDropper/Mamont pattern (SHA1("dbliqgnjl.dat")[:16] with zero and header IVs, CBC and ECB), raw DEFLATE inflation) failed in turn, each failure narrowing the field until only "custom stream cipher with embedded numeric constants" remained, which is exactly what the disassembly then confirmed.

There is a second, subtler elegance. The cipher needs no key management: the seed is a single integer baked into a constructor, the "IV" is sixteen hardcoded zeroes, there is nothing to provision per build and nothing to rotate. A builder kit stamping out variants can re-seed trivially or not bother; analysts cannot precompute anything because there is no key schedule to attack, only arithmetic to reimplement. And 64 KB chunking with BufferedOutputStream keeps memory flat on low-end devices while the 15 MB blob streams through, an operational consideration for the bottom of the Indian handset market, where this malware hunts.

The delivery choreography around the cipher

Encryption is only half the mechanism; the other half is what the plaintext becomes. writeAssetToFile refuses outputs under 1,024 bytes ("APK too small …, skipping session install"), then installAssetApk$lambda$4 drives the handoff: resolveTargetPackage() names the victim package, trySessionInstall() opens a PackageInstaller session in full-install mode, sets the app package name on API 26+, streams the plaintext in as base.apk, syncs, registers the commit receiver, and fires the commit behind a PendingIntent guarded by the shell's own signature-level INSTALL_STATUS permission, hiding the outcome from on-device security software. If sessions fail, fallbackInstall() degrades to a FileProvider VIEW intent for manual install; either way launchTarget() boots the payload and the shell's job is done. The cipher and the installer are one mechanism with two halves: mathematics that no scanner names, feeding an API flow that every scanner permits.

Credit where credit is due yet again the payload was decrypted by Muse Spark 1.3 free at Xhigh. It made very short work of the decryption as one can tell.

Coming to actual analysis of the payload now.

The Decrypted Real Payload

The decrypted output of assets/dbliqgnjl.dat is a banking-fraud remote-access bot posing as an e-Challan traffic-fine payment app. It combines a convincing government-portal phishing funnel (real echallan content, card/UPI PIN harvest screens) with a full C2-driven collection toolkit: bidirectional SMS proxying, notification interception, contacts/call-log/email theft, per-SIM call-forwarding hijack for OTP voice interception, and Firebase + HTTPS + WebSocket command channels with HMAC-authenticated panel APIs. Like its carrier, it uses ZIP-entry stuffing and a broken signature as anti-analysis.

Verdict: Malicious. Tier-1 financial fraud implant. Compromise of any device that installed it must be assumed total (OTP, UPI, banking credentials).

File Identity

AttributeValue
File name (as recovered)dbliqgnjl_decrypted.apk (plaintext of assets/dbliqgnjl.dat after 16-byte header skip + LCG decrypt)
File size15,165,364 bytes (~14.5 MB)
SHA-256 (plaintext)38bf7fa1e5b50eaf171b03aa31b70a37cfe3737a9c65cc518bd9d1d264089332
SHA-256 (ciphertext, for reference)c2aa924ab7e2b77bc675cc5873c3ad969af4e62398a835c7066cdbe7ea88fdd6 (15,165,380 bytes incl. header)
Packagecom.veltrix.documents
Version1.0 (versionCode 2), BUILD_TYPE release, DEBUG false
SDKminSdk 23 (Android 6.0) / targetSdk 36 / compileSdk 36, notably a wider net than the dropper (min 23 vs 27): infects older low-end handsets
DEXclasses.dex … classes4.dex (4 files)
ZIP entries1,136 (1136 local headers + 1136 central-directory records + single EOCD, structurally valid)
App classes299 under com/veltrix/…

Signature & Provenance

  • Signature INVALID: keytool fails with SHA-256 digest error for resources.arsc/////.png: the V1 signature does not cover the mutated archive (same repackaging breakage as the carrier).
  • No relation to NIC, Google, or any legitimate publisher. BuildConfig.APPLICATION_ID = "com.veltrix.documents", CUSTOMER_ID = "URmP86za8abBCAmBn58k3LZ12T13" (panel tenant ID, not a Play identity), SPREADER_CODE = "" (empty spreader tag, a builder field for affiliate tracking, unused in this build).

write secret hex

Packaging Anomalies (Anti-Analysis)

Identical tradecraft to the dropper, reapplied: hundreds of junk entries (META-INF/…xml, META-INF////.9.png, …/..xml permutations) interleave the real files; aapt emits Unknown chunk type warnings against the resource table; signature verification fails by design. The archive nevertheless parses under tolerant readers (Python zipfile, aapt dump badging with warnings) and installs on-device. Consequence for the laboratory is the same: exact-name extraction only, distrust any tool that walks or rebuilds, and defeat the tricks twice, once per stage.

The AndroidManifest

As with any APK analysis we start from the AndroidManifest.xml and move towards other things slowly. The manifest for this payload is vey interesting and of course, self revealing, it asks somewhat basic permissions at the start such as Internet and Access Network State, Recieve and Send SMS, it then flips the whole thing and reveals its true nature as it stats to ask for permissions to READ_SMS, READ_PHONE_STATE, READ_PHONE_NUMBERS, and so on. Here is the full picture below:

AndroidManifest 2

As you can see it has many various kinds of permissions and I think the funniest on here is REQUEST_IGNORE_BATTERY_OPTIMIZATIONSwhich basically means it wants to pull as much juice from the phone's battery as possible.

The AndroidManifest.xml for this APK was the same as the manifest of the dropper it was corrupted but it was reconstructed by Muse Spark 1.3 at Xhigh:

xml
<?xml version="1.0" encoding="utf-8"?>
<!-- RECONSTRUCTED from binary string-pool of the decrypted payload
     (dbliqgnjl_decrypted.apk / AndroidManifest.xml, com.veltrix.documents v1.0).
     The binary AXML tree is damaged (same builder as the dropper): aapt xmltree
     fails, apktool/jadx resources render empty/garbage, aapt badging parses
     only partially (with "Unknown chunk type" warnings). All names below are
     verbatim strings from UTF-16LE pool extraction + aapt badging + DEX class
     cross-check. Attribute flags partly inferred. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.veltrix.documents"
    android:versionCode="2"
    android:versionName="1.0">

    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="36" />
    
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.READ_SMS" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.BROADCAST_SMS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
    <uses-permission android:name="android.permission.BIND_JOB_SERVICE" />
    <uses-permission android:name="android.permission.DUMP" />
    <permission android:name="com.veltrix.documents.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"

android:protectionLevel="signature" />

Analyzing the Manifest

Permissions (18): the fraud cluster in full

PermissionRole in this implant
INTERNET, ACCESS_NETWORK_STATEPanel HTTPS, WebSocket live channel, Firestore/FCM
RECEIVE_SMS, READ_SMS, SEND_SMS, BROADCAST_SMSFull SMS takeover: intercept inbound OTPs (SmsReceiver), read the inbox historically (SmsSyncer), transmit operator-composed messages from the victim's SIM (OutboxSmsExecutor), confirm delivery (SmsSentReceiver)
READ_PHONE_STATE, READ_PHONE_NUMBERSSIM/subscription enumeration, own-number recovery, per-SIM routing (subIdForSlot, getSimInfo), call-state awareness for the forwarding hijack
CALL_PHONEDirect call placement for call-forwarding activation (placeCallDirectly, MMI/USSD execution paths)
BIND_NOTIFICATION_LISTENER_SERVICEMyNotificationListener: streams every app notification (bank alerts, app-push OTPs, authenticator prompts) with title/text/package
RECEIVE_BOOT_COMPLETEDBootReceiver: reboot persistence
WAKE_LOCKKeep sync/exfil loops alive
FOREGROUND_SERVICE + FOREGROUND_SERVICE_REMOTE_MESSAGINGSyncForegroundService persistent sync engine
BIND_JOB_SERVICEJobInfoSchedulerService / WorkManager cohort (SmsSyncWorker, SyncWatchdogWorker, OutboxReportWorker, RecoveryWorker, CallForwardingWorker)
REQUEST_IGNORE_BATTERY_OPTIMIZATIONSExemption begging so Doze never pauses collection
POST_NOTIFICATIONS, DUMPForeground-service notifications; profileinstaller baseline receivers

Missing (deliberately): no camera/location/biometric, in the original & legitimate application this is not the transport app it visually impersonates; every permission serves theft, persistence, or C2.

Components

  • 15 activities: Splash → SignIn → Main; fraud funnel ChallanDetail, ChallanWeb (loads the genuine echallan.parivahan.gov.in/index/accused-challan), PaymentMethod, CardPayment, CardFailed, UpIPin, VerifyingUpiPin, WrongUpiPin (failure-tolerant PIN capture), PaymentReceipt, SuccessAnimation; plus invisible TrampolineActivity (notification-tap routing + ACTION_CLOSE_TRAMPOLINE).
  • Receivers: BootReceiver, SmsReceiver (SMS_RECEIVED + slot/subscription extras), SmsSentReceiver (delivery reports), OutboxReportWorker, package/session receivers.
  • Services: SyncForegroundService (heartbeat, SMS ContentObserver "instant detection," FCM ping handling ACTION_FCM_PING, power/screen triggers), MyNotificationListener, PanelMessagingService + MyMessagingService (FCM), SyncAdapter account stub + AuthenticatorService/StubProvider (account-framework persistence).
  • Providers: FirebaseInitProvider, androidx.startup, FileProvider-equivalents; Firestore/RTDB registrars (FirebaseFirestore*, FirebaseInstallations*, FirebaseMessaging*).

The analyzed file is the decrypted plaintext of assets/dbliqgnjl.dat from the com.apkinstallerstable dropper: 15,165,364 bytes, SHA-256 38bf7fa1e5b50eaf171b03aa31b70a37cfe3737a9c65cc518bd9d1d264089332, and a structurally valid ZIP with 1,136 local headers matched by 1,136 central-directory records and a single EOCD. Four DEX files carry 299 application classes. The signature is invalid by design: a digest error, the same repackaging breakage as the carrier. BuildConfig confirms com.veltrix.documents, v1.0 (code 2), release, minSdk 23 / targetSdk 36. Worth repeating: the floor is lower than the dropper's own minSdk of 27, which widens the net to older handsets. SPREADER_CODE is an empty string in this build: a builder-level affiliate-tracking field, unused here, which quietly confirms this is kit-based mass production rather than a bespoke one-off.

For anyone who wants to reproduce the decrypt themselves: the .dat asset carries a 16-byte zero header, then the payload is encrypted with a Numerical Recipes LCG (SEED = 276813, step function x = x*1664525 + 1013904223, keystream byte taken from the top octet of each state, applied in 64 KB chunks. That's the whole cipher. Worth one line under File Identity so a reader isn't left guessing at the params.

Code Structure

Once you're past the manifest and into the actual DEX, com.veltrix.documents stops looking like malware and starts looking like a startup's codebase. 299 classes, cleanly split across data/, fcm/, receiver/, service/, sync/, syncadapter/, util/, all Kotlin, all built on Coroutines and WorkManager. Whoever wrote this has shipped production Android code before: there's DTO layering, retry policy, cursor-based pagination, the works. It's genuinely uncomfortable to read, in the same way it's uncomfortable when a phishing email has no typos.

App is the entry point and it's doing almost nothing interesting on its own: SIM-change observation (observeSimChangesForAutoPresence), a network monitor, and a presence scheduler. The actual weight sits in data/FirebaseRepo, which is basically the whole C2 client crammed into a single class: a 16-method Retrofit interface (PanelApi), HMAC request signing (fireAndForgetHmac, more on this below), Firestore config bootstrap (fetchAndSaveFromFirestore, syncBaseUrl), and every exfil loop the app runs: pushSmsList/pushSmsListSuspend, pushEmails, pushPayment, saveFcmToken, sendPermissionsIfChanged, presenceBeat*, cfLoop, outboxLoop, oneShotSmsSync/oneShotSmsSyncSince, oneShotOutboxPull, oneShotCfCheck, handleInlineOutbox, sendSmsWithConfirmation, getSyncStatus, markSyncComplete, reportOutboxResult. If you only read one file in this whole APK, read this one.

saveFCMToken

The FCM split is actually two services, not one, and I glossed over that the first time through. fcm/MyMessagingService is the Firebase-messaging handler proper (onMessageReceived, onNewToken), and it's the one that dispatches to CallForwardingWorker. service/PanelMessagingService is a separate panel-protocol handler sitting on top, keyed on msg/outbox/ping/token/type. The handoff between the two is where an FCM push actually becomes a panel action, and it's logged cleanly enough to be a detection anchor on its own: OUTBOX_HANDOFF_FINISHED, OUTBOX_PAYLOAD_VALID, and NO_INLINE_OUTBOX for the negative case. That log-tag sequence, appearing on a non-Play package, is about as clean a signature as you're going to get without touching the panel.

I also undersold the worker list. Beyond SmsSyncWorker, the full cohort is: receiver/OutboxReportWorker (delivery receipts), sync/SyncWatchdogWorker (liveness watchdog, separate from the scheduled sync worker), service/RecoveryWorker (the offline-queue flush from the Network section), and fcm/CallForwardingWorker, which exists specifically to isolate the CF job so a stuck USSD call can't wedge the FCM message handler. That's a real engineering decision, not an accident: someone clearly hit a bug where a hanging USSD call blocked message processing, and split it into its own worker to fix it. There's also a syncadapter/ account stub with AuthenticatorService/StubProvider, which is the account-list persistence mechanism I should have flagged under Persistence too; it survives in Settings → Accounts long after a victim forgets the app exists.

MyMessagingService

CallForwardingWorker

One more component worth naming: service/TrampolineActivity pairs with a closeReceiver to route notification taps. It matters for Collection, not just persistence, because a tapped notification passes through this router before anything gets logged for exfil, so it's part of the data path, not just a UI convenience.

Network & Command-and-Control

This is the part of the APK that actually made me sit back for a second, because the fallback chain tells you something about how this operation is run day to day.

The hardcoded panel https://nexus-panel.in/api/ is not actually the primary address; it's the fallback of last resort. On startup, syncBaseUrl reads two Firestore documents, app_config and net_config, out of a project called ghostx-panel, and takes whatever baseUrl value is sitting in them. It persists its own bootstrap state (newUrl, url_bootstrapped, url_last_checked_at) and there's a log line that straight up says waiting for real URL (syncBaseUrl in progress) when config hasn't landed yet. What that means practically: the operator can move the entire panel domain by editing a Firestore document, with zero app updates and zero device-side changes. Which also means if anyone ever gets takedown access to that Firestore project, they control the addressing of the whole botnet. That's the leverage point, not the hardcoded domain.

Every HTTPS and WebSocket call carries the same four headers: X-Customer-ID (the tenant, URmP86za8abBCAmBn58k3LZ12T13), X-Device-ID, X-Timestamp, and, mostly, X-Sig, an HMAC-SHA256 over the request computed with a 64-hex-char secret, WRITER_SECRET_HEX (158bd97c…b9491), inside fireAndForgetHmac. I need to flag a discrepancy here rather than paper over it: the SyncForegroundService fast-path emits a header called X-Signature, in the same position, over what looks like the same HMAC construction, not X-Sig. I don't have the preimage ordering in static strings to confirm whether it's the same signature under a second accepted header name or a version skew between the FGS fast-path and the main FirebaseRepo client. I'm marking that as unknown, same caveat class as the inferred Retrofit paths below. Practically: a defender alerting only on X-Sig will miss the FGS traffic, so alert on both header names.

fireAndForgetHmac

Sixteen endpoints hang off PanelApi: deviceInstalled, saveToken, getConfig, syncStatus, syncComplete, presence/beat, pingAck, smsBatch/smsBatchNew/smsBatchHistorical, emailsBatch, payment/payments, outbox/pull + outboxMark, and cfGet/cfAck. I originally called the three SMS endpoints "three flavors of SMS batch." Worth being explicit: that mapping them to live/delta/backfill is my inference from the naming pattern, not something stated verbatim anywhere, so flag it with the same confidence level as the endpoint-path caveat generally. Also worth a clause I missed the first time: emailsBatch in the DTOs confirms there's a dedicated email-upload endpoint alongside the SMS ones, and there's a NotificationsBatchReq DTO too, so notification-listener output has its own upload path, separate from the SMS batches, even though I only described notifications qualitatively in the Collection section.

FireBaseRepo multiple

Under HTTPS sits a WebSocket at <base>/ws, same auth, carrying outbox_send/outbox_report/ping frames. The frame fields are worth listing because they reveal something: device_sent_at_ms, sent_at_ms, expires_at_ms, number/text/sim_slot/outbox_id/success. The outbox protocol echoes the exact shape of the SMS record schema, meaning the send-path (operator SMS out) and the steal-path (victim SMS in) share one schema end to end. There's a server ack on connection and a logged Unknown WS message type fallback for anything unrecognized, both useful as detection strings.

FCM telemetry is richer than I first gave it credit for: transportDelayMs, ttl, priority/originalPriority, elapsedMs, accepted=, plus hasNumber/hasText/textLength on the outbox payloads. The operator is measuring command-delivery latency per device, which backs up the "live dashboard" read from the Collection section. This isn't just presence, it's performance monitoring of the C2 channel itself.

And there's a full sync-status handshake I skipped: getSyncStatus returns a SyncStatusResp, which the client answers with markSyncComplete, alongside the separate syncComplete endpoint. So the panel isn't fire-and-forget on sync jobs; it tracks per-device sync state as a first-class thing, which is the same "operator runs this like a fleet dashboard" pattern showing up a third time now (presence, FCM latency, sync status).

Collection & Fraud Logic

The phishing funnel is straightforward once you've seen the activity list: real challan content builds trust, card capture and UPI PIN capture (with the dedicated WrongUpiPin retry screen) extract the money-moving fields, and every stage POSTs incrementally via payment/pushPayment, meaning a victim who bails out halfway through has probably already leaked something, not just the ones who complete the flow.

payment methods and more

I said SMS collection was triple-redundant without explaining the actual mechanics, so here they are. It's keyset pagination, ordered date DESC, _id DESC, with the boundary condition (date < ?) OR (date = ? AND _id < ?), pulling columns address/body/date/type/read/sub_id/sim_id/sim_slot/subscription_id. When the SMS permission isn't granted, the code doesn't crash or silently no-op. Instead, it logs the blocked state explicitly, NO_SMS_PERM, on both the queryOnce and readBeforeCursor paths. That's real evidence for the "built assuming it gets killed and permissions get revoked" claim, not just a plausible-sounding assertion. The app has named, logged handling for exactly that failure mode.

SmsSyncWorker

Contact and email collection use the same delta pattern promised by cursor_contacts_md5 and cursor_emails_md5 in Prefs: an MD5 hash of the current dataset compared against the last-synced hash, so repeat syncs only ship what actually changed. The entry points sit in DeviceInfoCollector: getAccounts(...), getCallLogs, getContacts.

The device beacon deserves to be spelled out in full rather than summarized, because it's a single object (data/model/Device) and it's genuinely comprehensive: phone, model, androidVersion, sdk, sim1, sim2, serviceProvider, ipAddress, battery, storageMB, cpuArch, rootStatus, installedAt, last_seen, status. That's every field an operator would want to triage a device before deciding whether it's worth working: is it rooted (higher risk of detection, but also higher potential access), is it recently active, which carrier and which SIM slot to target for the forwarding hijack.

Call Forwarding

I want to give this its own section because SMS theft is the expected finding in this kind of implant, and call forwarding is not. It's the difference between "this steals your text OTPs" and "this steals your voice OTPs too, and your handset stays completely silent while it happens."

CallForwardingHelper, driven by the panel's cfGet/cfAck loop, programs unconditional call forwarding using the standard GSM MMI codes. The exact strings observed: *21* to enable, ##21# to disable, *#21# to interrogate current state. The response parser matches on carrier-returned text. Positive matches include cfu activated/active, call forwarding unconditional: registered, all calls forwarded; negative matches cover cfb/cfnrc/cfnry not active, i.e. the conditional-forwarding variants being off, which the code correctly distinguishes from unconditional forwarding being off. It makes three verification attempts before giving up and reporting UNKNOWN back to the panel, with the state effectively meaning "carrier blocked *#21# on this OEM" rather than a clean failure.

The 20-second sendUssd timeout I mentioned earlier is worth pairing with the actual failure-mode string in the code: USSD API returned empty response: OS blocked it, followed by the TelecomManager fallback path. That one line is the clearest evidence of an active OEM arms race: this app has been built, tested, and patched against MIUI, ColorOS, and Vivo specifically refusing USSD calls from non-dialer apps, and it has a fallback ready for exactly that.

And the panel doesn't just get a success/fail boolean back. It gets a full verdict object, CarrierVerdict/CFState, with WhenMappings in the decompiled Kotlin backing an enum-style dispatch. Operators are triaging call-forwarding state per device like a fleet, the same pattern showing up for the fourth time now across presence, FCM latency, sync status, and call-forwarding verdicts. This whole implant reads like fraud-as-SaaS internally, whatever it looks like to the victim.

Persistence & Privilege Model

Nothing here is exotic and that's sort of the point: boot receiver, a foreground service that resurrects itself the moment you swipe it away (onTaskRemoved), exact alarms, autostart/battery-optimization coercion, and continuous permission-drift reporting (sendPermissionsIfChanged) so the panel knows within one sync cycle if a victim revokes anything. As noted above, the sync-adapter account stub (syncadapter/, AuthenticatorService, StubProvider) belongs here too. It's a persistence anchor in the literal sense that it sits in the device's account list independent of whether the app itself is still running. No exploits anywhere in this chain, no root requirement. It's pure consent-engineering stacked on legitimate Android APIs, which is exactly why the permission cluster in the manifest matters more for detection than any signature-based approach ever will.

Indicators of Compromise

TypeIndicator
FilePlaintext SHA-256 38bf7fa1e5b50eaf171b03aa31b70a37cfe3737a9c65cc518bd9d1d264089332 (15,165,364 B); ciphertext c2aa924ab7e2b77bc675cc5873c3ad969af4e62398a835c7066cdbe7ea88fdd6; source asset assets/dbliqgnjl.dat (16-byte zero header + LCG, SEED=276813)
Packagecom.veltrix.documents v1.0 (code 2)
Networkhttps://nexus-panel.in/api/, <base>/ws, Firestore project ghostx-panel (app_config/net_config/pending_tokens), RTDB ghostx-panel-default-rtdb.firebaseio.com, FCM sender 407145950785, API key AIzaSyB2eDre6O_WIEpCwek8Ff-vRb15m-oTAQc, lure echallan.parivahan.gov.in/index/accused-challan, bit.ly/2XFpdma
SecretsTenant URmP86za8abBCAmBn58k3LZ12T13, WRITER_SECRET_HEX 158bd97c…b9491. Treat this as live ammunition, don't paste it around casually
On-devicePermission cluster (SMS×4 + CALL_PHONE + notification-listener + FCM + battery-opt exemption); log tags FirebaseRepo/SmsSyncer/CF_Helper/WebSocketManager/SyncFGS/OUTBOX_HANDOFF_FINISHED; prefs file ghub_prefs; FCM data keys ob_id/ob_number/ob_text/ob_sim/pingId; auth headers X-Sig and X-Signature (see Network discrepancy note)

googleAPIkey

Detection & Response

If you're a defender reading this: block nexus-panel.in and the ghostx-panel Firebase project at DNS/perimeter, and alert on the co-occurrence of X-Customer-ID with either X-Sig or X-Signature, plus the FCM data-key vocabulary above showing up from anything that isn't a Play Store package. Hunt your fleet for com.veltrix.documents and that permission cluster. Any hit means you treat every credential ever sent to that number as burned (SMS OTPs, UPI PIN, banking passwords), you check the SIM for an active call-forwarding rule (*#21# from a clean device, not the victim's), and you reimage. Don't circulate the writer secret outside a controlled reporting channel, and if you're reporting the Firebase abuse to Google, hand them the API key, project name, and sender ID together.

Limitations

I want to be upfront about where inference stops and evidence starts. The Retrofit endpoint paths, and the live/delta/backfill mapping I put on the three SMS batch methods specifically, are reconstructed from method names, string constants, and DTO shapes. dexdump doesn't expose the actual @GET/@POST annotations, so treat both as high-confidence, not verbatim. FCM command semantics come from handler key sets and log strings, not captured traffic. The X-Sig/X-Signature question is genuinely open. I don't have the HMAC preimage ordering in static strings to resolve it. And anything time-gated or panel-triggered (does call forwarding only fire on command, or on a schedule?) is a question dynamic analysis would need to answer, ideally in a sandboxed environment with the panel and Firestore project sinkholed, since I'm not running this thing live against real infrastructure.