Langsung ke konten
Skillpedia
API & server (backend)48k Β· #4902

hunt-spa-api

Fungsinya

Tool ini membantu menemukan 'bahasa rahasia' (API) yang digunakan sebuah website untuk berkomunikasi dengan servernya. Tool ini mencarinya di dalam file-file website, lalu memeriksa adanya celah keamanan, seperti akses tanpa izin.

Kapan dipakai

  • βœ“Saat sebuah website terlihat seperti single page dan memuat banyak file kode.
  • βœ“Saat Anda melihat nama domain seperti 'admin', 'console', atau 'api'.
  • βœ“Saat halaman login menggunakan sistem seperti Google atau Facebook untuk proses masuk.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-spa-api/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-spa-api/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTemukan API untuk example.com dan periksa celah keamanannya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool ini mengunduh file-file kode website, mencari alamat dan perintah API yang tersembunyi di dalamnya, lalu mencoba mengakses perintah tersebut tanpa izin untuk melihat apakah situs sudah diamankan dengan baik.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

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

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):

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

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.

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:

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

…
Pertanyaan umum

Mengapa saya perlu melakukan ini?

Untuk memahami cara kerja internal sebuah website dan menemukan kelemahan keamanan yang bisa dimanfaatkan oleh pihak yang berniat jahat.

Apakah saya perlu izin untuk menggunakan tool ini?

Ya, sangat penting untuk memiliki izin tertulis yang jelas dari pemilik sistem sebelum menggunakan tool ini pada website apa pun. Penggunaan tanpa izin adalah tindakan ilegal.

Apa itu API?

API itu seperti pelayan di restoran. Anda (website) meminta sesuatu (data atau tindakan), lalu API (pelayan) membawa permintaan Anda ke dapur (server) dan mengantarkan jawabannya kembali kepada Anda.

Detail

Deskripsi asli dari pembuat

Discover a single-page-app's hidden backend API from its public JS bundle, then test that API for broken access control / missing authentication.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4902
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa