Communitygithub.com

分析CobaltStrike Malleable C2配置文件

使用dissect.cobaltstrike(配置文件和信标负载配置)和pyMalleableC2(AST解析)解析并分析Cobalt Strike Malleable C2配置文件,提取HTTP/DNS转换、URI、报头、休眠/抖动及注入行为,并生成网络检测签名。用于逆向已捕获的malleable配置文件或针对Cobalt Strike Beacon流量构建检测规则时。

分析CobaltStrike Malleable C2配置文件 是什么?

该技能专注于解析和分析Cobalt Strike的Malleable C2配置文件,这是一种领域特定语言脚本,用于定义Beacon与团队服务器之间的通信行为(如HTTP请求/响应转换、休眠间隔、用户代理、URI路径和进程注入方法)。通过`dissect.cobaltstrike`库,你可以解析配置文件或直接从信标负载中提取配置;而`pyMalleableC2`则提供基于AST的解析能力(基于Lark语法),支持程序化操作和验证。该技能适用于安全事件调查、检测规则构建、威胁狩猎以及SOC分析流程。它能输出包含C2 URI、HTTP头、用户代理、休眠/抖动设置、进程注入配置、生成进程路径、DNS设置以及Suricata兼容检测规则的JSON报告,帮助防御者识别伪装成Amazon、Google、Slack等合法服务的恶意C2流量。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-cobaltstrike-malleable-c2-profiles

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

分析CobaltStrike Malleable C2配置文件 是做什么的?

概述

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

使用时机

  • 调查需要分析CobaltStrike malleable C2配置文件的安全事件时
  • 为此领域构建检测规则或威胁狩猎查询时
  • SOC分析师需要此分析类型的结构化程序时
  • 验证相关攻击技术的安全监控覆盖范围时

前提条件

  • Python 3.9+ 并安装 dissect.cobaltstrike 和/或 pyMalleableC2
  • 样本Malleable C2配置文件(可从公共仓库获取)
  • 理解HTTP协议和Cobalt Strike beacon通信模型
  • 用于签名部署的网络监控工具(Suricata/Snort)
  • 用于流量验证的PCAP分析工具

步骤

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

预期输出

包含提取的C2 URI、HTTP头、用户代理、休眠/抖动设置、进程注入配置、生成进程路径、DNS设置以及生成的Suricata兼容检测规则的JSON报告。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

analyzing-docker-container-forensics

Investigate compromised Docker containers by analyzing images, layers,

相关技能