मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)35k · #8207

performing-container-escape-detection

यह क्या करती है

यह टूल Kubernetes clusters में container configurations की जांच करता है ताकि वे सुरक्षा खामियां पकड़ी जा सकें जिनसे कोई container 'escape' करके host system तक पहुंच सकता है। यह privileged access या संवेदनशील directory mounts जैसी खतरनाक सेटिंग्स ढूंढता है।

कब इस्तेमाल करें

  • ✓cluster का सुरक्षा ऑडिट करते समय।
  • ✓किसी सुरक्षा घटना की जांच करते समय।
  • ✓नए सुरक्षा नियम लागू करने से पहले।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-container-escape-detection/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-container-escape-detection/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे Kubernetes cluster को स्कैन करो और ऐसे container configurations ढूंढो जो escape की अनुमति देते हों।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह टूल हर container की सेटिंग्स जांचने के लिए Kubernetes Python library का इस्तेमाल करता है। यह 'privileged: true' जैसे खतरे के संकेत या ऐसे volume mounts ढूंढता है जो महत्वपूर्ण system हिस्सों तक पहुंच देते हैं।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Performing Container Escape Detection

When to Use

  • When conducting security assessments that involve performing container escape detection
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

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

Audit Kubernetes pods for container escape vectors including privileged mode, dangerous capabilities, host namespace sharing, and writable hostPath mounts.

from kubernetes import client, config
config.load_kube_config()
v1 = client.CoreV1Api()

pods = v1.list_pod_for_all_namespaces()
for pod in pods.items:
    for container in pod.spec.containers:
        sc = container.security_context
        if sc and sc.privileged:
            print(f"PRIVILEGED: {pod.metadata.namespace}/{pod.metadata.name}")

Key escape vectors:

  1. Privileged containers (full host access)
  2. CAP_SYS_ADMIN capability
  3. Host PID/Network/IPC namespace sharing
  4. Writable hostPath mounts to / or /etc
  5. Docker socket mount (/var/run/docker.sock)

Examples

# Check for docker socket mounts
for vol in pod.spec.volumes or []:
    if vol.host_path and "docker.sock" in (vol.host_path.path or ""):
        print(f"Docker socket exposed: {pod.metadata.name}")
अक्सर पूछे जाने वाले सवाल

'container escape' क्या है?

जब container के अंदर चल रहा कोई प्रोग्राम उस server के operating system तक पहुंचने या उसे नियंत्रित करने में सफल हो जाता है, जहां container चल रहा है। ऐसा नहीं होना चाहिए।

'capabilities' क्या होती हैं?

ये container को मिलने वाली खास permissions हैं। इनमें से कुछ, जैसे CAP_SYS_ADMIN, बहुत शक्तिशाली होती हैं और गलत कॉन्फ़िगर होने पर खतरनाक हो सकती हैं।

'hostPath mount' क्या है?

जब server (host) की कोई directory container के साथ शेयर की जाती है। अगर '/' या '/etc' जैसी संवेदनशील directory mount हो, तो container को server की ज़रूरी फाइलों तक पहुंच मिल सकती है।

जानकारी

लेखक का मूल विवरण

Audits container and pod configuration for escape-enabling misconfiguration using the Kubernetes Python client - privileged flags, dangerous capability grants, host path mounts, shared namespaces, and CVE-2022-0492 style cgroup abuse. Use when sweeping a cluster for workloads that could break out, producing a posture report, or checking configuration before enforcement is switched on. Keywords: pr

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8207
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills