detecting-privilege-escalation-in-kubernetes-pods

Audit Kubernetes pod security contexts and generate privilege escalation reports.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/YukiIto1999/ctf-sleuth --skill detecting-privilege-escalation-in-kubernetes-pods
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detecting-privilege-escalation-in-kubernetes-pods
Source: https://github.com/YukiIto1999/ctf-sleuth/tree/main/.claude/skills/detecting-privilege-escalation-in-kubernetes-pods
Command: npx skills add https://github.com/YukiIto1999/ctf-sleuth --skill detecting-privilege-escalation-in-kubernetes-pods

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Privilege escalation in Kubernetes pods occurs when containers gain elevated access, enabling host compromise or broader cluster impact. This skill provides a framework to detect and prevent such misconfigurations by inspecting securityContext fields, capabilities, host namespace usage, and related indicators.

Core Features & Use Cases

  • Inspect pod security contexts (privileged, runAsUser, allowPrivilegeEscalation) across pods and init containers
  • Detect dangerous capabilities and host-level access (hostPID, hostNetwork, hostIPC)
  • Provide guidance for prevention (admission controls, Falco rules, and audit policy references) and for investigation

Quick Start

Run the agent to audit pods across your cluster and generate a report.

Frequently Asked Questions about detecting-privilege-escalation-in-kubernetes-pods

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect Kubernetes pod privilege escalation attempts?

Detect Kubernetes pod privilege escalation by inspecting pod securityContext fields, capabilities, and host namespace usage using audit scripts. This approach identifies misconfigured containers with elevated access that could enable host compromise.

What is a Kubernetes pod security context and why does it matter?

A Kubernetes pod security context defines privilege and access control settings for containers. It matters because dangerous configurations like privileged mode or allowPrivilegeEscalation can lead to host compromise and broader cluster impact.

How do I audit Kubernetes pods for dangerous capabilities and host access?

Audit Kubernetes pods for dangerous capabilities by running scripts that inspect securityContext fields across pods and init containers. These scripts check for hostPID, hostNetwork, hostIPC, and privileged flags to generate actionable reports.

Can I use Falco to monitor Kubernetes pod privilege escalation at runtime?

Falco can monitor Kubernetes pod privilege escalation at runtime using sample rules provided for threat hunting and security investigations. It complements admission controls and audit policies for comprehensive cluster hardening.

How do I prevent privilege escalation in Kubernetes pods using admission controls?

Prevent privilege escalation in Kubernetes pods by applying admission controls and audit policy guidance that restrict securityContext fields. This skill provides reference policies alongside Falco rules for comprehensive prevention.

Does OPA help with Kubernetes pod security and privilege escalation prevention?

OPA helps with Kubernetes pod security by enforcing admission policies that block privilege escalation misconfigurations. This skill provides audit policy references that work with OPA for cluster hardening and threat prevention.