aanya17/waf-analytics

GitHub: aanya17/waf-analytics

一款轻量级的 Web 应用防火墙分析仪表盘,提供实时威胁检测、日志监控和规则健康评估功能。

Stars: 0 | Forks: 0

Typing SVG
![WAF 分析](https://img.shields.io/badge/WAF-Analytics-00D4FF?style=for-the-badge&logo=shield&logoColor=white) ![Python](https://img.shields.io/badge/Python-3.14-3776AB?style=for-the-badge&logo=python&logoColor=white) ![Flask](https://img.shields.io/badge/Flask-3.0.0-000000?style=for-the-badge&logo=flask&logoColor=white) ![React](https://img.shields.io/badge/React-18.2-61DAFB?style=for-the-badge&logo=react&logoColor=black) ![Vercel](https://img.shields.io/badge/Deployed-Vercel-000000?style=for-the-badge&logo=vercel&logoColor=white)
[![在线演示](https://img.shields.io/badge/🚀%20Live%20Demo-waf--analytics--kisz.vercel.app-00D4FF?style=for-the-badge)](https://waf-analytics-kisz.vercel.app) [![GitHub](https://img.shields.io/badge/GitHub-aanya17%2Fwaf--analytics-181717?style=for-the-badge&logo=github)](https://github.com/aanya17/waf-analytics)
## ✨ 功能
### 🛡️ 安全仪表盘 实时统计卡片 + 4 个交互式图表 — 流量时间线、协议分布、热门 IP 和防火墙健康评分 ### 📡 实时监控 流式防火墙日志查看器,带有雷达脉冲动画,每 2 秒自动刷新,配备暂停/过滤控件 ### ⚠️ 威胁检测 高/中/低严重程度分类,并包含攻击类型细分 — SQL 注入、XSS、暴力破解、DDoS、端口扫描、路径遍历 ### 🔥 防火墙规则健康状况 为每条防火墙规则提供独特的健康评分算法,包含使用情况统计、命中次数和自动建议 ### 📊 报告与 NIST CSF 可下载的 CSV + 安全报告,提供完整的 NIST 网络安全框架映射(识别 → 保护 → 检测 → 响应 → 恢复) ### ⚡ 全面部署 通过 GitHub → Vercel 进行 CI/CD · 启用 CORS 的 REST API · 无需数据库
## 🗂️ 项目结构 waf-analytics/ ## ├── backend/ │ ├── app.py # Flask API — 6 个 REST endpoint │ ├── requirements.txt # flask, flask-cors │ └── vercel.json # Vercel Python 配置 ├── frontend/ │ ├── src/ │ │ ├── components/ │ │ │ └── Sidebar.jsx # 导航 + 实时时钟 │ │ ├── pages/ │ │ │ ├── Dashboard.jsx # 统计 + 4 个图表 │ │ │ ├── LiveMonitor.jsx # 流式日志表 │ │ │ ├── ThreatDetection.jsx │ │ │ ├── FirewallRules.jsx │ │ │ └── Reports.jsx │ │ ├── App.jsx │ │ └── index.css │ ├── index.html │ └── package.json └── README.md ## 🚀 快速开始 ``` # 克隆 git clone https://github.com/aanya17/waf-analytics.git cd waf-analytics # 后端 (Terminal 1) cd backend pip install -r requirements.txt python app.py # → http://localhost:5000 # 前端 (Terminal 2) cd frontend npm install npm run dev # → http://localhost:5173 ``` ## 🛰️ API Endpoint | Endpoint | 描述 | |----------|-------------| | `GET /api/stats` | 仪表盘统计 — 总计、允许、拒绝、威胁、健康评分 | | `GET /api/logs` | 实时防火墙日志流(最近 30 条记录) | | `GET /api/threats` | 检测到的威胁及严重程度分类 | | `GET /api/rules` | 防火墙规则健康评分 + 建议 | | `GET /api/timeline` | 24 小时流量时间线数据 | ## 🗺️ NIST 网络安全框架映射 | NIST 功能 | 实现方式 | |---------------|----------------| | 🔍 **识别 (IDENTIFY)** | 资产和流量分析 — 所有受监控的 IP 和请求计数 | | 🛡️ **保护 (PROTECT)** | 防火墙规则评估与健康评分 | | 🚨 **检测 (DETECT)** | 具有严重程度分类的实时威胁检测引擎 | | ⚡ **响应 (RESPOND)** | 实时警报、威胁通知、可疑事件标记 | | 📋 **恢复 (RECOVER)** | 可下载的报告和完整的历史审计跟踪 | ## 🧰 技术栈 | 层级 | 技术 | 版本 | |-------|-----------|---------| | 后端 | Python + Flask | 3.14 / 3.0.0 | | CORS | flask-cors | 4.0.0 | | 前端 | React + Vite | 18.2 / 5.0 | | 图表 | Recharts | 2.10.3 | | 字体 | Inter + JetBrains Mono | — | | 部署 | Vercel | — | | CI/CD | GitHub 自动部署 | — | ## 👩‍💻 作者
**Aanya Chahal** · **Ayushi Mishra** *B.Tech CSE — UPES Dehradun · 2023–2027 届* *IBM SkillsBuild 暑期实习 · NETCRYPT 2026*
![构建自](https://img.shields.io/badge/Built%20with-❤️%20and%20too%20many%20tabs-FF4757?style=for-the-badge)
标签:CISA项目, Flask, NIST CSF, React, Syscalls, Ubuntu, WAF分析, 安全监控大屏, 实时威胁检测, 自定义脚本, 逆向工具