activecm/docker-zeek

GitHub: activecm/docker-zeek

在 Docker 中运行多进程 Zeek 集群的容器化网络安全监控方案,支持高性能抓包、TLS 指纹识别和离线 PCAP 分析。

Stars: 63 | Forks: 21

# docker-zeek 在 Docker 中运行多进程 [Zeek](https://zeek.org/) 集群。 [![Release](https://img.shields.io/github/v/release/activecm/docker-zeek)](https://github.com/activecm/docker-zeek/releases/latest) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/68c25bb00b184430.svg)](https://github.com/activecm/docker-zeek/actions/workflows/ci.yml) [![Docker Pulls](https://img.shields.io/docker/pulls/activecm/zeek)](https://hub.docker.com/r/activecm/zeek) [![License](https://img.shields.io/github/license/activecm/docker-zeek)](LICENSE) ## 包含内容 该 Docker 镜像包含: - 支持 AF_Packet 的多进程 zeekctl 集群 - worker 崩溃时的自动进程恢复 - [ja3](https://github.com/salesforce/ja3) 和 [ja4+](https://github.com/FoxIO-LLC/ja4) TLS 指纹识别 - 用于记录长连接的 [zeek-open-connections](https://github.com/activecm/zeek-open-connections) ## 快速开始 需要安装 [Docker](https://docs.docker.com/get-docker/)。 从 [最新版本](https://github.com/activecm/docker-zeek/releases/latest) 下载适用于您架构的 CLI,然后: ``` tar xzf zeek-linux-amd64.tar.gz sudo mv zeek /usr/local/bin/zeek zeek start ``` 首次运行时,CLI 会提示您选择网络接口和 worker 进程数量。Zeek 日志将写入 `/opt/zeek/logs/`。 ## 用法 ### 命令 ``` zeek start Start the Zeek container zeek stop Stop the Zeek container zeek restart Restart the Zeek container zeek status Show container and process status zeek update Pull the latest image and restart zeek enable Start Zeek on boot zeek disable Stop Zeek from starting on boot zeek readpcap Process a pcap file offline ``` ### 处理 Pcap ``` zeek readpcap /path/to/capture.pcap [output-dir] ``` 日志默认存储在 `/opt/zeek/manual-logs/`。 ### 传感器设置 要重新运行接口选择向导: ``` sudo rm /opt/zeek/etc/node.cfg zeek start ``` ### 安装 Zeek 包 ``` docker exec -it zeek zkg install hassh zeek restart ``` ### 自定义 Zeek 脚本 将 `.zeek` 文件放入自动加载(autoload)目录。它们会按字母顺序包含进来,在容器启动时构建 `local.zeek`。`local.zeek` 每次容器启动时都会重新生成,因此请勿直接编辑它。 ``` sudo cp custom.zeek /opt/zeek/share/zeek/site/autoload/210-custom.zeek zeek restart ``` ## 日志 Zeek 日志写入 `/opt/zeek/logs/`(如果自定义,则为 `$ZEEK_TOP_DIR/logs/`)。日志按小时轮转,并组织在带有日期戳的目录中。 ## 配置 ### 主机目录 Zeek 文件默认位于 `/opt/zeek/`。可通过以下方式更改: ``` export ZEEK_TOP_DIR=/your/path ``` ### 镜像版本 CLI 会拉取其构建时对应的 Docker 镜像版本。要使用不同的[已发布版本](https://hub.docker.com/r/activecm/zeek/tags): ``` export ZEEK_RELEASE=8.0.6 ``` ## 开发 ``` make build # build the CLI make test # run unit tests make test-integration # run integration tests (requires Docker) make lint # run linter make docker-build # build the Docker image make release # build release artifacts ```
标签:AF_Packet, Cutter, Docker, EVTX分析, JA3, JA4, NIDS, NIDS, PB级数据处理, pcap, Radare2, Rootkit, TLS指纹, Zeek, Zeekctl, 二进制发布, 传感器, 多架构支持, 安全运维, 安全防御评估, 容器化, 容器化, 开源工具, 网络安全, 被动侦查, 请求拦截, 防御绕过, 隐私保护