Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add killvxk/cybersecurity-skills-zh --skill analyzing-cobalt-strike-beacon-configurationgit clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zhWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-cobalt-strike-beacon-configuration)<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-cobalt-strike-beacon-configuration"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-cobalt-strike-beacon-configuration/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-cobalt-strike-beacon-configuration"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-cobalt-strike-beacon-configuration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00055 | $0.03386 |
| Opus 5 | $0.00028 | $0.01693 |
| Sonnet 5 | $0.00011 | $0.00677 |
| Haiku 4.5 | $0.00006 | $0.00339 |
Grade A, and why
analyzing-cobalt-strike-beacon-configuration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.
分析 Cobalt Strike Beacon 配置
概述
Cobalt Strike 是一个商业对抗模拟工具,被威胁行为者广泛滥用于后渗透操作。Beacon 载荷包含嵌入式配置数据,揭示 C2 服务器地址、通信协议、休眠间隔、抖动值、Malleable C2 配置文件设置、水印标识符和加密密钥。从 PE 文件、shellcode 或内存转储中提取此配置对于事件响应人员绘制攻击者基础设施和关联攻击活动至关重要。Beacon 配置使用单字节 XOR 编码(版本 3 使用 0x69,版本 4 使用 0x2e),以类型-长度-值(TLV)格式存储在 .data 节中。
前置条件
- Python 3.9+,安装
dissect.cobaltstrike、pefile、yara-python - SentinelOne CobaltStrikeParser(
parse_beacon_config.py) - 十六进制编辑器(010 Editor、HxD)用于手动检查
- 了解 PE 文件格式和 XOR 编码
- 内存转储获取工具(Volatility3、WinDbg)
- 网络分析工具(Wireshark)用于 C2 流量关联
核心概念
Beacon 配置结构
Cobalt Strike beacon 将其配置存储为 PE 文件 .data 节中的 TLV(类型-长度-值)条目集合。无分段 beacon 使用 4 字节密钥对整个 beacon 代码进行 XOR 编码。配置集合本身使用单字节 XOR 密钥。每个 TLV 条目包含一个 2 字节的类型标识符(如 0x0001 表示 BeaconType,0x0008 表示 C2Server)、一个 2 字节长度和可变长度数据。
Malleable C2 配置文件
Beacon 配置编码了 Malleable C2 配置文件,该文件规定了 HTTP 请求/响应转换,包括 URI 路径、请求头、元数据编码(Base64、NetBIOS)和数据转换。分析这些设置可揭示 beacon 如何伪装其流量以融入合法的 Web 流量。
水印和许可证识别
每个 Cobalt Strike 许可证都会在生成的 beacon 中嵌入唯一水印(4 字节整数)。提取水印可将多个 beacon 关联到同一操作者或破解许可证。威胁情报提供商维护的已知水印数据库可将水印映射到特定威胁行为者或泄露的许可证密钥。
实操步骤
步骤 1:使用 CobaltStrikeParser 提取配置
#!/usr/bin/env python3
"""从 PE 文件或内存转储中提取 Cobalt Strike beacon 配置。"""
import sys
import json
# 使用 SentinelOne 的 CobaltStrikeParser
# pip install dissect.cobaltstrike
from dissect.cobaltstrike.beacon import BeaconConfig
def extract_beacon_config(filepath):
"""从文件解析 beacon 配置。"""
configs = list(BeaconConfig.from_path(filepath))
if not configs:
print(f"[-] 在 {filepath} 中未找到 beacon 配置")
return None
for i, config in enumerate(configs):
print(f"\n[+] Beacon 配置 #{i+1}")
print(f"{'='*60}")
settings = config.as_dict()
# 事件响应的关键字段
critical_fields = [
"SETTING_C2_REQUEST",
"SETTING_C2_RECOVER",
"SETTING_PUBKEY",
"SETTING_DOMAINS",
"SETTING_BEACONTYPE",
"SETTING_PORT",
"SETTING_SLEEPTIME",
"SETTING_JITTER",
"SETTING_MAXGET",
"SETTING_SPAWNTO_X86",
"SETTING_SPAWNTO_X64",
"SETTING_PIPENAME",
"SETTING_WATERMARK",
"SETTING_C2_VERB_GET",
"SETTING_C2_VERB_POST",
"SETTING_USERAGENT",
"SETTING_PROTOCOL",
]
for field in critical_fields:
value = settings.get(field, "N/A")
print(f" {field}: {value}")
return settings
return None
def extract_c2_indicators(config):
"""从 beacon 配置中提取可操作的 C2 指标。"""
indicators = {
"c2_domains": [],
"c2_ips": [],
"c2_urls": [],
"user_agent": "",
"named_pipes": [],
"spawn_processes": [],
"watermark": "",
}
if not config:
return indicators
# 提取 C2 域名
domains = config.get("SETTING_DOMAINS", "")
if domains:
for domain in str(domains).split(","):
domain = domain.strip().rstrip("/")
if domain:
indicators["c2_domains"].append(domain)
# 提取 User Agent
indicators["user_agent"] = str(config.get("SETTING_USERAGENT", ""))
# 提取命名管道
pipe = config.get("SETTING_PIPENAME", "")
if pipe:
indicators["named_pipes"].append(str(pipe))
# 提取注入目标进程
for arch in ["SETTING_SPAWNTO_X86", "SETTING_SPAWNTO_X64"]:
proc = config.get(arch, "")
if proc:
indicators["spawn_processes"].append(str(proc))
# 提取水印
indicators["watermark"] = str(config.get("SETTING_WATERMARK", ""))
return indicators
if __name__ == "__main__":
if len(sys.argv) < 2:
print(f"用法:{sys.argv[0]} <beacon_file_or_dump>")
sys.exit(1)
config = extract_beacon_config(sys.argv[1])
if config:
indicators = extract_c2_indicators(config)
print(f"\n[+] 提取的 C2 指标:")
print(json.dumps(indicators, indent=2))
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 361 lines · 55 tokens per session scan A 576cfe711a71
analyzing-cobalt-strike-beacon-configuration is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (45 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 3,386 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
analyzing-cobalt-strike-beacon-configuration
Extract and analyze Cobalt Strike beacon configuration from PE files and memory dumps to identify C2 infrastructure, malleable profiles, and operator tradecraft.
analyzing-cobalt-strike-beacon-configuration
Use when extract and analyze Cobalt Strike beacon configuration from PE files and memory dumps to identify C2 infrastructure, malleable profiles, and operator tradecraft. Use when working with analyzing cobalt strike beacon configuration.
analyzing-cobalt-strike-beacon-configuration
Extract and analyze Cobalt Strike beacon configuration from PE files and memory dumps to identify C2 infrastructure, malleable profiles, and operator tradecraft.
analyzing-cobalt-strike-beacon-configuration
Extract and analyze Cobalt Strike beacon configuration from PE files and memory dumps to identify C2 infrastructure, malleable profiles, and operator tradecraft.
analyzing-cobalt-strike-beacon-configuration
Extract and analyze Cobalt Strike beacon configuration from PE files and memory dumps to identify C2 infrastructure, malleable profiles, and operator tradecraft.
analyzing-cobalt-strike-beacon-configuration
Extract and analyze Cobalt Strike beacon configuration from PE files and memory dumps to identify C2 infrastructure, malleable profiles, and operator tradecraft.