offensive-techniques/mobile-technique/SKILL.md
Auth assessment: mobile app security; Android/iOS static, storage, Frida/runtime, traffic, pinning, platform, API and crypto checks.
npx skillsauth add aeondave/malskill mobile-techniqueInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Goal: systematically identify security weaknesses in Android and iOS applications following OWASP MASTG/MASVS.
mobile-ctf (faster, CTF-specific patterns including .ab, Unity/IL2CPP, asset stego).web-exploit-technique: API-level findings from mobile app traffic.reversing-technique for obfuscated native libraries and IL2CPP binaries.offensive-tools/rev/jadx/, offensive-tools/rev/apktool/, offensive-tools/rev/dex2jar/, offensive-tools/rev/androguard/, offensive-tools/rev/frida/.Before decompiling or hooking broadly, classify the app, the platform, and the control family most likely to fail first.
jadx, apktool, androguard, dex2jar) first for structure and secrets, then instrumentation (frida) and proxy skills after you know what runtime behavior must be observed or bypassed.Per mobile application:
1. Static analysis — decompile, inspect manifest, search secrets.
2. Dynamic analysis — instrument with Frida, bypass SSL pinning.
3. Traffic interception — proxy through Burp/mitmproxy.
4. Storage analysis — inspect SharedPreferences, SQLite, KeyStore.
5. Authentication testing — test local auth, biometrics, session handling.
6. API testing — apply web-exploit-technique to backend APIs.
# Quick win: strings on the raw APK first (zip container: unzip -p for embedded files)
strings target.apk | grep -iE "api[_-]?key|secret|password|token|bearer|firebaseio\.com|s3\.amazonaws"
# Decompile
jadx -d output_dir target.apk
apktool d target.apk -o output_dir # smali + decoded manifest + resources
# Manifest analysis: exported components, debuggable, allowBackup, permissions
aapt2 dump badging target.apk # aapt is deprecated; aapt2 in modern SDK build-tools
# Hardcoded crypto (SecretKeySpec, Cipher.getInstance — common leak point)
grep -r "SecretKeySpec\|Cipher\|AES\|DES\|encrypt\|decrypt\|base64" output_dir/ | grep -v "^Binary"
# Look for the hardcoded key argument passed to SecretKeySpec(key, "AES")
# Firebase and remote config leaks
cat output_dir/res/values/google-services.json 2>/dev/null
cat output_dir/assets/google-services.json 2>/dev/null
# Certificate analysis
apksigner verify --print-certs target.apk
# Asset inspection (images, data files bundled with APK)
find output_dir/assets/ -type f | xargs file
# Large images → potential steganography (zsteg, steghide, visual inspection)
# Frida — SSL pinning bypass (spawn+resume is default since frida-tools 12+; do not pass --no-pause)
frida -U -f com.target.app -l ssl_pinning_bypass.js
# Objection — rapid assessment
objection -g com.target.app explore
# android sslpinning disable # OkHttp3, TrustManagerImpl, SSLContext, Conscrypt, etc.
# android root disable
# android hooking list activities
# Drozer (community fork WithSecureLabs/drozer) — exposed components
dz> run app.package.attacksurface com.target.app
dz> run app.provider.query content://com.target.app.provider/
adb shell cat /data/data/com.target.app/shared_prefs/*.xml
adb pull /data/data/com.target.app/databases/
adb shell ls /data/data/com.target.app/files/
.ab is a legacy channel. adb backup is restricted since Android 12 and requires android:debuggable=true for most apps; on Android 13+ most stock apps refuse it outright. Still useful for older/debuggable builds and forensic images.
# Header: "ANDROID BACKUP\n<ver>\n<compressed>\n<encryption>\n" (variable length — do NOT hardcode skip=)
python3 - <<'PY'
import zlib, pathlib
raw = pathlib.Path('backup.ab').read_bytes()
# Skip 4 newline-terminated header fields, then decompress the zlib stream that follows.
p = 0
for _ in range(4):
p = raw.index(b'\n', p) + 1
pathlib.Path('backup.tar').write_bytes(zlib.decompress(raw[p:]))
PY
tar xf backup.tar -C extracted/
# Triage extracted content
grep -rE "password|token|secret|api[_-]?key|bearer" extracted/ 2>/dev/null
find extracted/ -name "*.db" -exec sqlite3 {} ".tables" \; 2>/dev/null
Unity games compile C# to native ARM via IL2CPP. jadx shows only stubs — reverse libil2cpp.so with metadata.
# Verify IL2CPP
ls apk_unzip/lib/arm64-v8a/ # → libil2cpp.so, libmain.so, libunity.so
# Il2CppDumper: recovers full class/method/field names from binary + metadata
# https://github.com/Perfare/Il2CppDumper
# Input: libil2cpp.so + assets/global-metadata.dat
# Output: dump.cs (all C# stubs with offsets), script.py (Ghidra import)
grep -i "flag\|key\|secret\|password\|cheat\|unlock" dump.cs
strings libil2cpp.so | grep -i "flag{"
# Load into Ghidra with Il2CppDumper's script.py for guided reversing
frida-ios-dump, bagbak, or ipadecrypt. bfinject is dead (iOS 11 Electra-era); Needle is archived (Reversec Labs, May 2025) — do not use.ldid -e, codesign -d --entitlements :-.Info.plist for URL schemes, ATS exceptions, UIBackgroundModes, associated domains, and entitlements (keychain access groups, app groups).strings -a, rabin2 -zzz).frida -U -f com.target.app -l script.js (frida-tools spawns and auto-resumes; do not pass --no-pause).objection -g com.target.app explore — ios sslpinning disable, ios jailbreak disable, ios cookies get, ios ui dump.r2 frida://spawn/usb//com.target.app for interactive dump/hook without a separate Frida script.# Objection keychain dump
ios keychain dump
# NSUserDefaults
ios nsuserdefaults get
# SQLite databases
ls /var/mobile/Containers/Data/Application/<UUID>/Library/
| MASVS Category | Key tests | |----------------|-----------| | MASVS-STORAGE | SharedPreferences, SQLite, Keychain, logs, screenshots | | MASVS-CRYPTO | Hardcoded keys, weak algorithms, custom crypto | | MASVS-AUTH | Local auth, biometrics, session handling | | MASVS-NETWORK | SSL pinning, certificate validation, proxy detection | | MASVS-PLATFORM | Exported components, intent handling, WebView | | MASVS-CODE | Code tampering, debugging, root/jailbreak detection |
Android:
MEETS_DEVICE_INTEGRITY, MEETS_BASIC_INTEGRITY, MEETS_STRONG_INTEGRITY) are backed by hardware key attestation on Android 13+; Magisk zygisk-assistant / PlayIntegrityFix bypass basic, not strong.android:exported required on Android 12+ (targetSdk ≥ 31) for any activity/service/receiver with an <intent-filter>; missing attribute = install failure. Old "exported by intent-filter" implicit exports are gone — re-check attack surface.RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED to registerReceiver — grep for these flags to map dynamic IPC exposure.adb backup restricted since Android 12; requires android:debuggable=true. Most production apps yield an empty archive — pivot to root+tar of /data/data/<pkg>/ or Frida file dump.iOS:
bfinject/Needle era techniques apply.DCAppAttestService) binds requests to a Secure Enclave key; server rejects forged attestations even with a working Frida hook — always validate bypass end-to-end against the backend, not just on-device.SSL_CTX_set_custom_verify, SecTrustEvaluateWithError) when custom pinners are used.development
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.