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 पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
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:
- Privileged containers (full host access)
- CAP_SYS_ADMIN capability
- Host PID/Network/IPC namespace sharing
- Writable hostPath mounts to / or /etc
- 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
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #8207
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।