मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट35k · #7812

detecting-container-drift-at-runtime

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

यह टूल पता लगाने में मदद करता है कि कोई कंटेनर (एक अलग-थलग सॉफ़्टवेयर माहौल) चलते समय अनपेक्षित रूप से तो नहीं बदल गया। यह देखता है कि कोई नया प्रोग्राम चला या नहीं, फ़ाइलें बदली गईं या नहीं, या कॉन्फ़िगरेशन में बदलाव हुआ या नहीं, और इसके लिए कंटेनर की तुलना उसकी मूल स्थिति से करता है।

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

  • ✓जब आपको शक हो कि कोई कंटेनर से छेड़छाड़ हुई है।
  • ✓यह जाँचने के लिए कि कंटेनर के अंदर किसी ने बिना अनुमति प्रोग्राम तो नहीं डाला।
  • ✓यह सुनिश्चित करने के लिए कि कंटेनर बिल्कुल वैसे ही रहें जैसे बनाए गए थे।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-container-drift-at-runtime/SKILL.md

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

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

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

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

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

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

“'my-server' नाम के कंटेनर में बिना अनुमति के हुए बदलावों की जाँच करो।”

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

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

टूल कंटेनर की मौजूदा स्थिति की तुलना उसकी मूल image से करता है। यह प्रोग्राम चलने, फ़ाइल बदलने और कॉन्फ़िगरेशन में बदलाव जैसी गतिविधियों को रियल-टाइम में देखने के लिए Falco जैसे दूसरे टूल का इस्तेमाल करता है।

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

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

Detecting Container Drift at Runtime

Overview

Container drift occurs when running containers deviate from their original image state through unauthorized file modifications, unexpected binary execution, configuration changes, or package installations. Since containers should be treated as immutable infrastructure, any drift is a potential indicator of compromise. Detection techniques leverage the DIE (Detect, Isolate, Evict) model -- an immutable workload should not change during runtime, so any observed change is potentially evidence of malicious activity.

When to Use

  • When investigating security incidents that require detecting container drift at runtime
  • 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

  • Kubernetes cluster v1.24+ with runtime security tooling
  • Falco or Sysdig for runtime drift detection
  • Container image registry with image manifests available
  • Familiarity with Linux filesystem layers and OverlayFS

Core Concepts

Types of Container Drift

  1. Binary drift: Execution of binaries not present in the original image (downloaded malware, compiled tools)
  2. File drift: Creation, modification, or deletion of files in the container filesystem
  3. Configuration drift: Changes to environment variables, mounted secrets, or runtime parameters
  4. Package drift: Installation of new packages via apt, yum, pip, or npm at runtime
  5. Network drift: New listening ports or outbound connections not expected for the workload

Detection Methods

Image-Based Comparison: Compare the running container's filesystem against its source image to identify added, modified, or removed files.

Behavioral Monitoring: Use eBPF or kernel-level monitoring to detect process execution, file access, and network activity that deviates from expected behavior.

Digest Verification: Continuously verify that running container image digests match the approved deployment manifests.

Implementation with Falco

Detecting New Binary Execution

- rule: Drift Detected (Container Image Modified Binary)
  desc: Detect execution of a binary not present in the original container image
  condition: >
    spawned_process and
    container and
    not proc.pname in (container_entrypoint) and
    proc.is_exe_upper_layer = true
  output: >
    Drift detected: new binary executed in container
    (user=%user.name command=%proc.cmdline container=%container.name
     image=%container.image.repository:%container.image.tag
     exe_path=%proc.exepath)
  priority: WARNING
  tags: [container, drift]

- rule: Container Shell Spawned
  desc: Detect interactive shell in a container that should be immutable
  condition: >
    spawned_process and
    container and
    proc.name in (bash, sh, dash, zsh, csh, ksh) and
    not proc.pname in (container_entrypoint)
  output: >
    Shell spawned in container (user=%user.name shell=%proc.name
     container=%container.name image=%container.image.repository)
  priority: WARNING
  tags: [container, drift, shell]

Detecting Package Manager Usage

- rule: Package Manager Execution in Container
  desc: Detect use of package managers indicating drift
  condition: >
    spawned_process and
    container and
    proc.name in (apt, apt-get, yum, dnf, apk, pip, pip3, npm, gem, cargo)
  output: >
    Package manager executed in container (user=%user.name
     command=%proc.cmdline container=%container.name
     image=%container.image.repository)
  priority: ERROR
  tags: [container, drift, package-manager]

Detecting File System Modifications

- rule: Container File System Write
  desc: Detect writes to container upper layer filesystem
  condition: >
    open_write and
    container and
    fd.typechar = 'f' and
    not fd.name startswith /tmp and
    not fd.name startswith /var/log and
    not fd.name startswith /proc
  output: >
    File write in container (user=%user.name file=%fd.name
     container=%container.name)
  priority: NOTICE
  tags: [container, drift, filesystem]

Implementation with Kubernetes Enforcement

Read-Only Root Filesystem

Prevent drift by making container filesystems immutable:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: immutable-app
spec:
  template:
    spec:
      containers:

…
अक्सर पूछे जाने वाले सवाल

कंटेनर 'drift' क्या है?

'Drift' का मतलब है कि कंटेनर अपनी मूल स्थिति से बदल गया है। चूँकि कंटेनर को बदला नहीं जाना चाहिए (immutable), इसलिए कोई भी बदलाव किसी समस्या का संकेत हो सकता है।

drift किस तरह के बदलाव पकड़ सकता है?

यह ऐसे प्रोग्राम का चलना पकड़ सकता है जो वहाँ नहीं होने चाहिए, फ़ाइलें बनना या बदलना, कॉन्फ़िगरेशन में बदलाव, नए पैकेज इंस्टॉल होना, या नए नेटवर्क कनेक्शन भी।

क्या इसे इस्तेमाल करने के लिए कुछ इंस्टॉल करना होगा?

हाँ, आमतौर पर आपके Kubernetes माहौल में Falco या Microsoft Defender for Containers जैसे कंटेनर सुरक्षा टूल सेट होने चाहिए।

जानकारी

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

Detects unauthorized runtime drift in containers by monitoring binary execution, filesystem changes, and configuration deviation from the original immutable image, using Falco and Microsoft Defender for Containers. Use when validating immutable-infrastructure controls, hunting for unexpected package installs or binaries written inside a running container, or determining whether a container diverge

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

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