Communitygithub.com

cloud-k8s

승인된 클라우드, 컨테이너, Kubernetes 보안 평가를 위한 스킬입니다. 메타데이터 SSRF, IAM 오설정, 컨테이너 탈출 경로, 클러스터 RBAC 검토 등을 포함합니다.

cloud-k8s란 무엇인가요?

이 스킬은 클라우드, 컨테이너, Kubernetes 환경에 대한 권한 있는 보안 평가를 수행하도록 설계된 전문 에이전트 스킬입니다. AWS, Azure, GCP와 같은 주요 클라우드 제공업체와 Docker, containerd, Kubernetes를 지원하며, 승인된 계정 및 클러스터 내에서만 작동하도록 엄격히 제한됩니다. 주요 기능으로는 IMDSv1/v2 메타데이터 SSRF, IAM 권한 및 공개 스토리지 버킷 점검, 컨테이너 권한(privileged, hostPath, SYS_ADMIN) 및 탈출 경로 식별, Kubernetes RBAC, 시크릿, Admission Webhook, 네트워크 정책 감사 등이 포함됩니다. kubectl, trivy, kube-bench, kubeaudit, pacu, scoutsuite, nuclei와 같은 도구를 활용하며, '신원 및 경계 식별(Phase 1)'부터 시작하여 제어면(Phase 2), 컨테이너(Phase 3), Kubernetes(Phase 4) 순서로 체계적으로 진행됩니다. 또한 사전 서면 승인, 파괴적 작업 금지, 타 테넌트 스캔 금지를 엄격히 준수하도록 설계되었습니다.

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

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

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

문서

클라우드 / 컨테이너 / Kubernetes 보안

필수 조치 (读完后立刻执行)

  1. NOW: ../field-journal/precedent-pentest.md 읽기 — 클라우드/K8s 테스트는 반드시 서면 승인 필요
  2. NOW: 케이스 초기화 + 범위 설정; 계정 경계 명확히 하고, 파괴적 작업 금지
  3. NOW: 클라우드 메타데이터/컨테이너/K8s/IAM인지 확인. 일반 웹 스캔이면 pentest-tools/로 전환
  4. NEXT: 도구 인덱스 확인; kubectl/aws/gcloud 등은 주로 수동 설치
  5. ACT: '신원 및 노출 표면'부터 시작, 기본 전체 네트워크 스캔 금지

적용 시나리오

  • 클라우드 메타데이터 SSRF (169.254.169.254 / IMDS)
  • IAM 과도한 권한, 공개 스토리지 버킷, 잘못된 보안 그룹
  • Docker/containerd 탈출 경로 평가
  • Kubernetes RBAC, 시크릿, Admission, 공급망 이미지
  • 컨테이너 이미지 취약점 (supply-chain-security/와 연동 가능)

워크플로우

Phase 1 — 신원 및 경계

□ 현재 신원: 클라우드 AK/SK, K8s SA, 노드 SSH?
□ 범위: 단일 계정 / 단일 클러스터 / 단일 네임스페이스
□ 네트워크 제한: authorized_target_only

Phase 2 — 클라우드 제어면

# 예시 (공급업체에 따라 교체; 반드시 승인된 계정 내에서 실행)
aws sts get-caller-identity
aws s3 ls
# Azure / GCP 해당 identity 명령어
□ 공개 버킷 / 잘못된 ACL
□ 메타데이터: IMDSv1 vs v2; SSRF 체인
□ 역할 위임 가능(PassRole) 및 수평 이동

Phase 3 — 컨테이너

□ privileged / hostPath / hostNetwork 여부
□ capabilities (SYS_ADMIN 등)
□ 쓰기 가능한 호스트 경로 → 탈출 후보
□ 이미지 히스토리 및 알려진 CVE → Trivy

Phase 4 — Kubernetes

kubectl auth can-i --list
kubectl get pods,secrets,svc -A
kubectl get clusterrolebindings
□ SA 토큰 마운트 및 권한
□ 위험한 admission webhook 누락
□ etcd / dashboard 노출
□ 네트워크 정책이 기본적으로 허용인지 확인

도구 체인

도구용도부트스트랩
kubectl클러스터 상호작용수동
trivy이미지/IaC 스캔bootstrap trivy 사용 가능 시
kube-bench / kubeauditCIS/구성 감사수동
pacu / scoutsuite클라우드 감사 (승인 필요)수동
nuclei알려진 클라우드 취약점 템플릿bootstrap nmap/nuclei 생태계

참고 자료

  • references/k8s-cloud-checklist.md
  • CTF 참고: ../../CTF-Sandbox-Orchestrator/competition-agent-cloud/
  • ../supply-chain-security/ ../pentest-tools/

라우팅 컨텍스트

상위: MASTER R23
하위: 노드 셸 획득 시 → attack-chain / windows-ad; 이미지 취약점 → supply-chain
금지 사항: 승인 없이 퍼블릭 클라우드의 다른 테넌트 스캔

작업 완료 자가 점검

  • 승인된 계정/클러스터 내로 제한되었는가?
  • 발견 사항에 재현 방법과 영향이 포함되었는가?
  • 파괴적 작업을 피했는가?
  • 보고서 / 저널 작성 완료?

Individual skills in this repo

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

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication, authorization, rate-limit, and CI/CD testing.

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.

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.

관련 스킬