name: mobile-security
description: >-
Mobile application security testing for Android and iOS including static analysis
(APK/IPA decompilation), dynamic analysis (Frida instrumentation), certificate
pinning bypass, insecure data storage detection, API traffic interception, root/
jailbreak detection bypass, OWASP MASTG/MASVS compliance, and mobile threat defense.
domain: cybersecurity
subdomain: mobile-security
tags:
- android
- ios
- frida
- mobile-pentesting
- owasp-masvs
- apk-analysis
- certificate-pinning
- objection
- mobile-threat-defense
version: "1.0"
author: defconxt
license: AGPL-3.0
compatibility: Designed for Claude Code, GitHub Copilot, OpenAI Codex, Cursor, Gemini CLI, and any agentskills.io-compatible agent.
metadata:
mitre-attack: ["T1407", "T1409", "T1414", "T1417", "T1422"]
owasp-mobile: ["M1", "M2", "M3", "M4", "M5", "M6", "M7", "M8", "M9", "M10"]
frameworks: ["OWASP MASVS v2", "OWASP MASTG", "NIST SP 800-163"]
Mobile Security
When to Use
Activate when the operator asks about Android/iOS security testing, mobile app
pentesting, Frida, certificate pinning bypass, mobile OWASP, APK analysis,
or mobile threat defense.
Mode: [MODE: RED] for mobile pentesting; [MODE: BLUE] for mobile device management; [MODE: ARCHITECT] for secure mobile design.
Quick Reference
| Task |
Tool / Command |
Platform |
| APK decompile |
apktool d target.apk -o output/ |
Android |
| Java decompile |
jadx -d output/ target.apk |
Android |
| IPA decrypt |
frida-ios-dump -u -H host target |
iOS |
| Frida hook |
frida -U -f com.target.app -l hook.js |
Both |
| Objection explore |
objection -g com.target.app explore |
Both |
| SSL pinning bypass |
objection -g com.target.app explore -s "android sslpinning disable" |
Both |
| Traffic intercept |
Burp + proxy settings on device |
Both |
| Root detection bypass |
objection -g com.target.app explore -s "android root disable" |
Android |
| File system browse |
objection -g com.target.app explore -s "env" |
Both |
| Keychain dump |
objection -g com.target.app explore -s "ios keychain dump" |
iOS |
Workflow
1. Static Analysis
# Android APK decompilation
apktool d target.apk -o decompiled/
jadx -d java_src/ target.apk
# Search for secrets and misconfigurations
grep -rn "api_key\|password\|secret\|token\|firebase" java_src/
grep -rn "http://" java_src/ # Cleartext HTTP
grep -rn "MODE_WORLD_READABLE\|MODE_WORLD_WRITEABLE" java_src/
grep -rn "\.db\|\.sqlite" java_src/ # Database files
# AndroidManifest.xml review
# Check: exported components, debuggable flag, backup allowed,
# cleartext traffic, permissions
grep -E "exported=\"true\"|debuggable=\"true\"|allowBackup=\"true\"|usesCleartextTraffic" decompiled/AndroidManifest.xml
# MobSF automated scan
docker run -it -p 8000:8000 opensecurity/mobile-security-framework-mobsf
# Upload APK/IPA via web interface
# iOS IPA analysis
unzip target.ipa -d extracted/
# Check Info.plist for ATS exceptions, URL schemes
plutil -convert xml1 extracted/Payload/App.app/Info.plist
grep -A5 "NSAppTransportSecurity" extracted/Payload/App.app/Info.plist
2. Dynamic Analysis (Frida)
// Frida script: Hook encryption function
Java.perform(function() {
var cipher = Java.use('javax.crypto.Cipher');
cipher.doFinal.overload('[B').implementation = function(data) {
console.log('Cipher.doFinal input: ' + byteArrayToHex(data));
var result = this.doFinal(data);
console.log('Cipher.doFinal output: ' + byteArrayToHex(result));
return result;
};
});
// Hook SharedPreferences writes
Java.perform(function() {
var editor = Java.use('android.content.SharedPreferences$Editor');
editor.putString.implementation = function(key, value) {
console.log('SharedPrefs PUT: ' + key + ' = ' + value);
return this.putString(key, value);
};
});
// iOS: Hook NSURLSession for network inspection
if (ObjC.available) {
var NSURLSession = ObjC.classes.NSURLSession;
Interceptor.attach(NSURLSession['- dataTaskWithRequest:completionHandler:'].implementation, {
onEnter: function(args) {
var request = ObjC.Object(args[2]);
console.log('URL: ' + request.URL().absoluteString());
}
});
}
3. Certificate Pinning Bypass
# Objection (easiest)
objection -g com.target.app explore -s "android sslpinning disable"
objection -g com.target.app explore -s "ios sslpinning disable"
# Frida script for custom pinning bypass
frida -U -f com.target.app -l ssl_bypass.js --no-pause
# Magisk + TrustUserCerts module (Android 7+)
# System-level CA installation for intercepting all traffic
4. OWASP MASVS Checklist
MASVS-STORAGE: Data storage and privacy
├── No sensitive data in logs
├── No sensitive data in backups
├── No sensitive data in cleartext (SharedPrefs, NSUserDefaults)
├── Keychain/Keystore used for sensitive data
└── Clipboard cleared for sensitive fields
MASVS-CRYPTO: Cryptographic practices
├── No hardcoded keys
├── No deprecated algorithms (MD5, SHA1, DES, RC4)
├── Proper key management (Android Keystore, iOS Keychain)
└── TLS 1.2+ enforced
MASVS-AUTH: Authentication and authorization
├── Session management server-side
├── Biometric auth backed by Keystore/Keychain
├── Re-authentication for sensitive operations
└── Token expiry enforced
MASVS-NETWORK: Network communication
├── TLS for all connections
├── Certificate pinning implemented
├── ATS enabled (iOS) / cleartext traffic disabled (Android)
└── No custom certificate validation that weakens security
MASVS-RESILIENCE: Reverse engineering resilience
├── Root/jailbreak detection
├── Debugger detection
├── Code obfuscation (ProGuard/R8 for Android)
└── Integrity verification
Verification
1---2name: mobile-security-23description: <!-- Copyright (c) 2026 defconxt. All rights reserved. -->4---5
6<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
7<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
8---
9name: mobile-security
10description: >-
11 Mobile application security testing for Android and iOS including static analysis
12 (APK/IPA decompilation), dynamic analysis (Frida instrumentation), certificate
13 pinning bypass, insecure data storage detection, API traffic interception, root/
14 jailbreak detection bypass, OWASP MASTG/MASVS compliance, and mobile threat defense.
15domain: cybersecurity
16subdomain: mobile-security
17tags:
18 - android
19 - ios
20 - frida
21 - mobile-pentesting
22 - owasp-masvs
23 - apk-analysis
24 - certificate-pinning
25 - objection
26 - mobile-threat-defense
27version: "1.0"
28author: defconxt
29license: AGPL-3.0
30compatibility: Designed for Claude Code, GitHub Copilot, OpenAI Codex, Cursor, Gemini CLI, and any agentskills.io-compatible agent.
31metadata:
32 mitre-attack: ["T1407", "T1409", "T1414", "T1417", "T1422"]
33 owasp-mobile: ["M1", "M2", "M3", "M4", "M5", "M6", "M7", "M8", "M9", "M10"]
34 frameworks: ["OWASP MASVS v2", "OWASP MASTG", "NIST SP 800-163"]
35---
36
37# Mobile Security
38
39## When to Use
40
41Activate when the operator asks about Android/iOS security testing, mobile app
42pentesting, Frida, certificate pinning bypass, mobile OWASP, APK analysis,
43or mobile threat defense.
44
45Mode: `[MODE: RED]` for mobile pentesting; `[MODE: BLUE]` for mobile device management; `[MODE: ARCHITECT]` for secure mobile design.
46
47## Quick Reference
48
49| Task | Tool / Command | Platform |
50|------|---------------|----------|
51| APK decompile | `apktool d target.apk -o output/` | Android |
52| Java decompile | `jadx -d output/ target.apk` | Android |
53| IPA decrypt | `frida-ios-dump -u -H host target` | iOS |
54| Frida hook | `frida -U -f com.target.app -l hook.js` | Both |
55| Objection explore | `objection -g com.target.app explore` | Both |
56| SSL pinning bypass | `objection -g com.target.app explore -s "android sslpinning disable"` | Both |
57| Traffic intercept | Burp + proxy settings on device | Both |
58| Root detection bypass | `objection -g com.target.app explore -s "android root disable"` | Android |
59| File system browse | `objection -g com.target.app explore -s "env"` | Both |
60| Keychain dump | `objection -g com.target.app explore -s "ios keychain dump"` | iOS |
61
62## Workflow
63
64### 1. Static Analysis
65
66```bash
67# Android APK decompilation
68apktool d target.apk -o decompiled/
69jadx -d java_src/ target.apk
70
71# Search for secrets and misconfigurations
72grep -rn "api_key\|password\|secret\|token\|firebase" java_src/
73grep -rn "http://" java_src/ # Cleartext HTTP
74grep -rn "MODE_WORLD_READABLE\|MODE_WORLD_WRITEABLE" java_src/
75grep -rn "\.db\|\.sqlite" java_src/ # Database files
76
77# AndroidManifest.xml review
78# Check: exported components, debuggable flag, backup allowed,
79# cleartext traffic, permissions
80grep -E "exported=\"true\"|debuggable=\"true\"|allowBackup=\"true\"|usesCleartextTraffic" decompiled/AndroidManifest.xml
81
82# MobSF automated scan
83docker run -it -p 8000:8000 opensecurity/mobile-security-framework-mobsf
84# Upload APK/IPA via web interface
85
86# iOS IPA analysis
87unzip target.ipa -d extracted/
88# Check Info.plist for ATS exceptions, URL schemes
89plutil -convert xml1 extracted/Payload/App.app/Info.plist
90grep -A5 "NSAppTransportSecurity" extracted/Payload/App.app/Info.plist
91```
92
93### 2. Dynamic Analysis (Frida)
94
95```javascript
96// Frida script: Hook encryption function
97Java.perform(function() {
98 var cipher = Java.use('javax.crypto.Cipher');
99 cipher.doFinal.overload('[B').implementation = function(data) {
100 console.log('Cipher.doFinal input: ' + byteArrayToHex(data));
101 var result = this.doFinal(data);
102 console.log('Cipher.doFinal output: ' + byteArrayToHex(result));
103 return result;
104 };
105});
106
107// Hook SharedPreferences writes
108Java.perform(function() {
109 var editor = Java.use('android.content.SharedPreferences$Editor');
110 editor.putString.implementation = function(key, value) {
111 console.log('SharedPrefs PUT: ' + key + ' = ' + value);
112 return this.putString(key, value);
113 };
114});
115
116// iOS: Hook NSURLSession for network inspection
117if (ObjC.available) {
118 var NSURLSession = ObjC.classes.NSURLSession;
119 Interceptor.attach(NSURLSession['- dataTaskWithRequest:completionHandler:'].implementation, {
120 onEnter: function(args) {
121 var request = ObjC.Object(args[2]);
122 console.log('URL: ' + request.URL().absoluteString());
123 }
124 });
125}
126```
127
128### 3. Certificate Pinning Bypass
129
130```bash
131# Objection (easiest)
132objection -g com.target.app explore -s "android sslpinning disable"
133objection -g com.target.app explore -s "ios sslpinning disable"
134
135# Frida script for custom pinning bypass
136frida -U -f com.target.app -l ssl_bypass.js --no-pause
137
138# Magisk + TrustUserCerts module (Android 7+)
139# System-level CA installation for intercepting all traffic
140```
141
142### 4. OWASP MASVS Checklist
143
144```
145MASVS-STORAGE: Data storage and privacy
146├── No sensitive data in logs
147├── No sensitive data in backups
148├── No sensitive data in cleartext (SharedPrefs, NSUserDefaults)
149├── Keychain/Keystore used for sensitive data
150└── Clipboard cleared for sensitive fields
151
152MASVS-CRYPTO: Cryptographic practices
153├── No hardcoded keys
154├── No deprecated algorithms (MD5, SHA1, DES, RC4)
155├── Proper key management (Android Keystore, iOS Keychain)
156└── TLS 1.2+ enforced
157
158MASVS-AUTH: Authentication and authorization
159├── Session management server-side
160├── Biometric auth backed by Keystore/Keychain
161├── Re-authentication for sensitive operations
162└── Token expiry enforced
163
164MASVS-NETWORK: Network communication
165├── TLS for all connections
166├── Certificate pinning implemented
167├── ATS enabled (iOS) / cleartext traffic disabled (Android)
168└── No custom certificate validation that weakens security
169
170MASVS-RESILIENCE: Reverse engineering resilience
171├── Root/jailbreak detection
172├── Debugger detection
173├── Code obfuscation (ProGuard/R8 for Android)
174└── Integrity verification
175```
176
177## Verification
178
179- [ ] Static analysis complete (secrets, misconfigurations, permissions)
180- [ ] Dynamic analysis complete (data storage, network, crypto)
181- [ ] Certificate pinning tested and bypass documented
182- [ ] OWASP MASVS categories assessed
183- [ ] API traffic intercepted and tested for vulnerabilities
184- [ ] Root/jailbreak detection evaluated
185- [ ] Sensitive data not stored in plaintext on device