$npx -y skills add zhaoxuya520/reverse-skill --skill competition-android-hookingInternal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for Android APK hooking, Frida tracing, request-signing recovery, SSL pinning bypass, JNI boundary inspection, and app trust-boundary analysis. Use when the user asks to hook an APK, inspect signer logic
| 1 | # Competition Android Hooking |
| 2 | |
| 3 | Use this skill only as a downstream specialization after `$ctf-sandbox-orchestrator` is already active and has established sandbox assumptions, node ownership, and evidence priorities. If that has not happened yet, return to `$ctf-sandbox-orchestrator` first. |
| 4 | |
| 5 | Use this skill when the decisive path runs through an Android app's live trust boundary rather than static strings alone. |
| 6 | |
| 7 | Reply in Simplified Chinese unless the user explicitly requests English. |
| 8 | |
| 9 | ## Quick Start |
| 10 | |
| 11 | 1. Preserve the original APK, extracted resources, and decompiled output before patching or resigning. |
| 12 | 2. Start with manifest, exported components, deeplinks, native libs, prefs, local DBs, and bundled configs. |
| 13 | 3. Decide the narrowest runtime boundary to hook: signer, crypto helper, JNI bridge, WebView bridge, or request builder. |
| 14 | 4. Correlate static evidence and dynamic traces before claiming a trust edge is understood. |
| 15 | 5. Reproduce the signed request, accepted token, or gated branch from the smallest hook set. |
| 16 | |
| 17 | ## Workflow |
| 18 | |
| 19 | ### 1. Static Triage Before Hooks |
| 20 | |
| 21 | - Map package structure, exported activities, services, receivers, providers, and deeplink handlers. |
| 22 | - Note SSL pinning logic, root checks, feature flags, token storage, shared prefs, SQLite tables, and protobuf or RPC boundaries. |
| 23 | - Identify whether the sensitive logic sits in Java, Kotlin, JNI, or a bundled WebView. |
| 24 | |
| 25 | ### 2. Hook The Narrowest Boundary |
| 26 | |
| 27 | - Prefer hooking request signers, crypto helpers, keystore access, protobuf encode or decode, or JNI marshaling instead of broad UI hooks. |
| 28 | - Record plaintext inputs, signed strings, headers, nonces, and outputs at the boundary that actually changes trust. |
| 29 | - If pinning or environment checks block progress, patch or hook only enough to expose the real request path. |
| 30 | |
| 31 | ### 3. Replay The Accepted Path |
| 32 | |
| 33 | - Rebuild the smallest sequence that reaches the accepted server-side branch: local state, nonce, request body, signature, and headers. |
| 34 | - Keep hook logs, captured request shapes, and local storage paths tied to the same account or session state. |
| 35 | - If the challenge becomes more about transform recovery than Android runtime, switch back to the broader crypto or mobile skill. |
| 36 | |
| 37 | ## Read This Reference |
| 38 | |
| 39 | - Load `references/android-hooking.md` for hook targets, storage checklist, and evidence packaging. |
| 40 | |
| 41 | ## What To Preserve |
| 42 | |
| 43 | - Hook points, class names, JNI symbols, signer inputs and outputs, and header names |
| 44 | - Shared prefs, local DB rows, deeplinks, exported components, and token storage paths |
| 45 | - The smallest replayable request or branch that proves the trust boundary |