githubEdit

Android

Skill Level: Intermediate Prerequisites: Java/Kotlin basics, Android architecture

Tools

Extract

# Jadx - decompiler gui
jadx-gui
# Jadx - decomp cli (with deobf)
jadx -d path/to/extract/ --deobf app_name.apk

# Apkx decompiler
apkx example.apk 

# Apktool
apktool d app_name.apk

Get sensitive info

# Urls and secrets
# https://github.com/dwisiswant0/apkleaks
python apkleaks.py -f ~/path/to/file.apk

# Analyze URLs in apk:
# https://github.com/shivsahni/APKEnum
python APKEnum.py -p ~/Downloads/app-debug.apk

# Quick wins tool (go branch)
# https://github.com/mzfr/slicer
slicer -d path/to/extact/apk

# Unpack apk and find interesting strings
apktool d app_name.apk
cd apk_folder
grep -EHirn "accesskey|admin|aes|api_key|apikey|checkClientTrusted|crypt|http:|https:|password|pinning|secret|SHA256|SharedPreferences|superuser|token|X509TrustManager|insert into"
grep -Phro "(https?://)[\w\.-/]+[\"'\`]" | sed 's#"##g' | anew | grep -v "w3\|android\|github\|http://schemas.android\|google\|http://goo.gl"

# Apk analyzer
# https://github.com/Cyber-Buddy/APKHunt

# Regex FCM Server Keys for push notification services control
AAAA[A-Za-z0-9_-]{7}:[A-Za-z0-9_-]{140}
AIza[0-9A-Za-z_-]{35}

# FCM Google Server Keys Validation
# https://github.com/adarshshetty18/fcm_server_key
python3 fcmserverkey.py file.apk

# Facebook Static Analysis Tool
https://github.com/facebook/mariana-trench/

# Manifest.xml findings:
android:allowBackup = TRUE
android:debuggable = TRUE
andorid:exported= TRUE or not set (within <provider>-Tag) --> allows external app to access data
android.permission.WRITE_EXTERNAL_STORAGE / READ_EXTERNAL_STORAGE (ONLY IF sensitive data was stored/read externally)
Use of permissions
            e.g. the app opens website in external browser (not inApp), however requires "android.permission.INTERNET" --> false usage of permissions. (over-privileged)
            "android:protectionLevel" was not set properly (<permission android:name="my_custom_permission_name" android:protectionLevel="signature"/>)
            missing android:permission (permission tags limit exposure to other apps)

Static analyzers

Manual analysis (adb, frida, objection, etc...)

Burp Cert Installation > Android 7.0

Tips

Mindmaps

Flutter Applications

Flutter apps compile to native code, making traditional decompilation harder. Here's how to test them:

Identifying Flutter Apps

Static Analysis

Dynamic Analysis

Common Vulnerabilities

React Native Applications

React Native apps use JavaScript, making analysis easier than Flutter.

Identifying React Native Apps

Extracting JavaScript Code

Hermes Bytecode

Dynamic Analysis

Common Vulnerabilities

Mobile API Security

Common API Issues in Mobile Apps

Authentication Testing

API-Specific Tools

OWASP MASTG Mapping

Key testing areas mapped to OWASP Mobile Application Security Testing Guide:

MASTG Category
What to Test

MASVS-STORAGE

Data storage, logs, backups, clipboard

MASVS-CRYPTO

Crypto implementation, key storage

MASVS-AUTH

Authentication, session management

MASVS-NETWORK

TLS, certificate pinning, network security config

MASVS-PLATFORM

WebViews, deep links, IPC

MASVS-CODE

Code quality, reverse engineering

MASVS-RESILIENCE

Anti-tampering, obfuscation

Reference: OWASP MASTGarrow-up-right

Android 14-15 Security Changes

Android 14 Security Enhancements

Testing on Android 14+

Android 15 Security Features

Proxy Setup Changes

Bypassing New Protections

Last updated

Was this helpful?