跳到主要内容
知仓学习社ZHICANG

performing-cloud-native-forensics-with-falco

Uses Falco YAML rules for runtime threat detection in containers and

写文件联网读环境变量(配置)严重 0 · 高危 3mukul975/Anthropic-Cybersecurity-Skills

它会碰到什么

扫了多少4 个文本文件,23 KB
它会碰到什么写文件联网读环境变量(配置)
命中总数9 处
命中统计严重 0 · 高 3 · 中 4 · 低 0

关于「读环境变量(配置)」:这个技能会读 process.env 之类的环境变量,但读到的都是端口、目录、超时这类配置项,没有读取密钥类变量。扫描规则原本把「读环境变量」一律算作「读凭据」,本站按变量名做了细化区分,命中明细仍如实列在下面。

逐条看命中(3 条严重或高危)
  • scripts/agent.py:120cred-envread
    falco_url = falco_url or os.environ.get("FALCO_URL", "http://localhost:8765")
  • scripts/agent.py:131cred-envread
    falco_url = falco_url or os.environ.get("FALCO_URL", "http://localhost:8765")
  • scripts/agent.py:160cred-envread
    parser.add_argument("--falco-url", default=os.environ.get("FALCO_URL", "http://localhost:8765"))

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Performing Cloud Native Forensics with Falco

When to Use

  • When conducting security assessments that involve performing cloud native forensics with falco
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Familiarity with cloud security concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Instructions

Deploy and manage Falco rules for runtime security detection in containerized

environments. Parse Falco alerts for incident response.

# 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]

Key detection rules:

  1. Shell spawn in non-interactive containers
  2. Sensitive file access (/etc/shadow, /etc/passwd)
  3. Outbound connections from unexpected containers
  4. Privilege escalation via setuid/setgid
  5. Container escape via mount or ptrace

Examples

# 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]"

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。