EshwarReddyD7/sentinelids
GitHub: EshwarReddyD7/sentinelids
结合签名规则与 IsolationForest 异常检测的混合入侵检测系统,对网络流量进行实时或回放分析并输出带 MITRE ATT&CK 标签的告警。
Stars: 0 | Forks: 0
# SentinelIDS
混合签名与机器学习(ML)的入侵检测系统。结合了类似 Snort 的规则匹配与基于 NetFlow 特征的 `IsolationForest` 异常检测器。重放 pcap 文件或输入实时流量,即可查看带有 MITRE ATT&CK 标签的告警。
  
## 功能特性
- 支持 YAML 签名规则,语法为 `alert proto src_ip src_port -> dst_ip dst_port`
- 基于包速率、字节量和端口熵的异常检测模型(IsolationForest)
- 每条告警附带 MITRE ATT&CK 技术标签
- FastAPI 告警流 + CLI 重放
## 架构
```
flowchart LR
pcap[(pcap / live flows)] --> eng[Detection Engine]
rules[(YAML rules)] --> eng
model[(IsolationForest)] --> eng
eng --> alerts[Alert Bus]
alerts --> api[FastAPI /alerts]
alerts --> store[(SQLite)]
```
## 快速入门
```
docker compose up --build
# 重放一次示例攻击
docker exec sentinelids-api python -m src.cli replay tests/fixtures/scan.csv
```
## 使用方法
```
from src.engine import Engine
e = Engine.from_files("rules/default.yaml")
for alert in e.process_flow({"src":"10.0.0.1","dst":"10.0.0.2","sport":12345,"dport":22,"proto":"TCP","bytes":40,"packets":1,"flags":"S"}):
print(alert)
```
## 许可证
MIT
标签:Apex, AV绕过, CISA项目, Cloudflare, FastAPI, IP 地址批量处理, IsolationForest, MIT License, MITRE ATT&CK, NetFlow, pcap分析, Python, SQLite, YAML规则, 入侵检测系统, 威胁情报, 孤立森林, 安全数据湖, 安全研究社区, 开发者工具, 开发者评论分析, 开源安全工具, 异常检测, 恶意代码分类, 报警管理, 插件系统, 数据包重放, 无后门, 机器学习, 混合检测, 端口扫描检测, 签名检测, 网络安全, 网络流量分析, 规则匹配, 请求拦截, 逆向工具, 逆向工程平台, 隐私保护