detecting-privilege-escalation-in-kubernetes-pods

Featured

Detect and prevent privilege escalation in Kubernetes pods by monitoring security contexts, capabilities, and syscall patterns with Falco and OPA policies.

DevOps & Infrastructure 12,642 stars 1468 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Detecting Privilege Escalation in Kubernetes Pods ## Overview Privilege escalation in Kubernetes occurs when a pod or container gains elevated permissions beyond its intended scope. This includes running as root, using privileged mode, mounting host filesystems, enabling dangerous Linux capabilities, or exploiting kernel vulnerabilities. Detection combines admission control (prevention), runtime monitoring (detection), and audit logging (investigation). ## When to Use - When investigating security incidents that require detecting privilege escalation in kubernetes pods - 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 - Kubernetes cluster v1.25+ (Pod Security Admission support) - kubectl with cluster-admin access - Falco or similar runtime security tool - OPA Gatekeeper or Kyverno for admission policies ## Privilege Escalation Vectors in Kubernetes | Vector | Risk | Detection Method | |--------|------|-----------------| | privileged: true | Full host access | Admission control + audit | | hostPID: true | Access host processes | Admission control | | hostNetwork: true | Access host network stack | Admission control | | hostPath volumes | Read/write host filesystem | Admission control | | SYS_ADMIN capability | Near-privileged access | Admission + runtime | | allowPrivilegeEscalatio...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
3 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

detecting-container-escape-with-falco-rules

Detect container escape attempts in real-time using Falco runtime security rules that monitor syscalls, file access, and privilege escalation.

12,642 Updated today
mukul975
AI & Automation Featured

implementing-kubernetes-pod-security-standards

Pod Security Standards (PSS) define three levels of security policies -- Privileged, Baseline, and Restricted -- enforced by the Pod Security Admission (PSA) controller built into Kubernetes 1.25+. PS

12,642 Updated today
mukul975
DevOps & Infrastructure Solid

performing-cloud-native-forensics-with-falco

Uses Falco YAML rules for runtime threat detection in containers and Kubernetes, monitoring syscalls for shell spawns, file tampering, network anomalies, and privilege escalation. Manages Falco rules via the Falco gRPC API and parses Falco alert output. Use when building container runtime security or investigating k8s cluster compromises.

12,642 Updated today
mukul975
DevOps & Infrastructure Solid

analyzing-kubernetes-audit-logs

Parses Kubernetes API server audit logs (JSON lines) to detect exec-into-pod, secret access, RBAC modifications, privileged pod creation, and anonymous API access. Builds threat detection rules from audit event patterns. Use when investigating Kubernetes cluster compromise or building k8s-specific SIEM detection rules.

12,642 Updated today
mukul975
AI & Automation Solid

performing-container-escape-detection

Detects container escape attempts by analyzing namespace configurations, privileged container checks, dangerous capability assignments, and host path mounts using the kubernetes Python client. Identifies CVE-2022-0492 style escapes via cgroup abuse. Use when auditing container security posture or investigating escape attempts.

12,642 Updated today
mukul975