Communitygithub.com

api-security

승인된 REST, GraphQL, WebSocket, SOAP API의 보안 평가에 사용됩니다. API 검색, 인증, 권한 부여, 속도 제한 및 CI/CD 테스트를 포함합니다.

api-security란 무엇인가요?

이 스킬은 REST, GraphQL, WebSocket, SOAP 등 다양한 API 프로토콜에 대한 포괄적인 보안 평가를 수행합니다. API 검색 및 정찰 단계부터 CI/CD 통합까지 10단계의 체계적인 방법론을 제공하여, 인증 우회, 권한 상승, BOLA/IDOR/BFLA, GraphQL 내부 정보 노출, 속도 제한 우회, 비즈니스 로직 결함 등 다양한 취약점을 탐지합니다. 이 스킬은 Burp Suite, Entropy, Vespasian, jwt_tool, FireTail 등 전문 도구를 활용하며, GraphQL, JWT, OAuth 2.0에 대한 특화된 테스트 시나리오를 포함합니다. 작업 완료 후에는 자체 점검 목록을 통해 모든 단계가 실행되었고, 재현 가능한 증거가 생성되었는지 확인해야 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/api-security

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

API 보안 테스트

ACTION REQUIRED (읽은 후 즉시 실행)

  1. NOW: ../field-journal/precedent-pentest.md 읽기 — 이 스킬의 작업이 승인된 일상적 작업인지 확인
  2. NOW: 현재 작업이 이 스킬의 적용 범위에 해당하는지 확인
  3. NEXT: ../tool-index.md 읽기, 도구 가용성 및 실제 경로 확인
  4. NEXT: 도구가 없으면 bootstrap 호출, 경로를 추측하지 않음
  5. ACT: "작업 흐름"의 첫 단계로 진입하여 실행, 확인 상태에 머물지 않음

REST / GraphQL / WebSocket / SOAP 전 프로토콜 커버 검색부터 CI/CD 통합까지 10단계 방법론

적용 시나리오

  • REST API 보안 테스트 (OpenAPI/Swagger 기반 또는 블라인드 테스트)
  • GraphQL 보안 감사 (내부 정보 조회, 배치 쿼리, 별칭 오버로드)
  • WebSocket 보안 테스트
  • JWT / OAuth 2.0 인증 테스트
  • BOLA/IDOR/BFLA 권한 취약점 탐지
  • API 속도 제한 우회 및 DoS 테스트

10단계 테스트 프로세스

Phase 1: API 검색 및 정찰

능동적 검색:
□ Vespasian: 헤드리스 브라우저 크롤링 → OpenAPI 3.0 / GraphQL SDL 스펙 자동 생성
□ Entropy --discover: robots.txt + JS 파일에서 엔드포인트 추출
□ Kiterunner / ffuf: 문서화되지 않은 엔드포인트 경로 무차별 대입
□ 일반 경로 확인: /swagger.json, /openapi.json, /graphql, /api-docs

GraphQL 내부 정보 조회 (3단계 시도):
  1. 표준 내부 정보 조회 쿼리
  2. 간소화된 쿼리 (WAF 완전 차단 우회)
  3. __schema { types { name } } 만 조회 (최소 탐지)

Phase 2: 인증 테스트

JWT 분석 (jwt_tool / Burp):
□ alg:none 공격: 헤더를 "alg":"none"으로 수정, 서명 제거
□ 키 혼동: RS256 공개 키 → HS256 대칭 키
□ 약한 HMAC 키 무차별 대입: jwt_tool -C -d wordlist.txt
□ 만료/클레임 변조: exp/iat/sub/role 클레임 수정
□ kid 주입: ../../etc/passwd → HMAC 서명 우회

OAuth 2.0:
□ redirect_uri 조작 → 인증 코드 유출
□ state 파라미터 누락으로 인한 CSRF
□ Referer 헤더를 통한 토큰 유출
□ PKCE 누락 감지

GraphQL 인증:
□ GET 요청을 통한 mutation 인증 우회 (CSRF)
□ 배치 쿼리 인증 우회

Phase 3: 권한 부여 테스트 (BOLA/IDOR/BFLA)

BOLA (객체 수준 권한 우회):
□ 숫자 ID 순회: /user/1 → /user/2 → /user/3
□ UUID 순회
□ 사용자 이름/이메일 순회
□ Burp Autorize: 이중 세션 재생 및 비교

BFLA (기능 수준 권한 우회):
□ 일반 사용자가 관리자 API 실행
□ HTTP 메서드 전환: GET → PUT → PATCH → DELETE
□ API 버전 다운그레이드: /v2/admin → /v1/admin
□ 일괄 작업 주입: {"users": [1,2,3]} → {"users": [1,2,3,admin_id]}

도구: Burp Autorize, AuthMatrix, Entropy (malicious_insider persona)

Phase 4: GraphQL 특화

내부 정보 조회 유출 → 정보 노출 탐지
별칭 오버로드 → 100개 이상의 별칭 DoS
배치 쿼리 → 10개 이상 동시 쿼리 DoS
필드 중복 → __typename × 500
지시문 오버로드 → 재귀적 @skip/@include
순환 쿼리 → 깊은 중첩 내부 정보 재귀
필드 제안 → 오류 메시지 정보 유출
GraphiQL/Playground 노출 → IDE 공개 위험
GET 변이 → CSRF 위험
추적/디버그 모드 → 메타데이터 유출

도구: FireTail, Escape DAST, api.sh (Phases 1-3)

Phase 5: REST 입력 유효성 검사

□ HTTP 메서드 전환: GET→POST→PUT→DELETE→OPTIONS→PATCH
□ Content-Type 변조: JSON→XML→multipart
□ NoSQL 주입: {"username": {"$gt": ""}}
□ URL 파라미터를 통한 SSRF: webhook URL/아바타 URL/가져오기 URL
□ XML 엔드포인트에서 XXE
□ 파라미터 오염: /api?role=user&role=admin
□ 일괄 할당: 요청 본문에 is_admin: true 추가

Phase 6: 비즈니스 로직 및 차이 테스트

□ Entropy compare: v1과 v2 API 비교 → 상태 코드 변경/필드 삭제/지연 회귀
□ 다중 역할 워크플로 테스트: admin/user/readonly 권한 매트릭스
□ 쿠폰/포인트/가격 조작
□ 경쟁 조건: TOCTOU 동시 요청 테스트

Phase 7: WebSocket 테스트

□ 엔드포인트 검색
□ 메시지 주입 (페이로드 주입, 프로토타입 오염)
□ 대용량 메시지 처리
□ 유형 혼동
□ 교차 사이트 WebSocket 하이재킹 (CSWH)

Phase 8: 속도 제한 및 DoS

□ 헤더를 통한 속도 제한 우회: X-Forwarded-For, X-Real-IP
□ 경로 변형: /api/ → /api → /Api/ → /API/
□ Slowloris 저대역폭 소진
□ GraphQL 배치 쿼리 깊은 중첩 DoS
□ IP 순환 테스트 (ProxyCat 프록시 풀)

Phase 9: 데이터 노출

□ 응답 과도 노출: API 반환값과 UI 표시 비교
□ 페이지네이션 열거: ?page=1&limit=10000
□ 오류 메시지 정보 유출: 스택 트레이스/내부 경로/SQL 오류
□ GraphQL 중첩 순회를 통한 권한 초과 데이터 접근
□ OpenAPI 스펙을 통한 민감한 엔드포인트 노출

Phase 10: CI/CD 통합

□ Entropy --ci --watch: 스펙 변경 시 자동 재실행
□ Escape DAST: 심각도 임계값에 따라 빌드 자동 차단
□ 발견된 내용을 회귀 테스트로 지속화
□ StackHawk (개발자 우선, ZAP 엔진 기반)

도구 체인

도구용도획득 방법
Vespasian트래픽 → OpenAPI/GraphQL 스펙GitHub: praetorian-inc/vespasian
EntropyLLM 기반 공격 시나리오 생성, 5가지 personaGitHub: arjinexe/entropy-chaos
Escape DAST비즈니스 로직 보안 테스트escape.tech
api.sh8단계 전 프로토콜 공격 파이프라인GitHub: Sharon-Needles/api
FireTailGraphQL 12가지 특화 테스트firetail.ai
jwt_toolJWT 종합 테스트GitHub: ticarpi/jwt_tool
Burp Autorize이중 세션 권한 비교Burp BApp Store

참고 자료

  • references/rest-graphql-testing.md — REST + GraphQL 심층 테스트
  • references/jwt-oauth-testing.md — JWT + OAuth 보안 테스트

작업 완료 자체 점검 (완료를 주장하기 전에 MUST 통과)

  • 작업 흐름의 각 단계를 (읽기만 한 것이 아니라) 실제로 실행했습니까?
  • tool-index를 기반으로 실제 도구 경로를 사용했습니까?
  • 재현 가능한 증거 (명령어/스크립트/스크린샷/보고서)를 생성했습니까?
  • RULES가 요구하는 Checklist 항목을 완료하고 다시 기록했습니까?

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

apk-reverse

在 CLI 环境下做 Android APK 逆向时使用。适用于 APK 解包、Java 反编译、smali 修改、重打包、Frida 动态 Hook,以及按需切换到 so/native 分析。优先使用本机已安装的 jadx、apktool、frida、adb、ida-reverse、radare2。

attack-chain

Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill.

binary-diff

|

binary-ninja-reverse

Use for authorized binary analysis in Binary Ninja, including HLIL/MLIL/LLIL inspection, strings/imports/exports, cross-references, types, patch review, Python API automation, and optional Binary Ninja MCP or localhost HTTP integration.

browser-automation

|

browser-extension-reverse

Use for authorized reverse engineering of browser extensions (Chrome/Firefox) including manifest analysis, background workers, and extension-based credential or traffic logic recovery.

case-review

Reviews a reverse-skill case package for scope readiness, Evidence to Finding to Path traceability, work item coverage, timeline references, and optional artifact hash integrity before report handoff.

cloud-k8s

Use for authorized cloud, container, and Kubernetes security assessment including metadata SSRF, IAM misconfig, container escape paths, and cluster RBAC review.

code-audit

Use for authorized source-code security review and SAST workflows including Semgrep, CodeQL patterns, dangerous API hunting, and fix verification.

ctf-sandbox

Thin PRIMARY for CTF / AWD / 靶场 multi-type orchestration. Hands off to the sidecar CTF-Sandbox-Orchestrator. Use when the user says CTF, AWD, 靶场, or 比赛题 and no more specific pwn/APK/IDA route already won.

database-security

Use for authorized database security assessment covering PostgreSQL/MySQL/MSSQL/Mongo/Redis exposure, authz, UDF/command paths, and misconfiguration review.

diagram-generator

generate, refine, validate, and render diagrams from natural language, notes, code snippets, schemas, tables, or existing diagram source. use for flowcharts, swimlanes, sequence diagrams, state diagrams, er diagrams, class diagrams, architecture/c4-style diagrams, dependency graphs, gantt charts, mind maps, user journeys, sankey-style flows, org charts, network graphs, and other visual models. supports mermaid by default, graphviz dot for complex graph layout, plantuml for uml-heavy engineering diagrams, and svg output when direct markup is more reliable.

digital-forensics

Use for authorized digital forensics including memory dumps, disk timelines, PCAP investigation, artifact triage, and IR evidence preservation.

docs-generator

|

dotnet-reverse

.NET / C# 二进制逆向。当目标是 .NET assembly(PE 头含 CLR、.exe/.dll 托管程序)、C# 编译产物(含 NativeAOT)、红队 Sharp* 工具(Rubeus / SharpHound / SharpHound 等)、.NET 混淆程序(ConfuserEx / SmartAssembly / Babel / Eazfuscator)、.NET loader / info-stealer / 套壳 malware 时使用。优先用 dnSpyEx + de4dot,需要 AI 直接操作时联动 dnSpy MCP。不用于纯 native 二进制(走 reverse-engineering / ida-reverse)。

edr-bypass-re

|

email-security

Use for authorized email security review including phishing analysis, header authentication (SPF/DKIM/DMARC), BEC patterns, and mailbox token abuse research.

firmware-pentest

|

ghidra-reverse

Use for free/open reverse engineering with Ghidra (headless or GUI), including decompile, cross-refs, and optional Ghidra MCP workflows when IDA is unavailable.

go-rust-reverse

Use for reverse engineering stripped Go and Rust binaries including runtime recognition, pclntab/moduel data recovery, panic strings, and idiomatic decompilation recovery.

관련 스킬