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
Prerequisites
- Python 3.9+ with
androguard
- apktool (for resource decompilation)
- jadx (for Java source recovery, optional)
- Isolated analysis environment (VM or sandbox)
- Sample APK files for analysis
Steps
- Parse APK with androguard to extract manifest metadata
- Enumerate requested permissions and flag dangerous combinations
- List activities, services, receivers, and providers from manifest
- Scan for suspicious API calls (reflection, crypto, SMS, telephony)
- Detect dynamic code loading patterns (DexClassLoader, Runtime.exec)
- Extract hardcoded URLs, IPs, and C2 indicators from strings
- Generate risk assessment report with MITRE ATT&CK mobile mappings
Expected Output
- JSON report with permission analysis, component listing, suspicious API calls, network indicators, and risk score
- Extracted strings and potential IOCs from the APK
1---
2name: analyzing-android-malware-with-apktool
3description: Perform static analysis of Android APK malware samples using apktool for decompilation, jadx for Java source
4 recovery, and androguard for permission analysis, manifest inspection, and suspicious API call detection.
5domain: cybersecurity
6subdomain: malware-analysis
7tags:
8- Android
9- APK
10- apktool
11- jadx
12- androguard
13- mobile-malware
14- static-analysis
15- reverse-engineering
16version: '1.0'
17author: mahipal
18license: Apache-2.0
19nist_csf:
20- DE.AE-02
21- RS.AN-03
22- ID.RA-01
23- DE.CM-01
24---
25
26# Analyzing Android Malware with Apktool
27
28## Overview
29
30Android 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.
31
32
33## When to Use
34
35- When investigating security incidents that require analyzing android malware with apktool
36- When building detection rules or threat hunting queries for this domain
37- When SOC analysts need structured procedures for this analysis type
38- When validating security monitoring coverage for related attack techniques
39
40## Prerequisites
41
42- Python 3.9+ with `androguard`
43- apktool (for resource decompilation)
44- jadx (for Java source recovery, optional)
45- Isolated analysis environment (VM or sandbox)
46- Sample APK files for analysis
47
48## Steps
49
501. Parse APK with androguard to extract manifest metadata
512. Enumerate requested permissions and flag dangerous combinations
523. List activities, services, receivers, and providers from manifest
534. Scan for suspicious API calls (reflection, crypto, SMS, telephony)
545. Detect dynamic code loading patterns (DexClassLoader, Runtime.exec)
556. Extract hardcoded URLs, IPs, and C2 indicators from strings
567. Generate risk assessment report with MITRE ATT&CK mobile mappings
57
58## Expected Output
59
60- JSON report with permission analysis, component listing, suspicious API calls, network indicators, and risk score
61- Extracted strings and potential IOCs from the APK