| name | conducting-mobile-application-penetration-test |
| description | Perform a mobile application penetration test on Android and iOS apps to identify insecure data storage, certificate pinning bypass, API vulnerabilities, binary protections, and runtime manipulation using Frida, Objection, and MobSF. |
| domain | cybersecurity |
| subdomain | penetration-testing |
| tags | ["mobile-pentest","Android","iOS","Frida","Objection","MobSF","OWASP-MASTG","certificate-pinning","APK-analysis"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
Conducting Mobile Application Penetration Test
Overview
Mobile application penetration testing evaluates the security of Android and iOS applications following the OWASP Mobile Application Security Testing Guide (MASTG) and Mobile Application Security Verification Standard (MASVS). Testing covers static analysis of the application binary, dynamic runtime analysis, API communication security, data storage assessment, and reverse engineering resistance.
Prerequisites
- Application APK/IPA file or TestFlight/Play Store access
- Rooted Android device or emulator (Genymotion, Android Studio AVD)
- Jailbroken iOS device or Corellium cloud instance
- Tools: Frida, Objection, MobSF, Jadx, Burp Suite, adb, Ghidra
- OWASP MASTG checklist
Android Testing
Static Analysis
jadx -d output_dir target.apk
grep -rn "api_key\|secret\|password\|token\|firebase" output_dir/sources/
grep -i "exported\|debuggable\|allowBackup\|android:permission" output_dir/resources/AndroidManifest.xml
curl -F "file=@target.apk" http://localhost:8000/api/v1/upload \
-H "Authorization: <api_key>"
cat output_dir/resources/res/xml/network_security_config.xml
find output_dir/resources/lib -name "*.so" -exec strings {} \; | grep -i "key\|secret"
Dynamic Analysis
adb install target.apk
adb push frida-server /data/local/tmp/
adb shell chmod 755 /data/local/tmp/frida-server
adb shell /data/local/tmp/frida-server &
objection -g com.target.app explore
android hooking list activities
android hooking list services
android root disable
android sslpinning disable
android keystore list
android hooking search classes SharedPreferences
android clipboard monitor
env
ls /data/data/com.target.app/
file download /data/data/com.target.app/shared_prefs/
file download /data/data/com.target.app/databases/
Data Storage Testing
adb shell cat /data/data/com.target.app/shared_prefs/*.xml
adb pull /data/data/com.target.app/databases/app.db
sqlite3 app.db ".dump" | grep -i "password\|token\|session"
adb shell ls /sdcard/Android/data/com.target.app/
adb logcat -d | grep -i "token\|password\|session\|api_key"
adb backup -apk -shared com.target.app -f backup.ab
java -jar abe.jar unpack backup.ab backup.tar
tar xf backup.tar
Network Traffic Analysis
objection -g com.target.app explore
android sslpinning disable
frida -U -f com.target.app -l ssl_pinning_bypass.js --no-pause
apktool d target.apk -o decompiled/
apktool b decompiled/ -o patched.apk
jarsigner -keystore my.keystore patched.apk alias_name
iOS Testing
Static Analysis
python3 dump.py com.target.app
Clutch -d com.target.app
class-dump -H TargetApp -o headers/
grep -rn "password\|token\|secret\|apiKey" headers/
plutil -p Payload/TargetApp.app/Info.plist
grep -i "http://" headers/*.h
grep -i "NSAllowsArbitraryLoads" Payload/TargetApp.app/Info.plist
Dynamic Analysis (iOS)
frida -U -f com.target.app -l ios_bypass.js --no-pause
objection -g com.target.app explore
ios sslpinning disable
ios jailbreak disable
ios keychain dump
ios plist cat NSUserDefaults
ios cookies get
ios nsurlcredentialstorage dump
objection -g com.target.app explore --startup-command 'ios keychain dump'
objection -g com.target.app explore --startup-command 'ios info binary'
API Testing
OWASP MASVS Checklist
| Category | Test | Status |
|---|
| MASVS-STORAGE-1 | Sensitive data in system logs | [ ] |
| MASVS-STORAGE-2 | Sensitive data in backups | [ ] |
| MASVS-STORAGE-3 | Sensitive data in IPC | [ ] |
| MASVS-CRYPTO-1 | Proper cryptographic APIs | [ ] |
| MASVS-AUTH-1 | Local authentication bypass | [ ] |
| MASVS-NETWORK-1 | TLS with trusted CA | [ ] |
| MASVS-NETWORK-2 | Certificate pinning | [ ] |
| MASVS-PLATFORM-1 | Exported components secured | [ ] |
| MASVS-CODE-1 | Code obfuscation | [ ] |
| MASVS-RESILIENCE-1 | Root/jailbreak detection | [ ] |
References