wjhcd145/FirewallSentinel

GitHub: wjhcd145/FirewallSentinel

一款基于 Python asyncio 构建的 WAF 检测工具,通过多阶段指纹分析和 Payload 探测识别 40 余种 Web 应用防火墙。

Stars: 0 | Forks: 0

# 🛡️ FirewallSentinel ### 适用于 Kali Linux 的高级网站防火墙 (WAF) 检测工具 ![FirewallSentinel](https://static.pigsec.cn/wp-content/uploads/repos/cas/bb/bbb4370405b8dd3a44c0a6b91c6aa284132bc9e95d6ca8ceaf41744e43877bba.png) [![Python](https://img.shields.io/badge/Python-3.8+-blue?logo=python&logoColor=white)](https://www.python.org/) [![PyQt5](https://img.shields.io/badge/GUI-PyQt5-green?logo=qt&logoColor=white)](https://www.riverbankcomputing.com/software/pyqt/) [![Platform](https://img.shields.io/badge/Platform-Kali%20Linux%20%7C%20Linux-orange?logo=linux&logoColor=white)](https://www.kali.org/) [![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE) [![WAF 检测](https://img.shields.io/badge/WAFs-40%2B-red?logo=firewall&logoColor=white)](#-detectable-wafs) ## 📋 概述 **FirewallSentinel** 是一款高级的**网站防火墙检测工具**,能够识别保护 Web 目标的 Web 应用防火墙 (WAF)、CDN 防护层和安全设备。它基于**定制的 asyncio 检测引擎**构建,可执行**多阶段分析**,包括 HTTP 标头指纹识别、cookie 分析、恶意 payload 探测以及响应代码分析。 ## ✨ 核心功能 ### 🎯 多阶段检测引擎 - **阶段 1:** 基线 HTTP 请求分析 - **阶段 2:** 安全标头指纹识别 (Server, X-Powered-By, Via, X-CDN 等) - **阶段 3:** WAF 特征匹配 (37+ 种 WAF 产品) - **阶段 4:** 恶意 payload 探测 (SQLi, XSS, LFI, RCE, XXE, Log4Shell) - **阶段 5:** 被拦截的响应分析 - **阶段 6:** 技术栈检测 - **阶段 7:** 置信度评分裁定 ### 🔍 检测方法 - **标头分析** — Server, CF-Ray, X-Sucuri-ID, X-Akamai, X-CDN 等 - **Cookie 指纹识别** — __cfduid (Cloudflare), incap_ses (Imperva), BIGipServer (F5) - **Payload 探测** — 发送 10 个攻击 payload (SQLi, XSS, LFI, RCE) 以触发 WAF - **响应代码分析** — 检测拦截代码 (403, 406, 418, 429, 503, 999) - **内容匹配** — 扫描 WAF 拦截页面 (Cloudflare, ModSecurity 等) ### 🛡️ 可检测的 WAF (40+) | 类别 | WAF | |---|---| | **Cloud CDN/WAF** | Cloudflare, Akamai, Imperva Incapsula, AWS WAF, Sucuri, Fastly, Azure Front Door, Google Cloud Armor | | **网络 WAF** | F5 BIG-IP ASM, Citrix NetScaler, Fortinet FortiWeb, Barracuda, Cisco ACE, Palo Alto, SonicWall | | **应用 WAF** | ModSecurity, Signal Sciences, DenyALL, Art of Defence HyperGuard | | **WordPress WAF** | Wordfence, WebARX, WP Cerber, iThemes Security | | **DDoS/Bot 防护** | DDoS-Guard, Qrator, Radware, Distil Networks, BlockDoS | | **CDN Edge** | StackPath, KeyCDN, CDN77, Edgecast, ChinaCache, ArvanCloud, Zenedge, Reblaze | ### 💾 报告 - **JSON 导出** — 包含所有证据的完整结构化数据 - **HTML 报告** — 带有裁定、证据、标头和 payload 的深色主题精美报告 - **TXT 报告** — 用于快速参考的纯文本摘要 ## 🚀 安装 ``` git clone https://github.com/wjhcd145/FirewallSentinel.git cd FirewallSentinel chmod +x install.sh ./install.sh ``` ## 💻 用法 ### 🔥 CLI 模式(推荐) ![展示 WAF 检测结果的 FirewallSentinel CLI](https://static.pigsec.cn/wp-content/uploads/repos/cas/72/7269ee574a6af788fca6eb5e97583fb8324cc1846819882c3284d452efc95431.png) ``` # 交互模式 python3 cli.py # 快速单行扫描 python3 cli.py -t example.com python3 cli.py -t https://target.com python3 cli.py -t target.com --export json python3 cli.py -t target.com --timeout 30 # 列出可检测的 WAFs python3 cli.py --list-wafs # 列出攻击 payloads python3 cli.py --list-payloads ``` #### CLI 标志 | 标志 | 描述 | |---|---| | `-t, --target` | 目标 URL (例如:example.com) | | `--timeout` | 请求超时时间(秒)(默认:15) | | `-e, --export` | 导出格式:json, html, txt | | `--list-wafs` | 列出所有 40+ 种可检测的 WAF | | `--list-payloads` | 列出所有攻击 payload | | `-i` | 交互模式(默认) | ### 🖥️ GUI 模式 ``` ./run.sh ``` GUI 功能: - **裁定选项卡** — 带有置信度评分的 WAF 检测结果 - **证据选项卡** — 所有特征匹配和被拦截的 payload - **安全标头选项卡** — 完整的 HTTP 标头分析 - **Payload 选项卡** — 每个 payload 的结果(拦截/通过) ## 🏗️ 架构 ``` firewallsentinel/ ├── main.py # GUI entry point ├── cli.py # CLI with banner ├── run.sh # GUI launcher ├── install.sh # One-command installer ├── requirements.txt # PyQt5, aiohttp ├── core/ │ ├── waf_signatures.py # 40+ WAF detection database │ ├── firewall_detector.py # Asyncio detection engine │ └── reporter.py # JSON/HTML/TXT export ├── ui/ │ ├── main_window.py # PyQt5 GUI │ └── theme.py # Dark hacker stylesheet └── assets/ ├── screenshot.png # GUI preview └── cli_screenshot.png # CLI preview ``` ## 🎯 用例 - **交战前侦察** — 在规划攻击向量之前识别 WAF - **Bug Bounty** — 了解已部署的防护措施 - **安全审计** — 记录您资产的 WAF 防护状态 - **红队行动** — 在侦察阶段映射安全控制措施 - **合规性** — 验证基础设施中的 WAF 部署情况 ## ⚠️ 法律免责声明 本工具仅供教育和授权测试目的使用。 请仅对您拥有或获得明确书面许可的系统进行测试。 作者对任何滥用行为不承担任何责任。 ## 📄 许可证 **MIT 许可证** — 个人和商业用途免费。 ## 🙌 致谢 **FirewallSentinel** — 高级网站防火墙检测工具 由 **MrNobody** 维护 *⭐ 如果此工具对您有帮助,请在 GitHub 上给它点个 Star!*
标签:PyQt5, Python, WAF识别, 实时处理, 密码管理, 无后门, 计算机取证, 逆向工具