AswinMathew2004/WAF-Sentinel

GitHub: AswinMathew2004/WAF-Sentinel

一款多技术 WAF 指纹识别工具,通过被动与主动检测方法帮助安全人员识别目标站点部署的 Web 应用防火墙类型。

Stars: 0 | Forks: 0

# 🛡️ WAF Sentinel ### 高级 Web 应用防火墙指纹识别工具

Python License Platform Version

``` ██╗ ██╗ █████╗ ███████╗ ███████╗███████╗███╗ ██╗████████╗██╗███╗ ██╗███████╗██╗ ██║ ██║██╔══██╗██╔════╝ ██╔════╝██╔════╝████╗ ██║╚══██╔══╝██║████╗ ██║██╔════╝██║ ██║ █╗ ██║███████║█████╗ ███████╗█████╗ ██╔██╗ ██║ ██║ ██║██╔██╗ ██║█████╗ ██║ ██║███╗██║██╔══██║██╔══╝ ╚════██║██╔══╝ ██║╚██╗██║ ██║ ██║██║╚██╗██║██╔══╝ ██║ ╚███╔███╔╝██║ ██║██║ ███████║███████╗██║ ╚████║ ██║ ██║██║ ╚████║███████╗███████╗ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝ ``` 一款专为渗透测试人员和安全研究人员设计的、功能强大的多技术 WAF 检测和指纹识别工具。使用 8 种并行检测方法识别 **30 多个 WAF 供应商**。 ## 🔥 功能 - **30+ WAF 签名** — Cloudflare、AWS WAF、Akamai、Imperva、Sucuri、F5 BIG-IP、ModSecurity、Fortinet、Azure、GCP Cloud Armor、Fastly、Barracuda 等等 - **8 种检测方法**: - HTTP Header 分析 - Cookie 指纹识别 - 响应体模式匹配 - 状态码行为分析 - SSL/TLS 证书检查 - DNS CNAME 解析 - 响应时间异常分析 - 激进 Payload 触发 - **置信度评分** — 具有跨方法加成的多信号聚合 - **隐蔽模式** — 随机延迟和 user-agent 轮换 - **代理支持** — 通过 Burp Suite、SOCKS 或 Tor 路由 - **JSON 报告** — 用于 CI/CD pipeline 的机器可读输出 - **在 Kali 上零依赖** — 适用于任何 Python 3.8+ 系统 ## 📦 安装说明 ``` # Clone repository git clone https://github.com/AswinMathew2004/WAF-Sentinel.git cd waf-sentinel # Install dependencies pip3 install -r requirements.txt # Make executable chmod +x waf-sentinel.py ``` ### Kali Linux(预装依赖) ``` # Most dependencies ship with Kali — just clone and run git clone https://github.com/AswinMathew2004/WAF-Sentinel.git cd waf-sentinel python3 waf-sentinel.py -t example.com ``` ## 🚀 使用说明 ### 基础扫描(被动) ``` python3 waf-sentinel.py -t example.com ``` ### 激进模式(Payload 测试) ``` python3 waf-sentinel.py -t https://target.com --aggressive ``` ### 隐蔽模式 + JSON 报告 ``` python3 waf-sentinel.py -t target.com --stealth --output report.json ``` ### 通过代理进行完整扫描 ``` python3 waf-sentinel.py -t target.com -a -v --proxy http://127.0.0.1:8080 ``` ### 所有选项 ``` Usage: waf-sentinel.py [-h] -t TARGET [-a] [-s] [-o OUTPUT] [-v] [--threads N] [--timeout N] [--proxy URL] Options: -t, --target Target URL or domain (required) -a, --aggressive Enable aggressive payload-based detection -s, --stealth Stealth mode (random delays between requests) -o, --output Save JSON report to file -v, --verbose Verbose output --threads Number of threads (default: 5) --timeout Request timeout in seconds (default: 10) --proxy HTTP/SOCKS proxy (e.g., http://127.0.0.1:8080) ``` ## 📊 检测方法详解 | 方法 | 技术 | 隐蔽级别 | |---|---|---| | **Header 分析** | 检查响应头中是否存在特定于 WAF 的名称和值 | 🟢 被动 | | **Cookie 指纹识别** | 将 Cookie 名称/模式与已知的 WAF 签名进行匹配 | 🟢 被动 | | **响应体分析** | 扫描 HTML 以获取拦截页面签名和错误消息 | 🟢 被动 | | **状态码分析** | 检测典型的 WAF HTTP 响应码(403、406、429...) | 🟢 被动 | | **SSL/TLS 检查** | 检查证书颁发者、Subject 和 SAN 以获取 CDN/WAF 提示 | 🟢 被动 | | **DNS CNAME 检查** | 解析 DNS 以识别 CDN/WAF 基础设施 | 🟢 被动 | | **时间分析** | 比较正常请求与类似攻击请求的响应时间 | 🟡 低风险 | | **Payload 触发** | 发送良性的攻击 Payload 以引发 WAF 拦截响应 | 🔴 主动 | ## 🎯 支持的 WAF | WAF | 供应商 | 检测方式 | |---|---|---| | Cloudflare | Cloudflare, Inc. | ✅ Header、Cookie、响应体、SSL、DNS | | AWS WAF | Amazon | ✅ Header、Cookie、响应体 | | Akamai Kona | Akamai Technologies | ✅ Header、Cookie、SSL、DNS | | Imperva / Incapsula | Imperva | ✅ Header、Cookie、响应体、DNS | | Sucuri | GoDaddy/Sucuri | ✅ Header、Cookie、响应体、Server | | F5 BIG-IP ASM | F5 Networks | ✅ Header、Cookie、响应体、Server | | ModSecurity | Trustwave/OWASP | ✅ Header、响应体、Server | | Barracuda WAF | Barracuda Networks | ✅ Cookie、响应体、Server | | Fortinet FortiWeb | Fortinet | ✅ Cookie、响应体、Server | | Citrix NetScaler | Citrix | ✅ Header、Cookie、响应体 | | Wordfence | Defiant | ✅ Cookie、响应体 | | Azure Front Door | Microsoft | ✅ Header、响应体、Server | | Google Cloud Armor | Google | ✅ Header、响应体、Server | | StackPath | StackPath | ✅ Header、响应体 | | DDoS-Guard | DDoS-Guard | ✅ Header、Cookie、Server | | Wallarm | Wallarm | ✅ Header、响应体 | | Reblaze | Reblaze | ✅ Header、Cookie | | Radware AppWall | Radware | ✅ Header、响应体 | | Fastly WAF | Fastly | ✅ Header、响应体 | | Alibaba Cloud WAF | Alibaba | ✅ Cookie、Server、响应体 | | Tencent Cloud WAF | Tencent | ✅ Cookie、响应体 | | Palo Alto Networks | Palo Alto | ✅ 响应体 | | LiteSpeed WAF | LiteSpeed | ✅ Server、响应体 | | Comodo WAF | Comodo | ✅ Server、响应体 | | Shield Security | Shield | ✅ 响应体 | | SiteLock TrueShield | SiteLock | ✅ 响应体 | | Qrator | Qrator Labs | ✅ Cookie、Server | | Varnish + Security | Varnish Software | ✅ Header、响应体 | | Edgecast / Verizon | Edgecast | ✅ Header、Server | ## 📄 输出示例 ``` ─────────────────────────────────────────────────────── RESULTS ─────────────────────────────────────────────────────── [✓] Identified 2 WAF(s): [1] Cloudflare Confidence : 95% (Definite) Methods : header_analysis, cookie_analysis, body_analysis, ssl_analysis, dns_analysis › Header present: cf-ray › Server header matches: cloudflare › Cookie matches: __cf_bm › SSL certificate hints at 'cloudflare' › DNS CNAME points to: target.cdn.cloudflare.net [2] Generic / Unknown WAF Confidence : 40% (Low) Methods : payload_trigger › Payload 'SQLi — Union select' triggered block (HTTP 403) ``` ## 🔧 项目结构 ``` waf-sentinel/ ├── waf-sentinel.py # Main entry point ├── core/ │ ├── __init__.py │ ├── signatures.py # WAF signature database (30+ WAFs) │ ├── payloads.py # Aggressive detection payloads │ └── utils.py # CLI display utilities ├── requirements.txt ├── LICENSE └── README.md ``` ## ⚖️ 法律免责声明 **本工具仅供授权的安全测试和研究使用。** 在测试任何目标之前,请务必获得适当的书面授权。未经授权测试您不拥有或无权测试的系统是**非法的**,并且可能违反您所在司法管辖区的计算机欺诈和滥用法。 作者不承担任何责任,也不对因滥用本工具或本工具造成的任何损害负责。 ## 📜 许可证 MIT License — 详情请参阅 [LICENSE](LICENSE)。

用 ☕ 为安全社区制作
如果觉得有用,请给这个仓库点个 ⭐ Star!

标签:Python, WAF指纹识别, 实时处理, 密码管理, 无后门, 逆向工具