0
点赞
收藏
分享

微信扫一扫

IDS&IPS-Suricata-介绍

0x01

Suricata介绍

  • Suricata安装
官方网站:https://suricata-ids.org/
官方下载:https://suricata-ids.org/download/
官方借鉴安装方法:https://redmine.openinfosecfoundation.org/projects/suricata/wiki/CentOS_Installation

安装步骤:
# 安装前准备的依赖环境包
# yum install epel-release
# sudo yum -y install gcc libpcap-devel pcre-devel libyaml-devel file-devel zlib-devel jansson-devel nss-devel libcap-ng-devel libnet-devel tar make libnetfilter_queue-devel lua-devel
# 下载Suricata
# wget http://www.openinfosecfoundation.org/download/suricata-4.1.4.tar.gz
# tar -zxvf suricata-3.1.tar.gz
# cd suricata-4.1.4
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-nfqueue --enable-lua

# make
# make install
# ldconfig

0x02

  • 通过交换机配置镜像流量
  • 启动Suricata 指定镜像好的网卡接口
suricata -c /etc/suricata/suricat.yaml -i eth3 -D
  • 配置好规则测试

0x03

  • 配置参数
mkdir /etc/suricata/
cp -a /root/suricata-4.1.4/classification.config /etc/suricata/
cp -a /root/suricata-4.1.4/reference.config /etc/suricata/
cp -a /root/suricata-4.1.4/rules /etc/suricata/
cp -a /root/suricata-4.1.4/suricata.yaml /etc/suricata/
cp -a /root/suricata-4.1.4/threshold.config /etc/suricata/

vim /etc/suricata/suricata/yaml
修改添加符合实际业务的内网ip地址即可,然后启动服务

suricata -c /etc/suricata/suricata.yaml -i enp0s8 -D

0x04

  • 查看日志记录
默认情况下不修改suricata.yaml配置文件,默认的日志目录/var/log/suricata/
在此目录下,当启动服务后会生成如下4个文件:

eve.json fast.log stats.log suricata.log

eve.json 用来查看实际命中策略的日志文件,用作后期ELK读取日志使用
fast.log 同上是记录实际命中策略的日志文件,根据不同的策略放在不同的文件
stats.log 记录Suricata的运行状态
suricata.log 服务启动成功与否的状态信息

0x05

  • 后记


Suricata 可以用作IDS,IPS,通过交换机端口镜像流量专门用作入侵检测的用途,也可以蜜罐埋点,在IDS&IPS之前部署 蜜罐埋点,让suricata接收到的流量是通过蜜罐进来的,这样就确保进来的流量定可疑流量,需要重视并观察。


迷茫的人生,需要不断努力,才能看清远方模糊的志向!

举报

相关推荐

0 条评论