| name | analyzing-android-malware-with-apktool |
| description | Perform static analysis of Android APK malware samples using apktool for decompilation, jadx for Java source recovery, and androguard for permission analysis, manifest inspection, and suspicious API call detection. |
| domain | cybersecurity |
| subdomain | malware-analysis |
| tags | ["Android","APK","apktool","jadx","androguard","mobile-malware","static-analysis","reverse-engineering"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | ["DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01"] |
Analyzing Android Malware with Apktool
Overview
Android malware distributed as APK files can be statically analyzed to extract permissions, activities, services, broadcast receivers, and suspicious API calls without executing the sample. This skill uses androguard for programmatic APK analysis, identifying dangerous permission combinations, obfuscated code patterns, dynamic code loading, reflection-based API calls, and network communication indicators.
When to Use
- When investigating security incidents that require analyzing android malware with apktool
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Detection Gaps & Validation
- Dynamic code loading hides the payload. apktool/jadx only show the shipped DEX; malware pulls a second-stage DEX/JAR via
DexClassLoader/loadDex or decrypts a blob in assets/, res/raw/, or lib/*.so. Grep smali for DexClassLoader, System.loadLibrary, and Cipher/Base64 near asset reads before concluding it is benign.
- Reflection + string obfuscation defeat keyword scans.
sendTextMessage/Runtime.exec are reached via Class.forName/getMethod/invoke with XOR/Base64 strings, so literals never appear. Decode with androguard or dex-oracle/simplify first.
- Packers leave a stub. Jiagu/Bangcle/ApkProtect ship a loader DEX and unpack at runtime; detect the packer signature, then dump the real DEX from a rooted emulator.
- Confirm a hit: re-decompile the runtime-dumped DEX (Frida
dexdump or pull from /data/data/<pkg>), validate dangerous permissions against actual API usage and exported <service>/<receiver> flags, and prove extracted C2 URLs are live via mitmproxy rather than dead/decoy strings.
- False positives: ad/analytics SDKs (AdMob, Firebase, Facebook) legitimately request broad permissions, reflection, and network. Confirm the suspect class sits in the app's own package, not a bundled third-party SDK, before flagging.
Prerequisites
- Python 3.9+ with
androguard