Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: mobile-security description: "Mobile application security reconnaissance — APK/IPA analysis, permission enumeration, certificate validation, hardcoded secret detection, insecure storage identification, network security analysis." allowed-tools: Bash Read Write metadata: subdomain: reconnaissance when_to_use: "mobile security, APK analysis, IPA analysis, Android manifest, iOS Info.plist, certificate validation, hardcoded secrets, insecure storage, network security config, WebView security" tags: mobile, android, ios, apk, ipa, reverse-engineering, static-analysis, certificate-validation, secret-detection mitre_attack: T1589.001, T1589.002
Mobile Application Security Reconnaissance Knowledge Base
Mobile application security reconnaissance involves static analysis of APK and IPA files to identify vulnerabilities, misconfigurations, and security weaknesses without executing the application. This skill enables autonomous agents to analyze mobile applications for security issues.
1. APK Analysis
Package Information Extraction
# Extract APK package informationaapt dump badging {apk_path}# Extract full APK detailsaapt dump all {apk_path}
Decompilation
# Decompile APK with apktoolapktool d {apk_path} -o output_dir# Decompile with jadx (to Java source)jadx {apk_path} -d output_dir# Convert DEX to JAR for Java analysisdex2jar {apk_path} -o output.jar
Resource Extraction
# Extract resources from APKunzip -l {apk_path}unzip -d output_dir {apk_path}# View AndroidManifest.xmlaapt dump xmltree {apk_path} AndroidManifest.xml
2. iOS IPA Analysis
Package Information
# Extract IPA metadataunzip -l {ipa_path}# View Info.plistplutil -p {ipa_path}/Payload/*.app/Info.plist
Binary Analysis
# Extract binary informationotool -lv {binary_path}# View strings in binarystrings {binary_path}# Check entitlementsjtool --ent {ipa_path}/Payload/*.app/embedded.mobileprovision
3. Certificate and Signature Validation
Android
# View certificate informationkeytool -printcert -jarfile {apk_path}# Verify APK signaturejarsigner -verify -verbose -certs {apk_path}
iOS
# Check code signingcodesign -v --deep --strict {app_path}# View provisioning profilesecurity cms -D -i {embedded.mobileprovision_path}
4. Hardcoded Secret Detection
String Extraction
# Extract all strings from binarystrings {binary_path} > strings_output.txt# Search for API keys and secretsgrep -E "(API_KEY|api_key|SECRET|secret|PASSWORD|password|TOKEN|token)" strings_output.txt# Search for AWS credentialsgrep -E "(AKIA|ASIA)[0-9A-Z]{16,}" strings_output.txt
Common Secret Patterns
- AWS Access Keys:
AKIA...orASIA...(20 characters) - GitHub Tokens:
ghp_,gho_,ghu_,ghs_,ghr_ - Generic API Keys: Various formats depending on service
- Private Keys:
-----BEGIN PRIVATE KEY----- - JWT Tokens: Three base64-encoded parts separated by dots
5. Insecure Storage Identification
Android
# Check for SharedPreferences usagegrep -r "SharedPreferences" smali/ 2>/dev/null# Check for file-based storagegrep -r "FileOutputStream\|FileInputStream\|openFileOutput\|openFileInput" smali/ 2>/dev/null# Check for SQLite databasegrep -r "SQLiteDatabase\|SQLiteOpenHelper" smali/ 2>/dev/null
iOS
# Check for UserDefaultsstrings {binary_path} | grep -i "UserDefaults"# Check for Keychain usagestrings {binary_path} | grep -i "Keychain"# Check for plist storagefind {app_path} -name "*.plist" -type f
6. Network Security Configuration Analysis
Android
# Check for cleartext trafficgrep -r "android:usesCleartextTraffic" AndroidManifest.xml# Check for network security configcat app/src/main/res/xml/network_security_config.xml 2>/dev/null
iOS
# Check ATS (App Transport Security) settingsplutil -p {app_path}/Info.plist | grep -A 10 "NSAppTransportSecurity"
7. Third-Party Library Vulnerability Scanning
Library Identification
# List all JAR files in APKunzip -l {apk_path} | grep "\.jar$"# Check for known vulnerable librariesgrep -r "org.apache.commons\|com.google.gson\|com.fasterxml.jackson" smali/ 2>/dev/null
Version Checking
- Use OWASP Dependency-Check for vulnerability scanning
- Use mobsfscan for mobile-specific vulnerability detection
- Check CVE databases for known vulnerabilities
8. WebView Security Checks
Android
# Check for JavaScript enabledgrep -r "setJavaScriptEnabled(true)" smali/ 2>/dev/null# Check for DOM storage enabledgrep -r "setDomStorageEnabled(true)" smali/ 2>/dev/null# Check for addJavascriptInterfacegrep -r "addJavascriptInterface" smali/ 2>/dev/null
9. Deep Link Analysis
Android
# Check for intent filters in manifestgrep -A 5 "intent-filter" AndroidManifest.xml# Check for deep link schemesgrep -o '<data android:scheme="[^"]*"' AndroidManifest.xml
iOS
# Check for URL schemes in Info.plistplutil -p Info.plist | grep -A 5 "CFBundleURLTypes\|URL Schemes"
10. Mobile-Specific Security Checks
Android
- Check for
android:debuggable="true"in manifest - Check for
android:allowBackup="true" - Check for exported components (activities, services, receivers, providers)
- Check for insufficient permissions on content providers
iOS
- Check for jailbreak detection bypass
- Check for debug mode enabled
- Check for iTunes backup prevention
- Check for sensitive data in logs
Tools Summary
| Tool | Purpose | Required | |
|---|---|---|---|
apktool | APK decompilation and resource extraction | ✅ | |
dex2jar | DEX to JAR conversion for Java analysis | ✅ | |
jadx | APK decompilation to Java source | ✅ | |
aapt | Android Asset Packaging Tool | ✅ | |
keytool | Keystore and certificate analysis | ✅ | |
jarsigner | JAR signature verification | ✅ | |
strings | Binary string extraction | ✅ | |
grep | Pattern matching | ✅ | |
openssl | Cryptographic operations | ✅ | |
yara | Pattern matching for malware detection | ❌ | |
mobsf | Mobile Security Framework | ❌ | |
frida | Dynamic instrumentation | ❌ | |
objection | Runtime mobile exploration | ❌ |