| name | analyzing-cobalt-strike-malleable-profiles |
| description | 使用 pyMalleableC2 解析 Cobalt Strike 可延展 C2 配置文件,提取 Beacon 配置、HTTP 通信模式以及休眠/抖动设置。结合 JARM TLS 指纹识别在网络上检测 C2 服务器。适用于调查疑似 Cobalt Strike 基础设施或为 C2 流量构建检测签名。
|
| domain | cybersecurity |
| subdomain | security-operations |
| tags | ["analyzing","cobalt","strike","malleable"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
分析 Cobalt Strike 可延展配置文件
使用说明
使用 pyMalleableC2 库解析可延展 C2 配置文件,提取失陷指标(IOC)和检测机会。结合 JARM 指纹识别来识别 C2 服务器。
from malleablec2 import Profile
profile = Profile.from_file("amazon.profile")
print(profile.ast.pretty())
关键分析步骤:
- 解析可延展配置文件,提取 HTTP-GET/POST URI 模式
- 提取 User-Agent 字符串和自定义 Headers,用于 IDS 签名
- 识别休眠时间和抖动,用于设置 Beacon 检测阈值
- 使用 JARM 扫描可疑 IP,与已知 C2 指纹哈希进行匹配
- 将提取的 IOC 与网络流量日志进行交叉参考
示例
from malleablec2 import Profile
p = Profile.from_file("cobaltstrike.profile")
print(p)
import subprocess
result = subprocess.run(
["python3", "jarm.py", "suspect-server.com"],
capture_output=True, text=True
)
print(result.stdout)