android-apk-recon-static
Android APK acquisition and static recon — pull/merge split APKs, decompile with apktool/jadx/dex2jar, detect packers/obfuscators with apkid, and map the attack surface (entry points, dangerous APIs). Tier 1. Prerequisite for all other Android static work. Use at the start of any APK engagement. Aligns to OWASP MASTG.
AnandJogawade · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill android-apk-recon-static技能说明
name: android-apk-recon-static description: Android APK acquisition and static recon — pull/merge split APKs, decompile with apktool/jadx/dex2jar, detect packers/obfuscators with apkid, and map the attack surface (entry points, dangerous APIs). Tier 1. Prerequisite for all other Android static work. Use at the start of any APK engagement. Aligns to OWASP MASTG.
Android APK Recon & Static Analysis
Acquire the APK (merging splits), decompile it, and map the code so later skills know where to look. First step of every Android test.
Trigger phrases
apk, pull apk, split apk, apkeditor, apktool, jadx, dex2jar, apkid, decompile, smali, android static analysis, mobsf baseline
Method
- Locate & pull the package:
adb shell pm list packages | grep <keyword>adb shell pm path <package>— lists base + split paths.adb pull /data/app/.../base.apk ./
- Merge split/App-Bundle APKs (standalone base often won't install / misses resources):
adb shell pm path <package> | cut -d ':' -f 1 | xargs -n1 -I{} adb pull {} splits/java -jar APKEditor.jar m -i splits/ -o merged.apkjava -jar uber-apk-signer.jar -a merged.apk --allowResign -o merged_signed
- Baseline with MobSF (automated static) for a fast overview, then go manual.
- Decompile:
apktool d app.apk -o app_src— smali + decoded manifest + resources.jadx -d app_java app.apk(orjadx-gui app.apkinteractive) — Java.d2j-dex2jar app.apk -o app.jar && jd-gui app.jar— alternate Java path when jadx fails.
- Fingerprint packing/obfuscation:
apkid app.apk— flags packers, obfuscators, anti-VM/anti-debug (dictates whether you needandroid-native-lib-analysis/android-root-antidebug-bypass). - Map the attack surface — grep decompiled code for entry points and dangerous APIs:
grep -rniE "Runtime.exec|ProcessBuilder|loadUrl|addJavascriptInterface|openFileOutput|getExternalStorage|WebView" app_java/- Note Activities/Services/Receivers/Providers, crypto, network, and auth logic for the specialized skills.
- Repackage (after smali edits for later tests):
apktool b app_src -o patched.apk && java -jar uber-apk-signer.jar -a patched.apk --allowResign.
Modern / rare techniques
- In-memory decrypt of packed/encrypted DEX with Frida when
apkidflags a packer — dump the real classes at runtime instead of fighting the unpacker statically. - Merged-bundle gotcha: a single
base.apkthat fails to install standalone, or missing resources in jadx, means a split bundle — always merge before concluding "no resources."
Escalation / chaining
Feeds every other Android skill: manifest → android-manifest-analysis; strings/keys → android-secrets-hardcoded; .so → android-native-lib-analysis; obfuscation/anti-tamper → android-root-antidebug-bypass.
Backend & tooling
Preferred Kali path (native Kali / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike). These need the user's device/emulator (adb) + Kali tooling (apktool/jadx/dex2jar/apkid/MobSF/APKEditor). Windows-local last resort. See zazy-orchestrator.
Verification (background, before reporting)
Confirm the decompile is complete (resources + all DEX present after merge) before basing findings on it; re-decompile with a second tool (dex2jar/JD-GUI) if jadx output looks truncated or obfuscated.
Evidence
Package name, APK hash(es), apkid output, decompiled tree, and a surface map (components, dangerous API call sites) to drive the rest of the engagement. Remediation: R8/ProGuard, move secrets/logic server-side or to NDK, integrity checks.