RUScan

Learn / Android malware analysis

How to check an APK for malware: a practical guide

Static signals of malicious Android apps: permission combinations, suspicious native imports, anti-debug tricks, packers and debug certificates, with commands you can run yourself.

Updated: 2026-11-13·7 min read

You have an app.apk file: downloaded from a forum, sent by a client, restored from a device or pulled from a third-party store. Before it runs anywhere important, you want an answer to one question: is there malware inside? This guide walks through the signals a static analysis can extract without executing the app, and which of them actually matter.

What “Android malware” looks like in practice

Malicious apps are rarely exotic. Almost all of them are ordinary Android applications that abuse legitimate capabilities: an accessibility service that reads screens, a broadcast receiver that survives reboots, a foreground service that keeps the connection to a command server alive. The API is legal; the combination is the problem.

If a specific file is already on your desk, the fastest first step is to check what a static scanner flags before digging in manually; the signals below tell you what the report means.

Recurring patterns worth memorizing:

  • Permission stacking: SMS + contacts + accessibility together is the classic banking-trojan footprint, because each permission alone has an innocent explanation.
  • Overlay attacks: SYSTEM_ALERT_WINDOW plus a phishing page lets the app draw its own “login” over a real banking app.
  • Dynamic delivery: a small loader APK that fetches a second-stage DEX after installation, so the store-reviewed binary looks clean.
  • Native-layer hiding: the interesting logic moved into a packed.so library, where casual inspection stops (more on this below).

Signals you can extract statically

A static audit never runs the app, so it cannot prove intent, but it can enumerate everything the app could do, which is usually enough for a decision.

  • Manifest. Requested permissions (with the dangerousflag), exported components, custom permissions and the target SDK. An app that requests REQUEST_INSTALL_PACKAGES while also showing ads is a dropper until proven otherwise.
  • Java/Kotlin layer. Decompilation shows the real call graph: reflection chains, hard-coded C2 URLs, hidden preferences. Obfuscation percentage tells you how hard someone tried to be unreadable.
  • Native libraries. Every bundled .so is a small ELF program with its own imports and strings. ptrace,/proc/self/status reads, dlopen from a writable path, UPX packer signatures. This is where anti-debug, root-detection and unpacking logic lives.
  • Signature. Who signed the APK and how. A debug certificate in a production build is sloppiness; a self-signed certificate that impersonates a known developer identity is fraud.
  • Embedded secrets. Freshly minted API keys, bot tokens and staging endpoints often identify the actor behind a repackaged app. See what a leaked API key reveals.

Commands to run yourself

Five minutes in a terminal gives you the skeleton of an answer:

# what's inside the package?
unzip -l app.apk | less

# who signed it?
keytool -print-cert -jarfile app.apk

# signature valid?
apksigner verify --verbose app.apk

# pull the manifest as text (aapt2 from build-tools)
aapt2 dump permissions app.apk

# native libraries: imports and interesting strings
unzip -o app.apk 'lib/*' -d out
objdump -T out/lib/arm64-v8a/*.so | grep -E 'ptrace|dlopen|mmap'

The certificate print alone filters a surprising share of repackaged malware: the CN= subject of the signer either matches the original developer or it does not.

Why the native layer deserves a Ghidra pass

DEX decompilers are good, so malware authors moved. Packing a library with UPX, importing ptrace to attach to itself (classic anti-debug), reading TracerPid from /proc, detecting Frida by scanning loaded modules. All of this happens below the Java horizon, in the first bytes of JNI_OnLoad. A disassembly pass that lists imported functions, flagged strings and entropy per section turns “unknown binary” into a short, ranked list of suspicious behaviors.

In our own demo reports the nativedeep sample shows exactly this chain: suspicious imports, string hits and a decompiled entry point, the same signals a manual Ghidra session would surface, automated.

A checklist you can reuse

  1. Inventory: package, version, signer identity, target SDK.
  2. Permissions: list the dangerous ones, flag the known-bad combinations.
  3. Components: exported activities/receivers/services without permission guards.
  4. Java layer: obfuscation level, reflection, hard-coded URLs and keys.
  5. Native layer: packer signatures, anti-debug imports, high-entropy sections.
  6. Decision: compare findings against what the app claims to be.

The last step is the human one: a flashlight app has no reason to request SMS permissions, and a game has no reason to ship an unpacking stub. The tools produce the inventory, and the verdict comes from what does not fit.

What an automated audit adds

Doing all of the above by hand scales to one app per evening. An automated static pipeline (manifest parsing, decompilation, secret patterns with severity and evidence at file:line, a Ghidra pass over every .so) compresses it to minutes, produces a shareable report with MASVS mapping and CVSS scoring, and diffs every new version against the previous one, which is how you catch a supply-chain change inside an app you already trusted. The five package formats Android ships today (APK, AAB, XAPK, split APKs; see what is inside each format) are all readable by the same pipeline.

Frequently asked

Is a sideloaded APK automatically dangerous?

No. Sideloaded just means installed outside Play. What matters is what the binary does: which permissions it requests, whether native code hides anti-debug or root checks, and whether secrets are embedded. A static audit answers those questions in minutes.

Can an online scanner replace an antivirus?

They solve different problems. Antivirus compares a file against known-bad signatures. A static audit inspects what the app is built of (permissions, components, native libraries, embedded keys) and flags risky behavior even in an app nobody has seen before.

What is the strongest single malware signal in an APK?

Native library behavior. DEX code is easy to read after decompilation, but a packed .so that imports ptrace, calls anti-debug sequences or unpacks code at runtime is the classic hiding place. That is where a Ghidra-level pass pays off.

From other categories