hunt-spa-api
하는 일
이 도구는 웹사이트가 서버와 통신할 때 사용하는 '비밀 언어'(API)를 찾도록 돕습니다. 이를 웹사이트의 파일에서 찾고, 무단 접근 같은 보안 결함이 있는지 확인합니다.
사용하는 경우
- ✓웹사이트가 단일 페이지처럼 보이고 많은 코드 파일을 불러올 때.
- ✓'admin', 'console', 'api' 같은 도메인 이름이 보일 때.
- ✓로그인 페이지가 Google이나 Facebook 같은 시스템으로 로그인하는 방식을 사용할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-spa-api/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“example.com의 API를 찾고 보안 취약점을 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 웹사이트의 코드 파일을 내려받고, 그 안에서 숨겨진 API 주소와 명령을 찾습니다. 그다음 허가 없이 이 명령에 접근해 보며 사이트가 제대로 보호되는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- 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/*.jsor/_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
…
자주 묻는 질문
왜 이런 일을 하나요?
웹사이트가 내부적으로 어떻게 작동하는지 이해하고, 악의적인 행위자가 악용할 수 있는 잠재적 보안 약점을 찾기 위해서입니다.
이 도구를 사용하려면 허가가 필요한가요?
네, 어떤 웹사이트에서든 이 도구를 사용하기 전에 시스템 소유자의 명시적이고 서면으로 된 허가가 반드시 필요합니다. 무단 사용은 불법입니다.
API란 무엇인가요?
API는 레스토랑의 웨이터와 같습니다. 여러분(웹사이트)이 무언가(데이터나 작업)를 요청하면, 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.
인기도
- GitHub 스타
- 48k
- 순위
- #4902
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.