

The Zeek Network Security Monitor:A powerful framework for network traffic analysis and security monitoring.
Zeek网络安全监控:是一款强大的网络流量分析和安全监控的框架 。

https://github.com/zeek/zeek
https://docs.zeek.org/
https://linux.cn/article-14770-1.html
http://www.senlt.cn/article/171944181.html
https://blog.csdn.net/u013613428/article/details/110728269
在阅读过《将 Zeek 与 ELK 栈集成》的这篇文章后 https://linux.cn/article-14770-1.html

决定尝试是否可以将zeek的网络流量监控日志吐到GrayLog,并在GrayLog上进行呈现
具体实现思路,以及要解决的问题汇总
具体实践过程如下
https://zeek.org/get-zeek/
由于网速问题,我这边手动提前下载好zeek相关的rpm依赖包




yum localinstall *.rpm
echo "PATH=$PATH:/opt/zeek/bin" >> /etc/profile
source /etc/profile
echo $PATH
ifconfig ens33 promisc
交换机配置镜像流量的操作这里就不做演示,请参考这个链接中的文章自行探索,根据自身实际网络环境自行解决
https://blog.csdn.net/u013613428/article/details/110728269



cd /opt/zeek/etc
vim node.cfg
修改interface为当前实际网卡

cd /opt/zeek/share/zeek/site/
vim local.zeek
如下位置添加以下行:
@load policy/tuning/json-logs.zeek

zeekctl
[ZeekControl] > deploy

cd /opt/zeek/logs/
cd current/
ll
目前均为json格式日志

https://github.com/Graylog2/collector-sidecar/releases
https://mirrors.cloud.tencent.com/elasticstack/7.x/yum/7.10.2/filebeat-7.10.2-x86_64.rpm
rpm -ivh filebeat-7.10.2-x86_64.rpm
rpm -ivh graylog-sidecar-1.3.0-1.x86_64.rpm


vim /etc/graylog/sidecar/sidecar.yml
并修改如下5处的配置
server_url: "http://192.168.31.170:9000/api/"
server_api_token: "hkoa0tv9gl9u09drhtckjbdv90v98v5mor5jropo0p0741oib3g"
node_name: "zeek"
update_interval: 10
send_status: true


graylog-sidecar -service install
graylog-sidecar -service start




防火墙开放5044端口
firewall-cmd --permanent --zone=public --add-port=5044/tcp
firewall-cmd --reload






链接:https://share.weiyun.com/knIqb1EA 密码:bk2un9
zeek流量日志如果可以的话,可以与微步API接口进行关联查询,这样可以实现异常DNS等其他流量检测与告警
参考之前的文章
GrayLog使用HTTP JSONPath方式调用微步在线云API识别威胁IP

本文分享自 WalkingCloud 微信公众号,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!