目录
一、suricata介绍
1.下载安装
通过官网下载suricata,根据官网步骤进行安装。
官网地址:
https://documentation.wazuh.com/

$ sudo add-apt-repository ppa:oisf/suricata-stable
$ sudo apt-get update
$ sudo apt-get install suricata -y
$ cd /tmp/ && curl -LO https://rules.emergingthreats.net/open/suricata-6.0.8/emerging.rules.tar.gz
$ sudo tar -xvzf emerging.rules.tar.gz && sudo mv rules/*.rules /etc/suricata/rules/
$ sudo chmod 640 /etc/suricata/rules/*.rules
在/etc/suricata/suricata.yaml中进行修改配置:
HOME_NET: "<UBUNTU_IP>" #此处为本机IP地址
EXTERNAL_NET: "any"
default-rule-path: /etc/suricata/rules
rule-files:
- "*.rules" #此处该为可以匹配多条规则
# Global stats configuration
stats:
enabled: no #将原本规则中的yes该为no
# Linux high speed capture support
af-packet:
- interface: ens33 #修改本机的网卡配置
以上配置完毕后,重启suricata。
重启:
systemctl restart suricata
进入wazuh匹配文件,需将suricata加入,使wazuh代理可以读取suricata日志文件。
进入wazuh配置文件,/var/ossec/etc/ossec.conf
<ossec_config>
<localfile>
<log_format>json</log_format>
<location>/var/log/suricata/eve.json</location>
</localfile>
</ossec_config>
然后重启wazuh服务。
2.如何使用-攻击模拟
直接在wazuh服务ping端点IP。

然后查看可视化警报,可见可以检测到攻击。

使用wazuh和suricata配合可以快速的检测网络流量,扫描出攻击类型。然后进行分析流量,可以确定攻击手段,制定规则来修补漏洞。
二、wireshark流量分析
1.wireshark过滤器使用
主要分为三个区域。

抓取源IP所有数据包:ip.src == 源ip地址

筛选目的地址:ip.dst == 目的ip地址
端口筛选:tcp.dstport == 80

http请求筛选:http.request.method==GET/POST

2.wireshark其他使用
数据包搜索:在wireshark界面按"Ctrl+F",可以进行关键字搜索。

数据包还原:选中想要还原的流量包,右键选中,选择追踪流 -- TCP流/UPD流/SSL流/HTTP流。

数据提取:文件->导出对象->HTTP

总结,以上为网络学习中不可缺少的工具,如何使用是关键,以上主要介绍相关工具的使用。