hrana36/network-ids-ips

GitHub: hrana36/network-ids-ips

基于 Suricata 和 Snort 的网络 IDS/IPS 部署实验室,提供自定义威胁检测签名、误报调优指南及自动化攻击模拟脚本。

Stars: 0 | Forks: 0

# 网络 IDS/IPS 部署与调优实验室 [![许可证](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Suricata](https://img.shields.io/badge/IDS%2FIPS-Suricata%20%7C%20Snort-orange.svg)]() [![SecOps](https://img.shields.io/badge/SecOps-Packet%20Analysis-cyan.svg)]() 基于 Suricata 和 Snort 的面向生产环境的网络入侵检测与防御系统 (IDS/IPS) 部署实验室。包含自定义签名开发、误报抑制调优以及自动化攻击模拟测试。 ## 🔍 架构与检测工作流 ``` flowchart LR Traffic["Network Tap / Mirror Port"] --> Suricata["Suricata IDS/IPS Engine"] Suricata --> Detection{"Signature Match?"} Detection -- "Yes" --> Alert["eve.json Alert Log"] Detection -- "High Severity" --> Drop["IPS Drop Packet"] Alert --> SIEM["SIEM / Log Forwarder"] ``` ## 🎯 自定义检测签名摘要 | 规则 ID (SID) | 威胁类别 | 目标协议 / 攻击向量 | 动作 | 描述 | | :--- | :--- | :--- | :--- | :--- | | `1000001` | 漏洞利用企图 | TCP / HTTP 端口 80, 443 | `drop` | 检测 SQL Injection 负载特征 (`UNION SELECT`) | | `1000002` | 恶意软件命令与控制 (C2) | TCP / 端口 4444, 5555 | `drop` | 检测交互式 Reverse Shell 握手字符串 | | `1000003` | 网络侦察 | ICMP | `alert` | 标记具有非标准负载大小的异常 ICMP echo 请求 | | `1000004` | 暴力破解攻击 | TCP / 端口 22 (SSH) | `alert` | 在 60 秒内出现 > 5 次登录失败时触发阈值警报 | ## 📁 仓库结构 ``` network-ids-ips/ ├── README.md # Lab setup and deployment instructions ├── LICENSE # MIT License ├── rules/ │ └── custom-suricata.rules # Production Suricata/Snort detection signatures ├── configs/ │ └── suricata.yaml # Tuned Suricata engine configuration ├── docs/ │ └── ids-tuning-guide.md # Suppression and threshold tuning guide └── scripts/ ├── simulate-attacks.sh # Bash attack generator (cURL, Nmap, Ping) └── simulate-attacks.ps1 # PowerShell threat test script ``` ## ⚙️ 快速开始 ### 1. 加载自定义规则 将 `rules/custom-suricata.rules` 复制到你的 Suricata 规则目录: ``` sudo cp rules/custom-suricata.rules /etc/suricata/rules/ ``` ### 2. 测试规则语法 ``` suricata -T -c configs/suricata.yaml -s rules/custom-suricata.rules ``` ### 3. 运行攻击模拟 ``` chmod +x scripts/simulate-attacks.sh ./scripts/simulate-attacks.sh ``` 在 `/var/log/suricata/eve.json` 中检查生成的警报。
标签:AI合规, CISA项目, IDS/IPS, Libemu, Metaprompt, SecOps, Suricata, 云安全架构, 应用安全, 插件系统, 现代安全运营, 网络安全, 网络流量分析, 隐私保护