본문으로 건너뛰기
Skillpedia
보안35k · #7618

analyzing-kubernetes-audit-logs

하는 일

이 도구는 Kubernetes 감사 로그를 분석해 의심스러운 활동을 찾습니다. 무단 접근, 권한 상승, 데이터 도난 시도를 찾아 클러스터가 침해되었는지 확인하도록 돕습니다.

사용하는 경우

  • ✓Kubernetes 클러스터가 침해되었다고 의심될 때.
  • ✓API 서버를 통해 공격자가 무엇을 했는지 조사할 때.
  • ✓클러스터를 보호하는 탐지 규칙을 만들 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-kubernetes-audit-logs/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-kubernetes-audit-logs/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Kubernetes 감사 로그를 분석하고, 시크릿에 접근하려 하거나 특권 파드를 만든 시도가 있었는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 Kubernetes에서 일어나는 모든 일을 기록한 로그 파일을 읽습니다. 컨테이너에 침입하려 하거나 민감한 정보에 접근하는 것처럼 위험한 행동을 나타내는 특정 패턴을 찾습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Analyzing Kubernetes Audit Logs

When to Use

  • When investigating security incidents that require analyzing kubernetes audit logs
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Familiarity with container security concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Instructions

Parse Kubernetes audit log files (JSON lines format) to detect security-relevant events including unauthorized access, privilege escalation, and data exfiltration.

import json

with open("/var/log/kubernetes/audit.log") as f:
    for line in f:
        event = json.loads(line)
        verb = event.get("verb")
        resource = event.get("objectRef", {}).get("resource")
        user = event.get("user", {}).get("username")
        if verb == "create" and resource == "pods/exec":
            print(f"Pod exec by {user}")

Key events to detect:

  1. pods/exec and pods/attach (shell into containers)
  2. secrets access (get/list/watch)
  3. clusterrolebindings creation (RBAC escalation)
  4. Privileged pod creation
  5. Anonymous or system:unauthenticated access

Examples

# Detect secret enumeration
if verb in ("get", "list") and resource == "secrets":
    print(f"Secret access: {user} -> {event['objectRef'].get('name')}")
자주 묻는 질문

Kubernetes 감사 로그란 무엇인가요?

누가 무엇을, 언제, 어떤 자원에 대해 했는지 등 Kubernetes 클러스터에서 수행된 모든 작업의 자세한 기록입니다.

'exec-into-pod'란 무엇인가요?

클러스터에서 실행 중인 컨테이너에 명령으로 들어가는 것입니다. 침입의 한 형태가 될 수 있습니다.

SIEM 탐지 규칙이란 무엇인가요?

로그에서 확인된 의심스러운 활동이 발생하면 알림을 보내도록 보안 시스템(SIEM)에 설정하는 규칙입니다.

상세 정보

작성자의 원본 설명

Parses Kubernetes API server audit logs (JSON lines) to detect exec-into-pod, secret access, RBAC modifications, privileged pod creation, and anonymous API access, and builds SIEM detection rules from the event patterns. Use when investigating a suspected cluster compromise, reconstructing what an attacker did through the API server, or writing Kubernetes-specific detection content. Keywords: audi

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7618
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬