본문으로 건너뛰기
Skillpedia
에이전트35k · #7812

detecting-container-drift-at-runtime

하는 일

이 도구는 컨테이너(격리된 소프트웨어 환경)가 실행 중에 예상치 못하게 변경되었는지 확인하도록 돕습니다. 컨테이너를 원래 상태와 비교해 새 프로그램이 실행되었는지, 파일이 수정되었는지, 설정이 바뀌었는지 확인합니다.

사용하는 경우

  • ✓컨테이너가 침해되었다고 의심될 때.
  • ✓누군가 컨테이너 안에 허가되지 않은 프로그램을 설치했는지 확인할 때.
  • ✓컨테이너가 만들어진 그대로 유지되는지 확인하는 경우.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-container-drift-at-runtime/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“'my-server'라는 이름의 컨테이너에서 허가되지 않은 변경이 있는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 컨테이너의 현재 상태를 원래 이미지와 비교합니다. 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)'란 무엇인가요?

컨테이너가 원래 상태에서 바뀌었다는 뜻입니다. 컨테이너는 변하지 않아야 하므로 어떤 변화든 문제의 신호일 수 있습니다.

드리프트로 어떤 변화를 탐지할 수 있나요?

있어서는 안 되는 프로그램의 실행, 파일 생성이나 수정, 설정 변경, 새 패키지 설치, 심지어 새로운 네트워크 연결까지 탐지할 수 있습니다.

이것을 사용하려면 설치해야 하는 것이 있나요?

네, 일반적으로 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
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬