analyzing-kubernetes-audit-logs
यह क्या करती है
यह टूल Kubernetes के audit logs का विश्लेषण करके संदिग्ध गतिविधियाँ ढूंढता है। यह अनधिकृत access, privilege escalation और data चोरी की कोशिशों को पहचानता है, जिससे पता चलता है कि आपका cluster हैक हुआ है या नहीं।
कब इस्तेमाल करें
- ✓जब आपको शक हो कि आपके Kubernetes cluster में सेंध लगी है।
- ✓यह देखने के लिए कि हमलावर ने API server के ज़रिए क्या किया।
- ✓अपने cluster की सुरक्षा के लिए detection rules बनाते समय।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-kubernetes-audit-logs/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“audit logs का विश्लेषण करो और बताओ कि क्या secrets तक पहुँचने या privileged pods बनाने की कोई कोशिश हुई थी।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल log files पढ़ता है, जो Kubernetes में होने वाली हर बात का रिकॉर्ड होती हैं। यह ऐसे patterns ढूंढता है जो खतरनाक काम दिखाते हैं, जैसे किसी का container में घुसने की कोशिश करना या संवेदनशील जानकारी तक पहुँचना।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Analyzing Kubernetes Audit Logs
When to Use
- When investigating security incidents that require analyzing kubernetes audit logs
- 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
- 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
Parse Kubernetes audit log files (JSON lines format) to detect security-relevant events including unauthorized access, privilege escalation, and data exfiltration.
import json
with open("/var/log/kubernetes/audit.log") as f:
for line in f:
event = json.loads(line)
verb = event.get("verb")
resource = event.get("objectRef", {}).get("resource")
user = event.get("user", {}).get("username")
if verb == "create" and resource == "pods/exec":
print(f"Pod exec by {user}")
Key events to detect:
- pods/exec and pods/attach (shell into containers)
- secrets access (get/list/watch)
- clusterrolebindings creation (RBAC escalation)
- Privileged pod creation
- Anonymous or system:unauthenticated access
Examples
# Detect secret enumeration
if verb in ("get", "list") and resource == "secrets":
print(f"Secret access: {user} -> {event['objectRef'].get('name')}")
अक्सर पूछे जाने वाले सवाल
Kubernetes audit logs क्या हैं?
ये आपके Kubernetes cluster में हुई सभी कार्रवाइयों के विस्तृत रिकॉर्ड हैं, जैसे किसने क्या किया, कब किया और किस resource पर किया।
'exec-into-pod' क्या है?
जब कोई चल रहे container में किसी command के ज़रिए घुसता है, तो इसे 'exec-into-pod' कहते हैं। यह घुसपैठ का एक तरीका हो सकता है।
SIEM detection rules क्या हैं?
ये SIEM सुरक्षा सिस्टम में बनाए गए नियम हैं, जो logs से पहचानी गई संदिग्ध गतिविधियों पर alert भेजते हैं।
जानकारी
लेखक का मूल विवरण
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: audi
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7618
- लाइसेंस
- 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
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।