前言
Suricata是高性能IDS/IPS,检测网络入侵行为。
一、安装
sudo apt install suricata
sudo suricata-update
sudo systemctl enable suricata
二、规则编写
# 检测SSH暴力破解
alert ssh any any -> $HOME_NET 22 (msg:"SSH Brute Force"; threshold:type both, track by_src, count 5, seconds 60; sid:1000001; rev:1;)
# 检测SQL注入尝试
alert http any any -> $HOME_NET 80 (msg:"SQL Injection Attempt"; content:"union select"; nocase; sid:1000002; rev:1;)
三、EVE JSON输出
# suricata.yaml
outputs:
- eve-log:
enabled: yes
filetype: regular
filename: eve.json
types: [alert, http, dns, tls]
总结
Suricata是开源IDS的首选。如需服务,欢迎联系17老师。
关于17老师:AI应用·数字化管理·全栈开发·网络安全全栈专家。邮箱:j.d88888888@qq.com 微信:AFIST17