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
4 for decompilation, jadx for Java source recovery, and androguard for permission
5 analysis, manifest inspection, and suspicious API call detection.
6domain: cybersecurity
7subdomain: malware-analysis
8tags:
9- Android
10- APK
11- apktool
12- jadx
13- androguard
14- mobile-malware
15- static-analysis
16- reverse-engineering
17version: '1.0'
18author: mahipal
19license: Apache-2.0
20nist_csf:
21- DE.AE-02
22- RS.AN-03
23- ID.RA-01
24- DE.CM-01
25mitre_attack:
26- T1406
27- T1407
28- T1626.001
29- T1655.001
30- T1521.001
31source: https://github.com/mukul975/Anthropic-Cybersecurity-Skills
32source_commit: 04450304b12645cb2b974ab96d28c0664758a88d
33metadata:
34 source: https://skillmd.com/skills/yanacuti1121/analyzing-android-malware-with-apktool
35---
36
37# Analyzing Android Malware with Apktool
38
39## Overview
40
41Android 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.
42
43
44## When to Use
45
46- When investigating security incidents that require analyzing android malware with apktool
47- When building detection rules or threat hunting queries for this domain
48- When SOC analysts need structured procedures for this analysis type
49- When validating security monitoring coverage for related attack techniques
50
51## Prerequisites
52
53- Python 3.9+ with `androguard`
54- apktool (for resource decompilation)
55- jadx (for Java source recovery, optional)
56- Isolated analysis environment (VM or sandbox)
57- Sample APK files for analysis
58
59## Steps
60
611. Parse APK with androguard to extract manifest metadata
622. Enumerate requested permissions and flag dangerous combinations
633. List activities, services, receivers, and providers from manifest
644. Scan for suspicious API calls (reflection, crypto, SMS, telephony)
655. Detect dynamic code loading patterns (DexClassLoader, Runtime.exec)
666. Extract hardcoded URLs, IPs, and C2 indicators from strings
677. Generate risk assessment report with MITRE ATT&CK mobile mappings
68
69## Expected Output
70
71- JSON report with permission analysis, component listing, suspicious API calls, network indicators, and risk score
72- Extracted strings and potential IOCs from the APK