arkanzasfeziii/Blind-SSRF-Vulnerability-Scanner

GitHub: arkanzasfeziii/Blind-SSRF-Vulnerability-Scanner

一款支持带外检测和静态代码分析的多方法 Blind SSRF 漏洞扫描器,帮助安全人员在无回显场景下发现服务端请求伪造漏洞。

Stars: 0 | Forks: 0

# Blind SSRF 漏洞扫描器 ![Python](https://img.shields.io/badge/python-3.8%2B-blue) ![License](https://img.shields.io/github/license/arkanzasfeziii/Blind-SSRF-Vulnerability-Scanner) ![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/4e8a14d431141914.svg) 一款专业的多方法扫描器,用于检测 Web 应用程序和源代码中的 **Blind Server-Side Request Forgery (SSRF)** 漏洞。支持带外 (OOB) callback 检测、云元数据探测、内部端口扫描,以及跨六种语言的静态代码分析。 ## 什么是 Blind SSRF? 当服务器基于用户提供的输入发起出站 HTTP 请求,但从未将响应展示给攻击者时,就会发生 Blind SSRF。与常规 SSRF 不同,其检测需要使用带外技术——时间分析、DNS callback 或外部 callback 服务器。 **影响**:攻击者可以借此渗透进内部网络、读取云元数据凭证(AWS IAM 密钥、Azure token)、通过时间分析对内部服务进行端口扫描,以及通过时间侧信道进行数据外泄。 ## 功能 | 功能 | 描述 | |---------|-------------| | OOB callback 服务器 | 内置 HTTP 监听器在 8888 端口捕获 blind callback | | 基于时间的检测 | 测量响应延迟以推断内部请求尝试 | | 云元数据探测 | 测试 AWS、GCP 和 Azure IMDS endpoint (169.254.169.254) | | 内部端口扫描 | 通过时间分析识别开放端口 (22, 80, 443, 3306, 5432, 6379, 8080, 9200) | | Protocol smuggling | 测试 file://, gopher://, dict://, ftp:// 注入 | | 静态代码分析 | 扫描 Python, Java, PHP, Node.js, .NET 和 Ruby 源代码文件 | | 速率限制 | 请求之间可配置的延迟,以避免请求洪泛目标 | | URL scheme 验证 | 在发送任何请求之前,拒绝格式错误或无 scheme 的 URL | | JSON + HTML 报告 | 机器可读和人类可读的输出格式 | | 交互式简易模式 | 适合初学者的向导式界面 | ## 安装 ``` git clone https://github.com/arkanzasfeziii/Blind-SSRF-Vulnerability-Scanner.git cd Blind-SSRF-Vulnerability-Scanner pip install -r requirements.txt ``` **环境要求**:Python 3.8+, `requests`, `dnspython`, `termcolor` ## 用法 ### 交互模式(推荐首次使用的用户) ``` python main.py --easy ``` ### 扫描 Web 应用程序 ``` python main.py --target http://vulnerable-app.local/api --mode dynamic ``` ### 分析源代码 ``` python main.py --target app.py --type python --mode static ``` ### 全面扫描(静态 + 动态) ``` python main.py --target http://vulnerable-app.local --mode full --verbose ``` ### 从 URL 列表批量扫描 ``` python main.py --target urls.txt --mode dynamic ``` ### 将输出保存为 HTML 或 JSON 格式 ``` python main.py --target http://vulnerable-app.local --output report.html python main.py --target http://vulnerable-app.local --output report.json ``` ### 所有选项 ``` --target, -t Target URL, source file, or line-delimited URL list --mode, -m Scan mode: static | dynamic | full (default: full) --type Source language: python | java | php | nodejs | dotnet | ruby | auto --easy, -e Interactive wizard mode --verbose, -v Show detailed technical output --output, -o Save report to .html or .json file --timeout Per-request timeout in seconds (default: 10) --callback-domain External callback domain for OOB testing --threads Concurrent threads (default: 1) --version Show version and exit ``` ## 支持的注入点 - URL 查询参数(自动提取或指定) - 批量 URL 列表(每行一个 URL) - Python, Java, PHP, Node.js, .NET, Ruby 中的源代码模式 ## 扫描结果输出示例 ``` ====================================================================== 🚨 FOUND 2 BLIND SSRF VULNERABILITIES ====================================================================== [1] Blind SSRF (Out-of-Band) - CRITICAL 🌐 URL: http://vulnerable-app.local/fetch 🔍 Parameter: url 💉 Test Payload: http://192.168.1.50:8888/test_1718200000 📝 Description: Server made a request to our callback URL - confirms Blind SSRF vulnerability ✅ How to Fix: Implement strict URL whitelist and block all outbound requests to arbitrary URLs [2] Blind SSRF (Cloud Metadata) - CRITICAL 🌐 URL: http://vulnerable-app.local/fetch 🔍 Parameter: url 💉 Test Payload: http://169.254.169.254/latest/meta-data/ 📝 Description: Server appears to access AWS metadata service - critical security risk! ✅ How to Fix: Block access to http://169.254.169.254/latest/meta-data/ and all metadata service IPs ``` ## 安全 要报告此工具本身的漏洞,请参阅 [SECURITY.md](SECURITY.md)。 ## 许可证 本项目根据 [LICENSE](LICENSE) 中的条款进行授权。
标签:CISA项目, Python, SSRF检测, 加密, 无后门, 漏洞扫描器, 逆向工具, 错误基检测, 静态代码分析