Mobile Security Testing

Category: Mobile / Application Security MITRE ATT&CK: T1476 — Deliver Malicious App via Other Means; T1516 — Input Injection Related: Social Engineering, Phishing, Web Application Testing

Overview

Mobile penetration testing covers static analysis of apps, dynamic testing of APIs and data storage, and evaluation of device-level attack vectors including physical access, Bluetooth abuse, and social engineering via SMS and QR codes.

Threat Vectors

Application-Level

ThreatDescription
Insecure data storageCredentials, tokens in SharedPreferences, SQLite, or SD card
Insecure networkNo cert pinning, cleartext traffic, weak TLS
Code vulnerabilitiesHardcoded secrets, debug code, SQL injection in app
Malicious appsRepackaged/trojanized APKs distributed outside official stores
Deep link abuseIntent hijacking via exposed Activities

Device/Social

ThreatDescription
SmishingSMS phishing — fake package notifications, bank alerts
Email phishingSame as desktop phishing, smaller screen reduces scrutiny
QR phishingMalicious QR codes in physical spaces or emails
Fake appsLookalike apps in third-party stores; credential harvesters
OAuth phishingFake OAuth consent screens stealing tokens
Bluetooth spoofingFake device pairing to enable eavesdropping or data exfil
SideloadingInstalling APKs outside Play Store via social engineering
MDM bypassExploiting MDM enrollment gaps to enroll attacker device

Static Analysis Tools

ToolPlatformPurpose
MobSFAndroid / iOSAutomated static + dynamic analysis framework
AndroBugsAndroidVulnerability scanner for APKs
AndrowarnAndroidDetects potential malicious behaviors in APKs
MARAAndroidMobile Application Reverse Engineering & Analysis
QarkAndroidStatic analysis for common Android vulnerabilities
jadxAndroidAPK decompiler to readable Java
apktoolAndroidAPK unpacker / smali disassembler
objectionAndroid / iOSRuntime exploration using Frida

Dynamic Analysis Setup

Android

# Extract APK
adb shell pm path com.target.app
adb pull /data/app/com.target.app-1/base.apk

# Static analysis
jadx -d output/ base.apk

# MobSF automated scan
docker pull opensecurity/mobile-security-framework-mobsf
docker run -it -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest

# Runtime analysis with Frida / objection
frida-server &   # on device (requires root)
objection -g com.target.app explore

Certificate Pinning Bypass

# objection — runtime disable cert pinning
android sslpinning disable

# Frida script
frida -U -f com.target.app -l bypass-ssl-pinning.js --no-pause

Common Findings

Android

  • android:debuggable="true" in AndroidManifest.xml
  • android:allowBackup="true" — enables ADB backup of app data
  • Exported Activities/Services without permission requirements
  • Hardcoded API keys in strings.xml or smali code
  • Sensitive data logged via android.util.Log
  • WebView with JavaScript enabled + addJavascriptInterface (JS injection)

iOS

  • Sensitive data in NSUserDefaults or unencrypted SQLite
  • ATS (App Transport Security) disabled
  • Weak or missing keychain access controls
  • Jailbreak detection that can be bypassed

Bluetooth Attack Vectors

  • Spoofing: Fake Bluetooth device name/MAC to appear as trusted peripheral
  • Eavesdropping: If pairing uses weak/no PIN on older devices (BT 2.0)
  • BLUESMACK/BLUEBUGGING: Historical — mostly patched; check older devices
  • BLE scan: Enumerate BLE beacons, track movements, probe GATT characteristics

OPSEC / Engagement Notes

  • Mobile testing typically requires physical or MDM-enrolled device
  • Over-the-air assessment requires attacker to be on same network segment (WiFi MITM)
  • iOS testing without jailbreak is limited to API testing and binary analysis; Corellium provides cloud iOS virtualization

References

  • TrustedSec — “Common Mobile Device Threat Vectors” (2025-06-10)
  • OWASP Mobile Security Testing Guide (MSTG)
  • MobSF — github.com/MobSF/Mobile-Security-Framework-MobSF