--- name: android-backend-api-testing description: "Test the mobile backend API once traffic is visible — broken auth, weak/stateless JWT, IDOR/BOLA, missing authorization, injection, GraphQL introspection, rate-limiting, and OAuth/PKCE flaws. Tier 1. Use after pinning bypass exposes the API; this is where the highest-severity findings live. Aligns to OWASP MASTG MASVS-NETWORK/AUTH. Payloads: payloads/auth-jwt.md, INJECTION-POINTS.md." --- # Android Backend / API Testing The mobile backend is a full API and usually the highest-impact target. Once traffic is visible, test it like any web/API target. ## Trigger phrases `mobile backend, mobile api, api testing, bola, idor api, jwt mobile, graphql introspection, oauth pkce, broken authorization, mobile endpoint` ## Method 1. **Capture the full API surface** through the proxy (after `android-network-cleartext-tls` + `android-ssl-pinning-bypass`): enumerate every endpoint, header, token, and parameter (see `${CLAUDE_PLUGIN_ROOT}/payloads/INJECTION-POINTS.md`). 2. **Broken object-level authz (IDOR/BOLA):** swap object IDs across all verbs with ≥2 accounts → chain to `idor`. 3. **Auth & session:** weak/stateless JWT validation (`alg:none`, weak secret, unchecked `aud`/`iss`/`exp`) → `jwt`; session fixation; token lifetime/rotation; replay. 4. **Missing/function-level authz (BFLA):** reach admin/privileged endpoints as a low-priv user → `access-control`. 5. **Injection:** SQLi/NoSQL/command/SSRF in API params and JSON keys (`${CLAUDE_PLUGIN_ROOT}/payloads/`) → `sqli`/`nosql-injection`/`command-injection`/`ssrf`. 6. **GraphQL:** introspection enabled, field-level authz, batching abuse → `graphql`. 7. **OAuth:** PKCE presence, redirect-URI allowlist, code/token leakage (correlate with deep-link token theft, `android-deeplink-applink-abuse`) → `oauth`. 8. **Rate-limiting / mass-assignment** on sensitive actions → `rate-limiting`/`mass-assignment`. ## Modern / rare techniques - **Legacy/weaker mobile endpoints:** apps often expose older API versions with fewer checks than the web app — enumerate `/v1`, `/mobile`, `/internal` paths. - **Client-trusted fields:** mobile APIs frequently trust client-sent role/price/flags → mass-assignment / business-logic abuse (`business-logic`). - **Correlate client-side leaks with server acceptance:** a token leaked via deep link/logcat is only a finding if the server accepts it — prove the round trip. ## Bypass / evasion Reuse the app's real tokens/headers/User-Agent from captured traffic so WAF/device-binding checks pass; see `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md` for filtered injection. ## Escalation / chaining Cross-account access, forged tokens, privileged endpoints → account takeover, data breach, privilege escalation (usually the report's top findings). Chains to the full web/API skill set (`api-security`, `idor`, `jwt`, `access-control`, `sqli`, `graphql`, `oauth`). ## Backend & tooling Preferred Kali path (native Kali / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike). Needs the user's device/emulator for live traffic + Burp/mitmproxy (Repeater/Intruder); route through Burp if a Burp MCP is present and send manual PoCs to Repeater. Windows-local last resort. See `zazy-orchestrator`. ## Verification (background, before reporting) Re-confirm every candidate independently — second account/session, replay, or OAST (Collaborator/interactsh) for blind cases — and reproduce before marking CONFIRMED. Report true positives only. ## Evidence The request/response proving the flaw (two-session IDOR, forged token accepted, injection output, reachable privileged endpoint), the affected asset, and impact. Remediation: server-side authz on every request; strong token validation/rotation; object- and function-level checks; PKCE + strict redirect allowlists.