Communitygithub.com

analyzing-cobaltstrike-malleable-c2-profiles

解析與分析 Cobalt Strike Malleable C2 設定檔,使用 dissect.cobaltstrike 與 pyMalleableC2 提取 HTTP/DNS 轉換、URI、標頭、休眠/抖動值及注入行為,並產生網路偵測特徵。適用於逆向分析擷取的 malleable 設定檔或建立針對 Cobalt Strike Beacon 流量的偵測規則。

analyzing-cobaltstrike-malleable-c2-profiles 是什麼?

此技能專精於分析 Cobalt Strike 的 Malleable C2 設定檔,這是一種領域特定語言腳本,用於自訂 Beacon 與團隊伺服器的通訊行為。它利用 dissect.cobaltstrike 函式庫解析設定檔本身,並從 Beacon 酬載中提取配置;同時結合 pyMalleableC2 進行基於 AST 的語法分析,以程式化方式操控與驗證設定。使用者可提取 HTTP 請求和回應轉換、URI 路徑、標頭、User-Agent 字串、休眠時間與抖動百分比、DNS 設定以及程序注入行為。這些資訊可用於產生 Suricata/Snort 相容的網路偵測特徵,協助 SOC 分析師建立威脅狩獵查詢、驗證安全監控覆蓋範圍,並在安全事件調查中還原攻擊者的 C2 基礎設施。該技能支援 Python 3.9+ 環境,並建議使用者具備 HTTP 協定與 Cobalt Strike Beacon 通訊模型的基礎知識。

相容平台~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 請求和回應轉換、休眠間隔、抖動值、User-Agent 字串、URI 路徑以及程序注入行為。威脅行為者利用 malleable 設定檔將 C2 流量偽裝成合法的服務(如 Amazon、Google、Slack)。分析這些設定檔可以揭示網路偵測所需的指標:URI 模式、HTTP 標頭、POST/GET 轉換、DNS 設定以及程序注入技術。dissect.cobaltstrike 函式庫能解析設定檔,並從 Beacon 酬載中提取配置;而 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. 識別 User-Agent 字串與偽裝目標
  5. 提取休眠時間、抖動百分比及 DNS Beacon 設定
  6. 分析程序注入設定(spawn-to、配置手法)
  7. 從提取的網路指標產生 Suricata/Snort 特徵
  8. 將設定檔與已知威脅行為者的設定檔集合進行比對
  9. 提取分段 URI 與酬載傳遞機制
  10. 產出包含 IOCs 與建議網路特徵的偵測報告

預期輸出

一份 JSON 報告,內容包含提取的 C2 URI、HTTP 標頭、User-Agent、休眠/抖動設定、程序注入配置、衍生程序路徑、DNS 設定,以及產生的 Suricata 相容偵測規則。

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,

相關技能