Chuyển đến nội dung
Skillpedia
Agent35k · #7813

detecting-container-escape-attempts

Skill này làm gì

Công cụ này giúp nhận diện khi ai đó cố thoát khỏi một container cô lập để truy cập hệ thống chính hoặc các container khác. Nó giám sát các hoạt động đáng ngờ như thao túng hệ thống, lạm dụng quyền và truy cập tệp nhạy cảm.

Khi nào nên dùng

  • ✓Khi điều tra một nghi ngờ tấn công thoát khỏi container.
  • ✓Khi thiết lập hệ thống giám sát các nỗ lực thoát.
  • ✓Khi kiểm tra xem bảo mật có bao phủ các kỹ thuật thoát đã biết không.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-container-escape-attempts/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-container-escape-attempts/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Phát hiện xem có container nào đang cố truy cập socket Docker không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ giám sát các lệnh gọi hệ thống và tiến trình trong container. Nếu phát hiện điều bất thường, như cố truy cập tệp của máy chủ, một cảnh báo sẽ được tạo.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Detecting Container Escape Attempts

Overview

Container escape is a critical attack technique where an adversary breaks out of container isolation to access the host system or other containers. Detection involves monitoring for escape indicators such as namespace manipulation, capability abuse, kernel exploits, mounted sensitive paths, and anomalous syscall patterns using runtime security tools like Falco, Sysdig, and custom seccomp/audit rules.

When to Use

  • When investigating security incidents that require detecting container escape attempts
  • 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

  • Linux host with kernel 5.10+ (eBPF support)
  • Falco 0.37+ installed (kernel module or eBPF probe)
  • Docker Engine or containerd runtime
  • auditd configured
  • Root access for eBPF/kernel module loading

Core Concepts

Common Container Escape Vectors

Vector Technique MITRE ID
Privileged containers Mount host filesystem, load kernel modules T1611
Docker socket mount Create privileged container from within T1610
Kernel exploits CVE-2022-0185 (fsconfig), Dirty Pipe, runc CVEs T1068
Capability abuse CAP_SYS_ADMIN, CAP_SYS_PTRACE, CAP_NET_ADMIN T1548
Sensitive mounts /proc/sysrq-trigger, /proc/kcore, cgroup release_agent T1611
Namespace escape nsenter, unshare to host namespaces T1611
Symlink/bind mount Escape through /proc/self/root T1611

Detection Layers

  1. Syscall monitoring - eBPF/kernel module captures syscalls in real-time
  2. File integrity - Detect modification of escape-enabling paths
  3. Process monitoring - Track process creation, namespace changes
  4. Network monitoring - Detect container-to-host connections
  5. Audit logging - Linux auditd for capability and mount operations

Workflow

Step 1: Deploy Falco for Runtime Detection

# falco-values.yaml for Helm deployment
falco:
  driver:
    kind: ebpf   # or modern_ebpf for kernel 5.8+
  rules_files:
    - /etc/falco/falco_rules.yaml
    - /etc/falco/falco_rules.local.yaml
    - /etc/falco/rules.d
  json_output: true
  json_include_output_property: true
  http_output:
    enabled: true
    url: "http://falcosidekick:2801"
  grpc:
    enabled: true
  priority: warning
# Install Falco via Helm
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm install falco falcosecurity/falco \
  --namespace falco-system --create-namespace \
  -f falco-values.yaml

Step 2: Custom Falco Rules for Escape Detection

# /etc/falco/rules.d/container_escape.yaml

# Detect container escape via privileged container
- rule: Container Escape via Privileged Mode
  desc: Detect attempts to escape container using privileged capabilities
  condition: >
    spawned_process and container and
    (proc.name in (nsenter, unshare, mount, umount, modprobe, insmod) or
     (proc.name = chroot and proc.args contains "/host"))
  output: >
    Container escape attempt via privileged operation
    (user=%user.name container=%container.name image=%container.image.repository
     command=%proc.cmdline pid=%proc.pid %container.info)
  priority: CRITICAL
  tags: [container, escape, T1611]

# Detect Docker socket access from container
- rule: Container Access to Docker Socket
  desc: Detect container reading/writing to Docker socket
  condition: >
    (open_read or open_write) and container and
    fd.name = /var/run/docker.sock
  output: >
    Docker socket accessed from container
    (user=%user.name container=%container.name image=%container.image.repository
     fd=%fd.name command=%proc.cmdline %container.info)
  priority: CRITICAL
  tags: [container, escape, docker_socket]

# Detect sensitive proc filesystem access
- rule: Container Access to Sensitive Proc Paths
  desc: Detect container accessing host-sensitive proc paths
  condition: >
    open_read and container and
    (fd.name startswith /proc/sysrq-trigger or
     fd.name startswith /proc/kcore or
     fd.name startswith /proc/kmsg or
     fd.name startswith /proc/kallsyms or
     fd.name startswith /sys/kernel)
  output: >
    Sensitive proc/sys access from container
    (user=%user.name container=%container.name path=%fd.name

…
Câu hỏi thường gặp

“Container escape” là gì?

Đây là khi kẻ tấn công thoát được khỏi môi trường cô lập của container để truy cập hệ thống mà container đang chạy trên đó hoặc các container khác.

Những công cụ nào được dùng?

Các công cụ như Falco, Sysdig, auditd và EDR (Endpoint Detection and Response) có thể dùng để thu thập dữ liệu cần thiết.

Tôi có cần kiến thức kỹ thuật nâng cao để dùng không?

Công cụ được thiết kế để giúp hiểu và điều tra các sự kiện này, nhưng việc thiết lập ban đầu các công cụ giám sát có thể cần chuyên môn kỹ thuật.

Chi tiết

Mô tả gốc của tác giả

Detects container escape at runtime across tooling - namespace manipulation, capability abuse, kernel exploits, sensitive host mounts, and anomalous syscalls - and explains which signals matter regardless of whether Falco, Sysdig, auditd, or an EDR is doing the collection. Use when deciding what breakout behaviour to monitor, investigating a suspected Docker or Kubernetes breakout, or comparing es

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7813
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự