Black-Box Web Audit Without Credentials
Class workflow for authorized audits where you have NO test account (operator-requested or VDP scope). Complements the manually-authored bb-methodology (5-phase workflow) and bug-bounty-reporting-workflow (validation standard) — load those too; this skill adds the no-credentials specifics they lack.
Hard Constraints (non-destructive discipline)
- GET-only on anything state-changing-adjacent. Shutdown/reset/redeem endpoints: probe with GET even if the app uses POST; NEVER send the real state-changing verb on production (a
POST /api/version/shutdownwas deliberately never sent). - Fake IDs for write-path probes. Create-order/payment endpoints tested only with nonexistent UUIDs; expect-and-document 401.
- Credentials are always fake for rate-limit/login tests. A quarantine of your own IP after 429 is evidence the control works — record it as such.
- Embedded keys found in bundles get tested live against their real API before any claim (Firebase:
identitytoolkit.googleapis.com/v1/accounts:createAuthUri?key=→ 400 "API key not valid" = revoked, informational only).
Attack Surface When You Have No Account
Subfinder/gau often return near-zero on these targets. The bundle IS the map:
- Download all
/_next/static/chunks/*.js(or equivalent SPA bundles) to disk; nevercatminified files — grep them. - Extract endpoint inventory (regex
/api/[a-z0-9/_-]+, quoted AND backtick strings) → typically 50–100 endpoints from a ~1MB bundle. - Probe each with GET, no auth. Verify content-type on EVERY probe: Next.js/SPA backends answer unknown
/api/*paths with HTTP 200text/html(index fallback). Onlyapplication/jsoncounts; HTML fallback ≠ open endpoint. This one check kills most false-positive "exposure" claims. - Mine JS for: hardcoded config (
authMode, OIDC labels), sandbox/test features shipped to prod (simulate-payment, debug flags), embedded keys/client IDs. - Rate-limit test: N sequential bad logins to
POST /api/auth/login→ document lockout window (retryAfter) as a verified control.
Unauth-IDOR Round (no second account needed)
Real IDs from ANY public leak make a meaningful object-access pass possible:
- Harvest real object UUIDs from public catalog/listing endpoints (e.g.
/api/voucher-groupsleaking full catalog incl. hidden items). - Replay GET-only against every ID-bearing variant: direct path
/api/x/{id}, query forms?xId=/?x_id=, sibling objects (orders,vouchers,user), admin-ish resources. - Controls are mandatory: same request with fake/nonexistent ID (expect 404) proves the route resolves IDs; valid-ID-no-auth returning uniform 401 proves auth gating. 200-valid/404-fake differential on a gated endpoint = protection working, NOT IDOR.
- Write the negative matrix into the report (probe → status → verdict table in SUMMARY.md). Confirmed-no-IDOR with evidence demonstrates coverage; silence demonstrates nothing.
- If a per-ID detail endpoint IS open (by design), fold it into the parent disclosure finding rather than inventing an IDOR claim.
Complementary Negatives (run all, ~5 min)
- Parameter reflection: unique 8+ char canary through query params on main pages; count occurrences (0 expected on well-built SPAs).
- Open redirect:
?next=https://evil.com/?redirect=— check Location header; fixed internal redirect = safe. - Injection probes on path params (
',OR 1=1, traversal): expect uniform 404/400 (parameterized); varied error bodies = investigate. - CORS: send foreign origins +
null; no reflection = clean (severity tiers live inbug-bounty-reporting-workflow). - dalfox single-pass on parameterized pages for a scanner second-opinion.
Environment Pitfalls
- Cloudflare blocks default
python-urllibUA with 403 while curl/browser UA passes. Every urllib/requests-based PoC MUST set a browser User-Agent or it fails where your curl probes succeeded. - No
dig/host/nslookupon many boxes → DNS-over-HTTPS via curl (https://dns.google/resolve?name=X&type=A). - crt.sh intermittently returns malformed short responses → fall back to JS mining for subdomain/endpoint hints.
- Missing binaries are setup issues, not findings — note once, work around, move on.
Report Delivery (user preferences — hard rules)
- NEVER ship a zip archive. User explicitly rejected it ("kenapa bentuknya zip"). Plain individual files, ONE canonical location only.
- Before creating the report folder, look for a sibling example target and copy its structure exactly (e.g.
/workspace/reports/<previous-target>/). Canonical observed shape:SUMMARY.md— emoji severity matrix (Severity | Title | CVSS | CWE | Endpoint | Link), PoC list, evidence list, verified-working-controls table, priority recommendations.metadata.json—{target, scan_time, total_findings, severity_summary{CRITICAL..INFORMATIONAL}, findings[{file_name,title,severity,cvss,cwe,endpoint,last_modified}], pocs[], evidence_files[]}.findings/[SEVERITY]_slug.md— Target/Severity/CVSS/CWE/Status header, raw request/response blocks, impact, verified-negatives, remediation.pocs/*.py,evidence/*.
- Report language = whatever the CURRENT engagement specifies (this user alternates: English ("berbahasa inggris") and Bahasa Indonesia). Ask once if unspecified; never inherit the last session's choice.
- Execute every delivered PoC end-to-end before shipping. Both bugs found in the initial PoC (truncated-body slice breaking json.loads; leftover experimental line) surfaced only on first run.
References
references/nextjs-gateway-case-study.md— worked example: hardened Next.js+Cloudflare AI gateway, 71-endpoint JS-mined surface, unauth-IDOR round with negative matrix, 1 Low + 5 Info outcome.
