Android APK Penetration Testing
A comprehensive methodology for security testing Android applications.
Quick Start
- Static Analysis - Examine the APK without running it
- Dynamic Analysis - Test the running application
- Exploitation - Attempt to leverage findings
- Reporting - Document vulnerabilities
Static Analysis
Environment Setup
# Install essential tools
apktool
jadx
mobf
semgrep
# Optional: MobSF, Pithus, flutter-packer, rn-differ
Manifest Review
Check for:
- Debug mode enabled (
android:debuggable="true")
- Backup permissions (
android:allowBackup="true")
- Exported components (Activities, Services, Providers, Receivers)
- Network security config (
networkSecurityConfig XML)
- Intent filters and URL schemes
android:exported flag (mandatory on Android 12+)
- App Links / Deep Links (
android:autoVerify)
Critical checks:
- Unity Runtime: exported
UnityPlayerActivity/UnityPlayerGameActivity with unity CLI extras bridge
- Test
-xrsdk-pre-init-library <abs-path> for pre-init dlopen() RCE
- OEM ROM add-ons (OxygenOS/ColorOS/MIUI/OneUI) for extra exported ContentProviders
Code Analysis
Search for:
- Hardcoded credentials and API keys
- Insecure crypto algorithms (deprecated/weak)
- Sensitive data storage (internal/external)
- Firebase configuration and APIs
- Passwords, tokens, Bluetooth UUIDs
- Obfuscation presence (ProGuard, R8, etc.)
- Root detection, emulator detection, anti-tampering checks
WebView.addJavascriptInterface or loadData*() calls
- Play Integrity / SafetyNet / DeviceCheck implementations
Component Analysis
Test each component:
- Activities - especially exported ones
- Services - check for exposed services
- Content Providers - test for SQL injection, path traversal
- Broadcast Receivers - check for intent injection
- URL Schemes - verify intent handling
Library Analysis
- Check if all libraries compiled with PIE flag
- Scan third-party native libraries for known CVEs (libwebp CVE-2023-4863, libpng, etc.)
- Analyze cross-platform bundles (Flutter
libapp.so, React-Native JS bundles, Capacitor/Ionic assets)
- Use SEMgrep Mobile rules, Pithus, MobSF ≥ 3.9 AI-assisted scans
Dynamic Analysis
Environment Setup
- Online dynamic analysis environment
- Local VM or physical device
- ADB configured and working
- Proxy tool ready (Burp, mitmproxy, etc.)
Runtime Testing
Check for:
- Unintended data leakage (logging, copy/paste, crash logs)
- Confidential information in SQLite databases
- Exploitable exposed Activities (authorization bypass)
- Exploitable Content Providers (accessing/manipulating sensitive data)
- Exploitable exposed Services
- Exploitable Broadcast Receivers
- Clear text transmission / weak algorithms
- MitM possibilities
Traffic Inspection
- Intercept HTTP/HTTPS traffic
- Search for common Web vulnerabilities
- Check for Android Client Side Injections
- Verify certificate pinning
Runtime Hooking
Use Frida to:
- Obtain dynamic data from the application
- Bypass security checks
- Extract passwords and tokens
- Hook Play Integrity / SafetyNet
- Test runtime modifications
Modern tooling:
- Objection > 2.0
- Frida 17+ (Android 16 support, ART offset fixes)
- NowSecure-Tracer (2024)
- Dynamic system-wide tracing with
perfetto / simpleperf
Advanced Exploitation
- Tapjacking / Animation-driven attacks (TapTrap 2025) - even on Android 15+
- Overlay / SYSTEM_ALERT_WINDOW clickjacking
- Accessibility Service abuse for privilege escalation
adb backup / bmgr backupnow for app data dumping
- Binder-level LPEs (CVE-2023-20963, CVE-2023-20928)
- Play Integrity bypass:
Frida Gadget, MagiskIntegrityFix, Integrity-faker
- Recent Play Integrity Fix forks (≥17.x) with
playcurl
- ZygiskNext + PIF + ZygiskAssistant/TrickyStore combinations
OEM-Specific Testing
For OEM telephony/provider bugs (e.g., OxygenOS CVE-2025-10184):
- Attempt permission-less SMS read/send via
content CLI
- Test blind SQLi in
update() to exfiltrate rows
- Query:
content query --uri content://com.android.providers.telephony/ServiceNumberProvider without READ_SMS
Common Vulnerabilities Checklist
Authentication & Authorization
Data Protection
Network Security
Component Security
Runtime Security
Reporting
Document:
- Vulnerability description
- CVSS score
- Proof of concept
- Impact assessment
- Remediation recommendations
- References to CVEs where applicable
References
1---2name: android-apk-pentest3description: Android APK penetration testing methodology and checklist. Use this skill whenever analyzing Android applications for security vulnerabilities, performing mobile app security assessments, reverse engineering APKs, or conducting static/dynamic analysis of Android apps. Trigger for any Android security testing, APK analysis, mobile pentesting, or when investigating Android app vulnerabilities including exported components, insecure data storage, crypto issues, intent-based attacks, WebView exploits, or Play Integrity bypasses.4---56# Android APK Penetration Testing78A comprehensive methodology for security testing Android applications.910## Quick Start11121. **Static Analysis** - Examine the APK without running it132. **Dynamic Analysis** - Test the running application143. **Exploitation** - Attempt to leverage findings154. **Reporting** - Document vulnerabilities1617## Static Analysis1819### Environment Setup2021```bash22# Install essential tools23apktool24jadx25mobf26semgrep27# Optional: MobSF, Pithus, flutter-packer, rn-differ28```2930### Manifest Review3132Check for:33- Debug mode enabled (`android:debuggable="true"`)34- Backup permissions (`android:allowBackup="true"`)35- Exported components (Activities, Services, Providers, Receivers)36- Network security config (`networkSecurityConfig` XML)37- Intent filters and URL schemes38- `android:exported` flag (mandatory on Android 12+)39- App Links / Deep Links (`android:autoVerify`)4041**Critical checks:**42- Unity Runtime: exported `UnityPlayerActivity`/`UnityPlayerGameActivity` with `unity` CLI extras bridge43- Test `-xrsdk-pre-init-library <abs-path>` for pre-init `dlopen()` RCE44- OEM ROM add-ons (OxygenOS/ColorOS/MIUI/OneUI) for extra exported ContentProviders4546### Code Analysis4748Search for:49- Hardcoded credentials and API keys50- Insecure crypto algorithms (deprecated/weak)51- Sensitive data storage (internal/external)52- Firebase configuration and APIs53- Passwords, tokens, Bluetooth UUIDs54- Obfuscation presence (ProGuard, R8, etc.)55- Root detection, emulator detection, anti-tampering checks56- `WebView.addJavascriptInterface` or `loadData*()` calls57- Play Integrity / SafetyNet / DeviceCheck implementations5859### Component Analysis6061Test each component:62- **Activities** - especially exported ones63- **Services** - check for exposed services64- **Content Providers** - test for SQL injection, path traversal65- **Broadcast Receivers** - check for intent injection66- **URL Schemes** - verify intent handling6768### Library Analysis6970- Check if all libraries compiled with PIE flag71- Scan third-party native libraries for known CVEs (libwebp CVE-2023-4863, libpng, etc.)72- Analyze cross-platform bundles (Flutter `libapp.so`, React-Native JS bundles, Capacitor/Ionic assets)73- Use SEMgrep Mobile rules, Pithus, MobSF ≥ 3.9 AI-assisted scans7475## Dynamic Analysis7677### Environment Setup7879- Online dynamic analysis environment80- Local VM or physical device81- ADB configured and working82- Proxy tool ready (Burp, mitmproxy, etc.)8384### Runtime Testing8586Check for:87- Unintended data leakage (logging, copy/paste, crash logs)88- Confidential information in SQLite databases89- Exploitable exposed Activities (authorization bypass)90- Exploitable Content Providers (accessing/manipulating sensitive data)91- Exploitable exposed Services92- Exploitable Broadcast Receivers93- Clear text transmission / weak algorithms94- MitM possibilities9596### Traffic Inspection9798- Intercept HTTP/HTTPS traffic99- Search for common Web vulnerabilities100- Check for Android Client Side Injections101- Verify certificate pinning102103### Runtime Hooking104105Use **Frida** to:106- Obtain dynamic data from the application107- Bypass security checks108- Extract passwords and tokens109- Hook Play Integrity / SafetyNet110- Test runtime modifications111112**Modern tooling:**113- Objection > 2.0114- Frida 17+ (Android 16 support, ART offset fixes)115- NowSecure-Tracer (2024)116- Dynamic system-wide tracing with `perfetto` / `simpleperf`117118### Advanced Exploitation119120- **Tapjacking / Animation-driven attacks** (TapTrap 2025) - even on Android 15+121- **Overlay / SYSTEM_ALERT_WINDOW clickjacking**122- **Accessibility Service abuse** for privilege escalation123- `adb backup` / `bmgr backupnow` for app data dumping124- **Binder-level LPEs** (CVE-2023-20963, CVE-2023-20928)125- Play Integrity bypass: `Frida Gadget`, `MagiskIntegrityFix`, `Integrity-faker`126- Recent Play Integrity Fix forks (≥17.x) with `playcurl`127- ZygiskNext + PIF + ZygiskAssistant/TrickyStore combinations128129### OEM-Specific Testing130131For OEM telephony/provider bugs (e.g., OxygenOS CVE-2025-10184):132- Attempt permission-less SMS read/send via `content` CLI133- Test blind SQLi in `update()` to exfiltrate rows134- Query: `content query --uri content://com.android.providers.telephony/ServiceNumberProvider` without `READ_SMS`135136## Common Vulnerabilities Checklist137138### Authentication & Authorization139- [ ] Weak authentication mechanisms140- [ ] Session management issues141- [ ] Authorization bypass in exported components142- [ ] Intent-based authorization bypass143144### Data Protection145- [ ] Insecure data storage (internal/external)146- [ ] Hardcoded credentials147- [ ] Weak or deprecated crypto148- [ ] Sensitive data in logs149- [ ] SQLite database exposure150151### Network Security152- [ ] Cleartext traffic permitted153- [ ] Certificate pinning bypass154- [ ] Weak TLS configuration155- [ ] API key exposure156157### Component Security158- [ ] Exported Activities without proper validation159- [ ] Exported Services without authentication160- [ ] Content Provider SQL injection161- [ ] Broadcast Receiver intent injection162- [ ] URL Scheme vulnerabilities163164### Runtime Security165- [ ] Root detection bypass166- [ ] Emulator detection bypass167- [ ] Anti-tampering bypass168- [ ] WebView JavaScript interface exposure169- [ ] Play Integrity / SafetyNet bypass170171## Reporting172173Document:174- Vulnerability description175- CVSS score176- Proof of concept177- Impact assessment178- Remediation recommendations179- References to CVEs where applicable180181## References182183- [CVE-2025-59489 – Arbitrary Code Execution in Unity Runtime](https://flatt.tech/research/posts/arbitrary-code-execution-in-unity-runtime/)184- [CVE-2025-10184 – OnePlus OxygenOS Telephony Provider Bypass](https://www.rapid7.com/blog/post/cve-2025-10184-oneplus-oxygenos-telephony-provider-permission-bypass-not-fixed/)185- [TapTrap Animation-Based Tapjacking Research](https://www.tomsguide.com/computing/online-security/this-new-android-attack-could-trick-you-into-compromising-your-own-phone-everything-you-need-to-know)186- [Hacktricks Android Pentesting](https://book.hacktricks.xyz/pentesting-mobile/android-app-pentesting)