detecting-beaconing-patterns-with-zeek

对 Zeek conn.log 连接间隔进行统计分析,检测 C2 信标(Beaconing)模式。使用 ZAT 库将 Zeek 日志加载到 Pandas DataFrame,计算到达时间间隔标准差,标记具有低抖动(Low Jitter)的周期性连接。适用于在网络数据中狩猎命令与控制(C2)回调行为。

9 stars

Best use case

detecting-beaconing-patterns-with-zeek is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

对 Zeek conn.log 连接间隔进行统计分析,检测 C2 信标(Beaconing)模式。使用 ZAT 库将 Zeek 日志加载到 Pandas DataFrame,计算到达时间间隔标准差,标记具有低抖动(Low Jitter)的周期性连接。适用于在网络数据中狩猎命令与控制(C2)回调行为。

Teams using detecting-beaconing-patterns-with-zeek should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/detecting-beaconing-patterns-with-zeek/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/detecting-beaconing-patterns-with-zeek/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/detecting-beaconing-patterns-with-zeek/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How detecting-beaconing-patterns-with-zeek Compares

Feature / Agentdetecting-beaconing-patterns-with-zeekStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

对 Zeek conn.log 连接间隔进行统计分析,检测 C2 信标(Beaconing)模式。使用 ZAT 库将 Zeek 日志加载到 Pandas DataFrame,计算到达时间间隔标准差,标记具有低抖动(Low Jitter)的周期性连接。适用于在网络数据中狩猎命令与控制(C2)回调行为。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 使用 Zeek 检测信标模式

## 使用说明

使用 ZAT(Zeek 分析工具)加载 Zeek conn.log 数据,按源/目标对分组连接,并计算时序统计信息以识别信标行为。

```python
from zat.log_to_dataframe import LogToDataFrame
import numpy as np

log_to_df = LogToDataFrame()
conn_df = log_to_df.create_dataframe('/path/to/conn.log')

# 按源/目标对分组并计算到达时间间隔
for (src, dst), group in conn_df.groupby(['id.orig_h', 'id.resp_h']):
    times = group['ts'].sort_values()
    intervals = times.diff().dt.total_seconds().dropna()
    if len(intervals) > 10:
        std_dev = np.std(intervals)
        mean_interval = np.mean(intervals)
        # 相对于均值标准差低 = 可能是信标行为
```

关键分析步骤:
1. 使用 ZAT LogToDataFrame 将 Zeek conn.log 解析为 DataFrame
2. 按源 IP 和目标 IP 对分组连接
3. 计算连续连接之间的到达时间间隔
4. 计算标准差和变异系数
5. 将变异系数低的对标记为潜在信标

## 示例

```python
from zat.log_to_dataframe import LogToDataFrame
log_to_df = LogToDataFrame()
df = log_to_df.create_dataframe('conn.log')
print(df[['id.orig_h', 'id.resp_h', 'ts', 'duration']].head())
```

Related Skills

performing-network-traffic-analysis-with-zeek

9
from killvxk/cybersecurity-skills-zh

部署 Zeek 网络安全监控器,捕获、解析和分析网络流量元数据,用于威胁检测、异常识别和取证调查。

hunting-for-dns-tunneling-with-zeek

9
from killvxk/cybersecurity-skills-zh

通过分析 Zeek dns.log 中的高熵子域名查询、超量查询量、超长查询长度以及异常 DNS 记录类型,检测 DNS 隧道和数据外泄中的隐蔽通道通信。适用于:当需要狩猎基于 DNS 的 C2 或数据外泄通道、调查异常 DNS 查询模式、或响应涉及 DNS 隧道工具(iodine、dnscat2、DNSExfiltrator)的威胁情报时使用。

hunting-for-command-and-control-beaconing

9
from killvxk/cybersecurity-skills-zh

通过频率分析、抖动检测和域名信誉评估,检测网络流量中的 C2 信标(Beaconing)模式,识别与攻击者基础设施通信的失陷终端。

hunting-for-beaconing-with-frequency-analysis

9
from killvxk/cybersecurity-skills-zh

通过对网络流量应用统计频率分析、抖动计算和变异系数评分,识别命令与控制(C2)信标模式,检测被攻陷终端的周期性回调行为。

detecting-wmi-persistence

9
from killvxk/cybersecurity-skills-zh

通过分析 Sysmon 事件 ID 19、20 和 21 中的恶意 EventFilter、EventConsumer 和 FilterToConsumerBinding 创建,检测 WMI 事件订阅持久化。

detecting-t1548-abuse-elevation-control-mechanism

9
from killvxk/cybersecurity-skills-zh

通过监控注册表修改、进程提升标志和异常的父子进程关系,检测提升控制机制滥用,包括 UAC 绕过、sudo 利用和 setuid/setgid 操纵。

detecting-t1055-process-injection-with-sysmon

9
from killvxk/cybersecurity-skills-zh

通过分析 Sysmon 事件中的跨进程内存操作、远程线程创建和异常 DLL 加载模式,检测进程注入技术(T1055),包括经典 DLL 注入、进程镂空和 APC 注入。

detecting-t1003-credential-dumping-with-edr

9
from killvxk/cybersecurity-skills-zh

利用 EDR 遥测数据、Sysmon 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。

detecting-suspicious-powershell-execution

9
from killvxk/cybersecurity-skills-zh

检测可疑的 PowerShell 执行模式,包括编码命令、下载器(download cradles)、AMSI 绕过尝试以及受限语言模式规避。

detecting-suspicious-oauth-application-consent

9
from killvxk/cybersecurity-skills-zh

使用 Microsoft Graph API、审计日志和权限分析,检测 Azure AD / Microsoft Entra ID 中的高风险 OAuth 应用授权同意,识别非法同意授权攻击。

detecting-supply-chain-attacks-in-ci-cd

9
from killvxk/cybersecurity-skills-zh

扫描 GitHub Actions 工作流和 CI/CD 流水线配置,检测供应链攻击(Supply Chain Attack)向量, 包括未固定的 Action 版本、通过表达式的脚本注入、依赖混淆(Dependency Confusion)和密钥泄露。 使用 PyGithub 和 YAML 解析进行自动化审计。适用于加固 CI/CD 流水线或调查被攻击的构建系统。

detecting-stuxnet-style-attacks

9
from killvxk/cybersecurity-skills-zh

本技能涵盖检测遵循Stuxnet攻击模式的复杂网络物理攻击——在修改PLC逻辑的同时欺骗传感器读数以向操作员隐藏操控行为。内容涉及PLC逻辑完整性监控、基于物理的过程异常检测、工程师工作站入侵指标、USB传播攻击向量,以及从IT到OT横向移动直至过程操控的多阶段攻击链检测。