Hunt Spa Api logo

Hunt Spa Api

CommunityPopular
elementalsouls
hunt-spa-api

Discover a single-page-app's hidden backend API from its public JS bundle, then test that API for broken access control / missing authentication. One of the highest-yield web plays in modern recon — SPAs ship their entire backend route map to the browser, and the API behind them is frequently missing the auth middleware the login page implies. Built from an authorized engagement where this play found an unauthenticated financial API that an ASM scan reporting hundreds of "Criticals" completely missed. Use whenever a target serves a JS-heavy SPA (React/Vue/Angular/Next), an "app"/"console"/"dashboard"/"portal" subdomain, or any `*api*` host shows up in recon. Leaked build artifacts (source maps / .env / .git / asset-manifest) are owned by hunt-source-leak; API version-inventory and behavioral diffing by hunt-shadow-api; this skill owns mapping a live SPA's backend routes from its JS bundle and testing them for broken access control / missing auth.

Overview

Publisherelementalsouls
RepositoryClaude-BugHunter
Skill namehunt-spa-api
Stars
4.5K
Forks
678
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by elementalsouls on GitHub. Read the source before you install it.

Installation

Install the Hunt Spa Api AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/elementalsouls/Claude-BugHunter.git /tmp/Claude-BugHunter
mkdir -p .claude/skills
cp -r /tmp/Claude-BugHunter/skills/hunt-spa-api .claude/skills/hunt-spa-api
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hunt Spa Api in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hunt Spa Api on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hunt Spa Api is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

When to use this skill

Trigger when:

  • A target host returns a tiny HTML shell + big /static/js/*.js or /_next/static/* bundles (React/Vue/Angular/Next/Svelte SPA)
  • You see a subdomain named console, app, dashboard, portal, admin, panel, manage, internal
  • Recon surfaces any *api*, *-api*, api.* host
  • A login page is OAuth/SSO-gated (the frontend auth tells you nothing about whether the API enforces auth)

The core insight: a SPA is a client to a backend API, and it ships the full map of that API — hosts, routes, sometimes keys — to anyone who views source. The login page being protected says nothing about whether the API behind it checks tokens. Auth is frequently enforced on the gateway/login and missing on a route group of the API.

DO NOT skip this because "the app needs login" — that's exactly when this pays off.


The play (5 steps)

1. Pull the shell + enumerate the bundles

bash
curl -s https://console.target.com/ -o index.html
# React/CRA:
grep -oE '/static/js/[^"]+\.js' index.html
# Next.js:
grep -oE '/_next/static/[^"]+\.js' index.html
# generic:
grep -oiE 'src="[^"]+\.js[^"]*"' index.html

Download every bundle (they can be multi-MB — that's fine, it's all route data):

bash
mkdir bundles
for j in $(grep -oE '/static/js/[^"]+\.js' index.html | sort -u); do
  curl -s "https://console.target.com$j" -o "bundles/$(echo "$j"|tr '/' '_')"
done

2. Harvest API hosts, routes, and secrets from the bundles

bash
B=bundles/*.js
# Backend API hosts (incl. dev/beta/staging variants — often weaker auth)
grep -ohiE 'https://[a-z0-9.-]*(api|console|backend|service)[a-z0-9.-]*\.target\.com[a-z0-9/_-]*' $B | sort -u
# Versioned API base paths
grep -ohiE '/api/v[0-9]+/?' $B | sort -u
# Route literals — minified bundles store routes as STRING segments, not full URLs.
# Grep for quoted "resource/action" strings:
grep -ohiE '"[a-z0-9_-]+/[a-z0-9_/-]+"' $B | tr -d '"' \
  | grep -iE '(login|user|account|order|billing|invoice|payment|deal|report|token|otp|password|reset|admin|profile|auth|upload|export|role|permission|dashboard|wallet|finance|sales)' | sort -u
# Secrets (validate before trusting — most AIza keys are Maps/analytics, not Auth)
grep -ohiE '(AIza[0-9A-Za-z_-]{35}|AKIA[0-9A-Z]{16}|sk_live_[0-9A-Za-z]+|eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}|apiKey["'"'"']?\s*[:=]\s*["'"'"'][^"'"'"']+)' $B | sort -u

Note: minifiers store routes as concatenated string segments (e.g. "account/payment/list"), NOT full /api/v2/... URLs — so a naive /api/v* grep returns nothing. Grep for the resource-word route strings and prepend the base yourself.

Lazy-loaded (async) chunks — don't stop at HTML-referenced bundles. CRA/webpack SPAs reference only runtime+main+vendor in index.html; numbered async route chunks are named inside main.js's chunk map and loaded at runtime, so grepping only /static/js/*.js from the shell truncates route coverage to eager chunks.

bash
grep -oE '[0-9]+:"[a-f0-9]+"' bundles/*main*.js        # {chunkId:"hash"} pairs
# reconstruct /static/js/<id>.<hash>.chunk.js, download each, re-run route/host/secret harvest
# asset-manifest.json (if present) lists them all -> hunt-source-leak

3. Establish a CONTROL — find an endpoint that IS gated

Before declaring anything vulnerable, send an unauthenticated request to an endpoint you expect to be protected, and capture what correct rejection looks like:

bash
curl -s -X POST https://api.target.com/api/users -H 'Content-Type: application/json' -d '{}'
# secure → {"error":"Missing or invalid authorization header"} or HTTP 401

This is your differential. A sibling API (e.g. a second API host, or a different route group on the same host) is the ideal control — same stack, so a different response = real authz gap, not a quirk.

4. Test each route family UNAUTHENTICATED, both methods

For every discovered route, send it with no Authorization header and compare to the control:

bash
for r in <routes>; do
  curl -s -o /tmp/r -w "[%{http_code}] $r\n" -X POST -H 'Content-Type: application/json' -d '{}' "https://api.target.com/api/v2/$r"
done

Interpret:

  • 401/"Missing authorization" → gated (correct). Move on.
  • 200 with data → unauthenticated data exposure. Finding.
  • 400 "field X is mandatory" → the route processed your request and reached business-logic validation without an auth check → auth bypass; supply the field minimally to confirm.
  • 200 + verbose DB/stack error (e.g. PROCEDURE db_x.sp_y does not exist) → reached the data layer unauthenticated; also a SQLi-surface signal.
  • Mandatory fields named like is_admin / is_internal / requested_by / role_id / account_typeauthorization derived from client-supplied parameters — set the privilege flag and you self-elevate. Critical-class.

5. Pivot & prove (minimally)

  • IDs returned by one endpoint (account_id, order_id, deal_id) are the keys the other endpoints consume — they prove the whole router is reachable, not just one route.
  • Test dev-/beta-/staging- API variants — they frequently have weaker/disabled auth.
  • Check the response headers: Access-Control-Allow-Origin: * compounds the issue (any web origin reads it from a victim's browser).
  • STOP at minimum-necessary proof. A handful of records (or a totalCount) confirms the missing check. Do NOT enumerate the table — see redteam-mindset data-minimization boundary. The finding is the absent auth, not the data volume.

What "the API behind the SSO login" really means

A common, dangerous architecture:

  • console.target.com (the SPA) → login is Entra/Okta/Google OAuth (looks airtight).
  • api.target.com (the backend) → some route groups enforce the bearer token, some route groups forgot the middleware.

The frontend login is theatre if the API doesn't independently validate the token on every route. Always test the API directly, bare, regardless of how locked-down the login UI is.


Anti-patterns

  • "The app requires login, so the API must be protected." No — test the API directly, unauthenticated. The whole point.
  • "Minified bundle, can't read it." You don't need to read it — grep it for hosts/routes/secrets. 5 minutes.
  • "/api/v1/foo returned 404, so no API here." Wrong base or wrong method. Try /api/, /api/v2/, POST not GET, and the exact route strings from the bundle (Express's 404 echoes the path — use it to calibrate).
  • "AIza key found → critical secret." Validate first — most are Maps/analytics keys (CONFIGURATION_NOT_FOUND on identitytoolkit = not Auth-enabled). Don't over-claim.
  • Dumping the whole dataset once you get a 200. Stop at PoC. (redteam-mindset.)
  • Account-creation / write endpoints as "proof". Read endpoints prove the auth gap without creating state. Never POST a create/signup/upload to "demonstrate" — that's a destructive write needing explicit per-action authorization.

Related Skills & Chains

  • hunt-api-misconfig — once the API is mapped, run the broader misconfig matrix (method tampering, mass assignment, JWT alg confusion) per route.
  • hunt-idor — the account_id/order_id pivots feed straight into IDOR testing across discovered routes.
  • hunt-source-leak — sourcemaps (*.js.map) reconstruct original source for deeper route/secret extraction; same harvesting muscle.
  • hunt-nextjs — for Next.js targets, layer the middleware-bypass (x-middleware-subrequest) and /_next/data route tests on top of this.
  • redteam-mindset — the data-minimization boundary governs step 5: prove the missing check, don't exfiltrate the table.
  • recon-scope-triage — verify the API host actually belongs to the target before testing (don't pop a same-named third party's API).

Frequently asked questions

What does the Hunt Spa Api AI skill do?

Discover a single-page-app's hidden backend API from its public JS bundle, then test that API for broken access control / missing authentication. One of the highest-yield web plays in modern recon — SPAs ship their entire backend route map to the browser, and the API behind them is frequently missing the auth middleware the login page implies. Built from an authorized engagement where this play found an unauthenticated financial API that an ASM scan reporting hundreds of "Criticals" completely missed. Use whenever a target serves a JS-heavy SPA (React/Vue/Angular/Next), an "app"/"console"/"...

Why use Hunt Spa Api on TypingMind?

Because you install it once and use it with any model. Hunt Spa Api is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hunt Spa Api in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/elementalsouls/Claude-BugHunter/tree/main/skills/hunt-spa-api. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Hunt Spa Api?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hunt Spa Api?

As many as you like. As long as a model supports skills, you can use Hunt Spa Api with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hunt Spa Api AI skill free?

Yes. It is published on GitHub by elementalsouls under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇