跳到正文
Skillpedia
分析与电子表格35k · #8271

performing-network-traffic-analysis-with-zeek

它能做什么

Zeek 是一款程序,可以监控你电脑的网络流量,并生成详细的报告,说明网络中正在发生什么。它有助于发现可疑活动或网络问题。

适用场景

  • ✓需要实时监控网络安全状况时。
  • ✓调查安全事件或异常活动时。
  • ✓进行安全审计和控制测试时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-network-traffic-analysis-with-zeek/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-network-traffic-analysis-with-zeek/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“分析我的网络流量,告诉我是否有可疑之处。”

每周 5 个新技能,1 分钟读完。

工作原理

Zeek 会观察在网络中传输的数据包。它能识别不同类型的通信(例如网页浏览或电子邮件),并生成结构化日志,详细记录每个连接和协议的信息。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Performing Network Traffic Analysis with Zeek

Overview

Zeek (formerly Bro) is an open-source network analysis framework that operates as a passive network security monitor. Unlike traditional signature-based IDS tools, Zeek generates high-fidelity structured logs from observed network traffic, capturing detailed metadata for protocols including HTTP, DNS, TLS, SSH, SMTP, FTP, and dozens more. Zeek's extensible scripting language enables custom detection logic, behavioral analysis, and automated response. This skill covers deploying Zeek, understanding its log architecture, writing custom detection scripts, and integrating outputs with SIEM platforms.

When to Use

  • When conducting security assessments that involve performing network traffic analysis with zeek
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Linux server (Ubuntu 22.04+ or CentOS 8+) with 4+ CPU cores and 8GB+ RAM
  • Network TAP or SPAN port mirroring configured for traffic capture
  • Zeek 6.0+ installed (via package manager or source compilation)
  • Root or capture group privileges for packet capture
  • SIEM platform (Splunk, ELK Stack, or QRadar) for log ingestion

Core Concepts

Zeek Architecture

Zeek operates in two main modes:

  1. Live Capture - Monitors traffic in real-time on one or more network interfaces
  2. Offline Analysis - Processes saved PCAP files for retrospective analysis

The processing pipeline consists of:

  • Packet Capture Layer - Reads raw packets from interfaces or PCAP files
  • Event Engine - Reassembles TCP streams and generates protocol events
  • Script Interpreter - Executes Zeek scripts that process events and generate logs
  • Log Framework - Writes structured logs in TSV, JSON, or custom formats

Log Architecture

Zeek generates protocol-specific log files:

Log File Description
conn.log TCP/UDP/ICMP connection summaries with duration, bytes, state
dns.log DNS queries and responses with query type, answers, TTL
http.log HTTP requests/responses with URIs, user agents, MIME types
ssl.log TLS handshake details including certificate chain, JA3/JA3S
files.log File transfers with MIME types, hashes (MD5, SHA1, SHA256)
notice.log Alerts generated by Zeek detection scripts
weird.log Protocol anomalies and unexpected behaviors
x509.log Certificate details from TLS connections
smtp.log Email metadata including sender, recipient, subject
ssh.log SSH connection details and authentication results
pe.log Portable Executable file metadata
dpd.log Dynamic Protocol Detection failures

Workflow

Step 1: Install and Configure Zeek

# Install Zeek on Ubuntu
sudo apt-get install -y zeek

# Or install from Zeek repository
echo 'deb http://download.opensuse.org/repositories/security:/zeek/xUbuntu_22.04/ /' | \
    sudo tee /etc/apt/sources.list.d/zeek.list
sudo apt-get update && sudo apt-get install -y zeek-lts

# Verify installation
zeek --version

Configure the node layout in /opt/zeek/etc/node.cfg:

[manager]
type=manager
host=localhost

[proxy-1]
type=proxy
host=localhost

[worker-1]
type=worker
host=localhost
interface=eth0
lb_method=pf_ring
lb_procs=4

[worker-2]
type=worker
host=localhost
interface=eth1
lb_method=pf_ring
lb_procs=4

Configure network definitions in /opt/zeek/etc/networks.cfg:

# Internal network ranges
10.0.0.0/8         Private RFC1918
172.16.0.0/12      Private RFC1918
192.168.0.0/16     Private RFC1918

Step 2: Configure Logging and Output

Edit /opt/zeek/share/zeek/site/local.zeek:

# Load standard detection scripts
@load base/protocols/conn
@load base/protocols/dns
@load base/protocols/http
@load base/protocols/ssl
@load base/protocols/ssh
@load base/protocols/smtp
@load base/protocols/ftp

# Load file analysis
@load base/files/hash-all-files
@load base/files/extract-all-files

# Load detection frameworks
@load base/frameworks/notice
@load base/frameworks/intel
@load base/frameworks/files
@load base/frameworks/software

# Load additional protocol analyzers
@load policy/protocols/ssl/validate-certs
@load policy/protocols/ssl/log-hostcerts-only
@load policy/protocols/ssh/detect-bruteforcing

…
常见问题

什么是“结构化日志”?

这些是有组织的日志文件,类似表格,包含网络流量的具体信息,便于分析。

Zeek 会拦截恶意活动吗?

Zeek 专注于监控和生成告警。它不会直接拦截流量,而是为其他工具或管理员提供信息,由他们采取行动。

使用 Zeek 需要技术基础吗?

初次设置和基础分析需要一定的技术知识。不过,它生成的数据可以由安全专业人员进一步解读。

详情

作者的原始描述

Deploy Zeek (formerly Bro) as a passive network security monitor to generate structured logs of protocol metadata (HTTP, DNS, TLS, SSH, SMTP, FTP, and more), write custom detection scripts, and integrate outputs with SIEM platforms. Use when standing up continuous, high-fidelity network traffic monitoring for threat detection, anomaly identification, or forensic investigation beyond what raw PCAP

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#8271
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能