Skills for Real Engineers. Straight from my .agents directory.
analyzing-kubernetes-audit-logs
Agent skill frommukul975/Anthropic-Cybersecurity-Skills
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: audit policy, audit log, kube-apiserver, exec into pod, RBAC change, anonymous access, detection rules. Do not use for syscall-level detection inside a running container - use detecting-container-runtime-threats-with-falco. '
How to install analyzing-kubernetes-audit-logs
npx skills add mukul975/Anthropic-Cybersecurity-Skills# or add only this skill to Claude Code: copy the folder
skills/analyzing-kubernetes-audit-logs/
# into
~/.claude/skills/analyzing-kubernetes-audit-logs/ (all projects)
.claude/skills/analyzing-kubernetes-audit-logs/ (one project)
1# Analyzing Kubernetes Audit Logs234## When to Use56- When investigating security incidents that require analyzing kubernetes audit logs7- When building detection rules or threat hunting queries for this domain8- When SOC analysts need structured procedures for this analysis type9- When validating security monitoring coverage for related attack techniques1011## Prerequisites1213- Familiarity with container security concepts and tools14- Access to a test or lab environment for safe execution15- Python 3.8+ with required dependencies installed16- Appropriate authorization for any testing activities1718## Instructions1920Parse Kubernetes audit log files (JSON lines format) to detect security-relevant21events including unauthorized access, privilege escalation, and data exfiltration.2223```python24import json2526with open("/var/log/kubernetes/audit.log") as f:27 for line in f:28 event = json.loads(line)29 verb = event.get("verb")30 resource = event.get("objectRef", {}).get("resource")31 user = event.get("user", {}).get("username")32 if verb == "create" and resource == "pods/exec":33 print(f"Pod exec by {user}")34```3536Key events to detect:371. pods/exec and pods/attach (shell into containers)382. secrets access (get/list/watch)393. clusterrolebindings creation (RBAC escalation)404. Privileged pod creation415. Anonymous or system:unauthenticated access4243## Examples4445```python46# Detect secret enumeration47if verb in ("get", "list") and resource == "secrets":48…
Excerpt shown under the repository's Apache-2.0 license.
More skills in Anthropic-Cybersecurity-Skills
- ▸abusing-dpapi-for-credential-access
- ▸abusing-shadow-credentials-for-privesc
- ▸achieving-cmmc-level-2-compliance
- ▸acquiring-disk-image-with-dd-and-dcfldd
- ▸analyzing-active-directory-acl-abuse
- ▸analyzing-android-malware-with-apktool
- ▸analyzing-api-gateway-access-logs
- ▸analyzing-apt-group-with-mitre-navigator
- ▸analyzing-azure-activity-logs-for-threats
- ▸analyzing-bootkit-and-rootkit-samples
- ▸analyzing-browser-forensics-with-hindsight
- ▸analyzing-campaign-attribution-evidence
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
