मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #7618

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 पढ़कर निर्देशों का पालन करेगा।

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

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

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:

  1. pods/exec and pods/attach (shell into containers)
  2. secrets access (get/list/watch)
  3. clusterrolebindings creation (RBAC escalation)
  4. Privileged pod creation
  5. 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

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

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