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

implementing-cloud-workload-protection

Implements cloud workload protection using boto3 and google-cloud APIs

执行命令读凭据写文件严重 3 · 高危 2mukul975/Anthropic-Cybersecurity-Skills

它会碰到什么

扫了多少4 个文本文件,22 KB
它会碰到什么执行命令读凭据写文件
命中总数6 处
命中统计严重 3 · 高 2 · 中 1 · 低 0
逐条看命中(5 条严重或高危)
  • 严重 references/api-reference.md:45persistence
    | Cron persistence | `crontab -l; ls /etc/cron.d/` |
  • 严重 references/api-reference.md:59cred-paths
    - SSM Run Command: https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html
  • 严重 references/api-reference.md:61cred-paths
    - GuardDuty: https://docs.aws.amazon.com/guardduty/latest/ug/
  • scripts/agent.py:144cred-envread
    parser.add_argument("--profile", default=os.getenv("AWS_PROFILE"))
  • scripts/agent.py:145cred-envread
    parser.add_argument("--region", default=os.getenv("AWS_DEFAULT_REGION", "us-east-1"))

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

技能内容

Implementing Cloud Workload Protection

When to Use

  • When deploying or configuring implementing cloud workload protection capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

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

Monitor cloud workloads for runtime threats by checking process lists, network

connections, file integrity, and resource utilization anomalies.

import boto3

ssm = boto3.client("ssm")
# Run command on EC2 instances to check for suspicious processes
response = ssm.send_command(
    InstanceIds=["i-1234567890abcdef0"],
    DocumentName="AWS-RunShellScript",
    Parameters={"commands": ["ps aux | grep -E 'xmrig|minerd|cryptonight'"]},
)

Key protection areas:

  1. Process monitoring for cryptominers and reverse shells
  2. File integrity monitoring on critical system files
  3. Network connection auditing for C2 callbacks
  4. Resource utilization anomaly detection (CPU spikes)
  5. Unauthorized binary detection via hash comparison

Examples

# Check for unauthorized outbound connections
ssm.send_command(
    InstanceIds=instances,
    DocumentName="AWS-RunShellScript",
    Parameters={"commands": ["ss -tlnp | grep ESTABLISHED"]},
)

想直接用这个技能?

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