Analyzing cobaltstrike malleable c2 profiles

From killvxk/cybersecurity-skills-zh · View interactive version

Analyzing cobaltstrike malleable c2 profiles is an AI agent skill from the GitHub repository killvxk/cybersecurity-skills-zh. 使用 dissect.cobaltstrike 和 pyMalleableC2 解析分析 Cobalt Strike Malleable C2 配置文件,提取 C2 指标、检测规避技术并生成网络检测签名。

How to use this skill

Skill file

分析 CobaltStrike Malleable C2 配置文件

概述

Cobalt Strike Malleable C2 配置文件是领域专用语言脚本,用于定制 Beacon 与团队服务器的通信方式,包括 HTTP 请求/响应转换、休眠间隔、抖动值、User Agent、URI 路径和进程注入行为。威胁行为者使用 Malleable C2 配置文件将 C2 流量伪装成合法服务(Amazon、Google、Slack)。分析这些配置文件可揭示用于检测的网络指标:URI 模式、HTTP 请求头、POST/GET 转换、DNS 设置和进程注入技术。dissect.cobaltstrike 库可解析配置文件并从 beacon 载荷中提取配置,而 pyMalleableC2 使用 Lark 语法提供基于 AST 的解析,用于程序化配置文件操作和验证。

前置条件

工作流程

  1. 安装库:pip install dissect.cobaltstrike 或 pip install pyMalleableC2
  2. 使用 C2Profile.from_path("profile.profile") 解析配置文件
  3. 提取 HTTP GET/POST 块配置(URI、请求头、参数)
  4. 识别 User Agent 字符串和伪装目标
  5. 提取休眠时间、抖动百分比和 DNS beacon 设置
  6. 分析进程注入设置(注入目标进程、分配技术)
  7. 从提取的网络指标生成 Suricata/Snort 签名
  8. 将配置文件与已知威胁行为者配置文件集合对比
  9. 提取分段 URI 和载荷投递机制
  10. 生成包含 IOC 和推荐网络签名的检测报告

输出格式

JSON 报告,包含提取的 C2 URI、HTTP 请求头、User Agent、休眠/抖动设置、进程注入配置、注入目标进程路径、DNS 设置和生成的 Suricata 兼容检测规则。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.