mcpField
P
performing-cloud-native-forensics-with-falco

performing-cloud-native-forensics-with-falco

github.com/mukul975安全35.2k51 次安装8 周前更新
代码仓库

关于 performing-cloud-native-forensics-with-falco

一份使用 Falco 进行云原生取证的技能指南,面向容器环境的安全运维和事件响应人员。它介绍运行时检测规则的部署与管理,以及 Falco 告警的解析。

主要功能

  1. 01部署和管理 Falco 规则
  2. 02检测容器内 Shell 启动
  3. 03监测敏感文件访问
  4. 04发现异常出站连接
  5. 05检测提权与容器逃逸

适用场景

  1. 01调查容器安全告警
  2. 02识别容器中的可疑进程
  3. 03排查敏感文件访问
  4. 04审查意外的网络连接

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill performing-cloud-native-forensics-with-falco

安装后在 Claude Code 中输入/performing-cloud-native-forensics-with-falco确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

LICENSE
references/
api-reference.md
scripts/
agent.py

详细介绍

使用 Falco 执行云原生取证

何时使用

  • 当开展涉及使用 falco 执行云原生取证的安全评估时
  • 当针对相关安全事件遵循事件响应流程时
  • 当执行计划内的安全测试或审计活动时
  • 当通过动手测试验证安全控制措施时

先决条件

  • 熟悉云安全概念和工具
  • 可访问测试或实验环境以安全执行
  • 已安装 Python 3.8+ 及所需依赖项
  • 为任何测试活动获得适当授权

说明

在容器化环境中部署和管理 Falco 规则以进行运行时安全检测。解析 Falco 告警以进行事件响应。

# Custom Falco rule for detecting shell in container
- rule: Shell Spawned in Container
  desc: Detect shell process started in a container
  condition: >
    spawned_process and container
    and proc.name in (bash, sh, zsh, dash, csh)
    and not proc.pname in (docker-entrypo, supervisord)
  output: >
    Shell spawned in container
    (user=%user.name command=%proc.cmdline container=%container.name
     image=%container.image.repository)
  priority: WARNING
  tags: [container, shell, mitre_execution]

关键检测规则:

  1. 在非交互式容器中启动 shell
  2. 访问敏感文件(/etc/shadow、/etc/passwd)
  3. 来自意外容器的出站连接
  4. 通过 setuid/setgid 进行权限提升
  5. 通过 mount 或 ptrace 进行容器逃逸

示例

# Run Falco with custom rules
falco -r /etc/falco/custom_rules.yaml -o json_output=true
# Parse JSON alerts
cat /var/log/falco/alerts.json | python3 -c "import json,sys; [print(json.loads(l)['output']) for l in sys.stdin]"

评论

支持 Markdown