소스 정보
- 저장소
- killvxk/cybersecurity-skills-zh
- 최근 소스 활동
- 2026년 3월 18일 09:26
- 감지된 SKILL.md 언어
- 중국어
- 스타
- 42
- 포크
- 9
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/killvxk/cybersecurity-skills-zh --skill detecting-container-escape-with-falco-rules명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
通过分析 Zeek dns.log 中的高熵子域名查询、超量查询量、超长查询长度以及异常 DNS 记录类型,检测 DNS 隧道和数据外泄中的隐蔽通道通信。适用于:当需要狩猎基于 DNS 的 C2 或数据外泄通道、调查异常 DNS 查询模式、或响应涉及 DNS 隧道工具(iodine、dnscat2、DNSExfiltrator)的威胁情报时使用。
实施 Google 的 BeyondCorp 零信任访问模型,通过 IAP、Access Context Manager 和 Chrome Enterprise Premium,消除网络边界的隐式信任,强制执行基于身份的访问控制,实现无 VPN 的安全应用访问。适用于将传统 VPN 替换为零信任架构、部署 Identity-Aware Proxy、配置设备信任策略、或为远程办公实施上下文感知访问控制时使用。
在授权的安全评估过程中,使用 Burp Suite 的扫描器、Intruder 和 Repeater 工具识别和验证跨站脚本(XSS)漏洞。适用于 Web 应用渗透测试中检测反射型、存储型和 DOM 型 XSS,验证自动化扫描器报告的 XSS 发现,以及评估 CSP 和 XSS 过滤器的有效性时使用。
SOC 직업 분류 기준
SKILL.md 표시 중
| name | detecting-container-escape-with-falco-rules |
| description | 使用 Falco 运行时安全规则实时检测容器逃逸尝试,监控系统调用、文件访问和权限提升。 |
| domain | cybersecurity |
| subdomain | container-security |
| tags | ["falco","container-escape","runtime-security","syscall-monitoring","kubernetes","detection"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
Falco 是一个 CNCF 毕业的运行时安全工具,通过监控 Linux 系统调用来检测异常的容器行为。它使用规则引擎来识别容器逃逸技术,例如挂载主机文件系统、访问敏感主机路径、加载内核模块以及利用特权容器能力。
# 添加 Falco Helm chart
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm repo update
# 使用 eBPF 驱动安装 Falco
helm install falco falcosecurity/falco \
--namespace falco --create-namespace \
--set falcosidekick.enabled=true \
--set falcosidekick.webui.enabled=true \
--set driver.kind=ebpf \
--set collectors.containerd.enabled=true \
--set collectors.containerd.socket=/run/containerd/containerd.sock
# 验证
kubectl get pods -n falco
kubectl logs -n falco -l app.kubernetes.io/name=falco --tail=20
# 添加 Falco GPG 密钥和仓库
curl -fsSL https://falco.org/repo/falcosecurity-packages.asc | \
sudo gpg --dearmor -o /usr/share/keyrings/falco-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/falco-archive-keyring.gpg] https://download.falco.org/packages/deb stable main" | \
sudo tee /etc/apt/sources.list.d/falcosecurity.list
sudo apt-get update
sudo apt-get install -y falco
# 启动 Falco
sudo systemctl enable falco
sudo systemctl start falco
- rule: Container Mounting Host Filesystem
desc: 检测容器尝试挂载主机文件系统
condition: >
spawned_process and container and
proc.name = mount and
(proc.args contains "/host" or proc.args contains "nsenter")
output: >
容器正在挂载主机文件系统
(user=%user.name container_id=%container.id container_name=%container.name
image=%container.image.repository command=%proc.cmdline %evt.args)
priority: CRITICAL
tags: [container, escape, T1611]
- rule: Nsenter Execution in Container
desc: 检测使用 nsenter 逃逸容器命名空间
condition: >
spawned_process and container and proc.name = nsenter
output: >
容器中执行了 nsenter - 潜在的逃逸尝试
(user=%user.name container_id=%container.id image=%container.image.repository
command=%proc.cmdline parent=%proc.pname)
priority: CRITICAL
tags: [container, escape, namespace, T1611]
- rule: Launch Privileged Container
desc: 检测特权容器被启动
condition: >
container_started and container and container.privileged=true
output: >
已启动特权容器
(user=%user.name container_id=%container.id container_name=%container.name
image=%container.image.repository)
priority: WARNING
tags: [container, privileged, T1610]
- rule: Write to Sysrq Trigger
desc: 检测写入 /proc/sysrq-trigger,这可能使主机崩溃或被控制
condition: >
open_write and container and fd.name = /proc/sysrq-trigger
output: >
从容器写入 /proc/sysrq-trigger
(user=%user.name container_id=%container.id image=%container.image.repository
command=%proc.cmdline)
priority: CRITICAL
tags: [container, escape, host-manipulation]
- rule: Container Loading Kernel Module
desc: 检测容器尝试加载内核模块
condition: >
spawned_process and container and
(proc.name in (insmod, modprobe) or
(proc.name = init_module))
output: >
从容器加载内核模块
(user=%user.name container_id=%container.id image=%container.image.repository
command=%proc.cmdline)
priority: CRITICAL
tags: [container, escape, kernel, T1611]
- rule: Write to Cgroup Release Agent
desc: 检测写入 cgroup release_agent,这是已知的容器逃逸向量
condition: >
open_write and container and
fd.name endswith release_agent
output: >
容器写入 cgroup release_agent - 逃逸尝试
(user=%user.name container_id=%container.id image=%container.image.repository
file=%fd.name command=%proc.cmdline)
priority: CRITICAL
tags: [container, escape, cgroup, CVE-2022-0492]
- rule: Container Reading Host Shadow File
desc: 检测容器通过挂载卷读取主机上的 /etc/shadow
condition: >
open_read and container and
(fd.name = /etc/shadow or fd.name startswith /host/etc/shadow)
output: >
容器正在读取主机 shadow 文件
(user=%user.name container_id=%container.id image=%container.image.repository
file=%fd.name command=%proc.cmdline)
priority: CRITICAL
tags: [container, credential-access, T1003]
- rule: Container Accessing Docker Socket
desc: 检测容器访问 Docker socket,这允许控制主机
condition: >
(open_read or open_write) and container and
fd.name = /var/run/docker.sock
output: >
容器正在访问 Docker socket
(user=%user.name container_id=%container.id image=%container.image.repository
command=%proc.cmdline)
priority: CRITICAL
tags: [container, escape, docker-socket, T1610]
# /etc/falco/rules.d/container-escape.yaml
- list: escape_binaries
items: [nsenter, chroot, unshare, mount, umount, pivot_root]
- macro: container_escape_attempt
condition: >
spawned_process and container and
proc.name in (escape_binaries)
- rule: Container Escape Binary Execution
desc: 检测执行通常用于容器逃逸的二进制文件
condition: container_escape_attempt
output: >
容器中执行了逃逸相关二进制文件
(user=%user.name container=%container.name image=%container.image.repository
command=%proc.cmdline parent=%proc.pname pid=%proc.pid)
priority: CRITICAL
tags: [container, escape, mitre_T1611]
- rule: Sensitive File Access from Container
desc: 检测容器访问敏感主机文件
condition: >
(open_read or open_write) and container and
(fd.name startswith /proc/1/ or
fd.name = /etc/shadow or
fd.name = /etc/kubernetes/admin.conf or
fd.name startswith /var/lib/kubelet/)
output: >
从容器访问了敏感文件
(container=%container.name image=%container.image.repository
file=%fd.name command=%proc.cmdline user=%user.name)
[, , ]
# /etc/falco/falco.yaml(关键设置)
rules_files:
- /etc/falco/falco_rules.yaml
- /etc/falco/rules.d/container-escape.yaml
json_output: true
json_include_output_property: true
json_include_tags_property: true
log_stderr: true
log_syslog: true
log_level: info
priority: WARNING
stdout_output:
enabled: true
syslog_output:
enabled: true
http_output:
enabled: true
url: http://falcosidekick:2801
insecure: true
grpc:
enabled: true
bind_address: "unix:///run/falco/falco.sock"
threadiness: 8
grpc_output:
enabled: true
# Falcosidekick values.yaml
config:
slack:
webhookurl: "https://hooks.slack.com/services/XXXXX"
minimumpriority: "warning"
messageformat: |
*{{.Priority}}* - {{.Rule}}
容器: {{.OutputFields.container_name}}
镜像: {{.OutputFields.container_image_repository}}
命令: {{.OutputFields.proc_cmdline}}
# 模拟容器逃逸尝试(在测试容器中)
kubectl run test-escape --image=alpine --restart=Never -- sh -c "cat /etc/shadow"
# 模拟 nsenter
kubectl run test-nsenter --image=alpine --restart=Never --overrides='{"spec":{"hostPID":true}}' -- nsenter -t 1 -m -u -i -n -- cat /etc/hostname
# 检查 Falco 告警
kubectl logs -n falco -l app.kubernetes.io/name=falco --tail=50 | grep -i escape