入侵检测系统:Suricata部署与规则编写

17老师 · 2025-12-30 · 阅读约11分钟

← 返回博客列表

前言

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
上一篇
Linux防火墙
下一篇
MES系统开发