gaurav5815/vulnscan-pro

GitHub: gaurav5815/vulnscan-pro

基于 Python 和 Streamlit 的自动化 Web 漏洞扫描器,覆盖 OWASP Top 10 并集成侦察引擎与报告生成功能。

Stars: 0 | Forks: 0

# 🛡️ VulnScan Pro [![Python](https://img.shields.io/badge/Python-3.10+-blue?style=flat-square&logo=python)](https://python.org) [![Streamlit](https://img.shields.io/badge/Streamlit-1.32+-red?style=flat-square&logo=streamlit)](https://streamlit.io) [![OWASP](https://img.shields.io/badge/OWASP-Top%2010-orange?style=flat-square)](https://owasp.org) [![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE) [![Status](https://img.shields.io/badge/Status-Active-brightgreen?style=flat-square)]() ## 概述 VulnScan Pro 是一款完全使用 Python 构建的专业级自动化 Web 漏洞扫描器。它复刻了真实渗透测试人员的工作流程——对目标进行爬取、识别技术栈指纹,并针对 OWASP Top 10 中的 11 类漏洞,系统地测试每一个发现的输入点。 该工具具有深色主题的 Streamlit GUI、10 阶段扫描引擎、完整的侦察模块以及自动化的 HTML + JSON 报告生成器——非常适合用于安全评估、CTF 练习和作品集展示。 ## 预览 ``` ██╗ ██╗██╗ ██╗██╗ ███╗ ██╗███████╗ ██████╗ █████╗ ███╗ ██╗ ██║ ██║██║ ██║██║ ████╗ ██║██╔════╝██╔════╝██╔══██╗████╗ ██║ ██║ ██║██║ ██║██║ ██╔██╗ ██║███████╗██║ ███████║██╔██╗ ██║ ╚██╗ ██╔╝██║ ██║██║ ██║╚██╗██║╚════██║██║ ██╔══██║██║╚██╗██║ ╚████╔╝ ╚██████╔╝███████╗██║ ╚████║███████║╚██████╗██║ ██║██║ ╚████║ ╚═══╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═══╝ Automated Web Vulnerability Scanner v2.0 | OWASP Top 10 ``` ## 功能特性 ### 漏洞覆盖 | # | 模块 | 攻击类型 | OWASP 类别 | 严重程度 | CVSS | |---|--------|-------------|----------------|----------|------| | 01 | SQL Injection | 报错型、布尔盲注、时间盲注 | A03:2021 - Injection | 🔴 严重 | 9.8 | | 02 | Cross-Site Scripting | 反射型 XSS, DOM-based XSS | A03:2021 - Injection | 🟠 高危 | 7.5 | | 03 | OS Command Injection | Shell 元字符注入 | A03:2021 - Injection | 🔴 严重 | 9.8 | | 04 | Local File Inclusion | 路径遍历, 编码绕过 | A01:2021 - Broken Access Control | 🔴 严重 | 9.1 | | 05 | Sensitive File Exposure | 50+ 路径: .env, .git, /admin | A05:2021 - Misconfiguration | 🔴 严重 | 9.8 | | 06 | Security Headers | 9 项头部检查 + CSP 分析 | A05:2021 - Misconfiguration | 🟠 高危 | 7.5 | | 07 | CSRF | POST 表单缺失 Token | A01:2021 - Broken Access Control | 🟠 高危 | 7.5 | | 08 | IDOR | 数字 ID 枚举 | A01:2021 - Broken Access Control | 🟠 高危 | 8.1 | | 09 | Open Redirect | 重定向参数中的 URL 注入 | A01:2021 - Broken Access Control | 🟡 中危 | 6.1 | | 10 | SSRF | AWS/GCP/Azure 元数据测试 | A10:2021 - SSRF | 🔴 严重 | 9.8 | | 11 | CORS Misconfiguration | 通配符 + 凭证绕过 | A05:2021 - Misconfiguration | 🟡 中危 | 6.5 | ### 侦察引擎 - DNS 记录、反向查找、子域名发现 - IP 地理位置 —— 国家、ISP、组织 - WAF 指纹识别 —— Cloudflare, AWS WAF, Akamai, Imperva, F5, Sucuri, ModSecurity - 技术检测 —— 50+ 签名 (CMS, 框架, 服务器, JS 库) - SSL/TLS 证书分析 —— 协议、密码套件、过期时间、弱配置检测 - 端口扫描 —— 18 个常见服务 - 从页面内容中收集 Email - 从 JavaScript 源码中发现 API endpoint - HTML 注释分析以检测凭证泄露 ### 核心引擎 - 深度 Web 爬虫 —— 跟踪所有内部链接、表单、JS 文件、查询参数 - 具有轮换 User-Agent (Chrome, Firefox, Safari, Edge) 的会话感知 HTTP 引擎 - 可配置的扫描深度、页面限制和请求延迟 - 具有实时进度日志记录的多阶段架构 - 自动化 HTML 和 JSON 报告生成 ## 架构 ``` vulnscan-pro/ │ ├── app.py # Streamlit GUI — dark terminal aesthetic ├── core.py # 10-phase scan orchestrator ├── requirements.txt │ ├── engine/ │ ├── http_engine.py # HTTP client — rotating agents, SSL, redirects │ └── crawler.py # Deep crawler — forms, links, JS, APIs, emails │ ├── recon/ │ └── recon.py # Full recon — DNS, GeoIP, WAF, SSL, ports, CORS │ ├── modules/ │ ├── sqli.py # SQL injection — 3 detection techniques │ ├── xss.py # XSS — reflected + DOM-based │ ├── headers.py # HTTP security header auditor │ ├── dir_lfi_cmd.py # Directory enum + LFI + command injection │ └── idor_csrf.py # IDOR + CSRF + SSRF + open redirect │ ├── reports/ │ └── report.py # HTML + JSON report generator │ └── output/ # Generated reports saved here ``` ## 10 阶段扫描的工作原理 ``` Phase 1 → Reconnaissance DNS, WAF, tech stack, SSL, open ports Phase 2 → Deep Crawl Pages, forms, JS files, API endpoints Phase 3 → Header Analysis 9 security headers + CSP weakness parsing Phase 4 → Directory Enum 50+ sensitive paths probed Phase 5 → SQL Injection Error-based, boolean-blind, time-based Phase 6 → XSS Testing Reflected + DOM source/sink analysis Phase 7 → LFI / Traversal 12 payload variants + encoding bypass Phase 8 → Command Injection Shell metacharacter injection Phase 9 → Access Control CSRF, IDOR, SSRF, Open Redirect Phase 10 → Report Generation HTML + JSON professional report ``` ## 安装 ``` # 克隆 repository git clone https://github.com/gaurav5815/vulnscan-pro.git cd vulnscan-pro # 创建 virtual environment(推荐) python -m venv venv source venv/bin/activate # Linux / macOS venv\Scripts\activate # Windows # 安装 dependencies pip install -r requirements.txt ``` ## 使用 ### GUI —— 推荐 ``` python -m streamlit run app.py ``` 自动打开 **http://localhost:8501** ### CLI ``` from core import VulnScanner scanner = VulnScanner(config={ "max_pages": 30, "max_depth": 3, "delay": 0.2, }) data, paths, duration = scanner.run( "https://target.com", status_cb=lambda msg, pct=None: print(msg), log_cb=print, ) ``` ### Windows 快速启动 ``` cd vulnscan-pro python -m pip install -r requirements.txt python -m streamlit run app.py ``` ## 示例报告输出 ``` { "vulnerability": "SQL Injection (Boolean-based Blind)", "severity": "Critical", "cvss": "9.8", "owasp": "A03:2021 - Injection", "url": "https://target.com/products.php?id=1", "parameter": "id", "method": "GET", "payload": "' OR 1=1-- (TRUE) vs ' OR 1=2-- (FALSE)", "evidence": "Response length difference of 847 bytes", "impact": "Full database extraction, authentication bypass, data destruction", "recommendation": "Use parameterized queries. Never concatenate user input into SQL." } ``` 报告保存为: - `output/report_YYYYMMDD_HHMMSS.html` —— 深色主题专业 HTML 报告 - `output/report_YYYYMMDD_HHMMSS.json` —— 机器可读 JSON ## GUI 页面 | 页面 | 描述 | |---|---| | Scanner | URL 输入、扫描配置、实时终端日志、发现结果展示 | | Dashboard | 风险等级徽章、严重程度图表、按类型分类的发现、扫描统计 | | Recon | 技术栈、WAF、SSL、DNS、端口、Email、API endpoint | | Reports | 下载 HTML/JSON 报告及实时预览 | ## 授权练习目标 | 目标 | URL | 漏洞 | |---|---|---| | Acunetix PHP Demo | http://testphp.vulnweb.com | SQLi, XSS, LFI, 目录遍历 | | IBM AltoroMutual | http://demo.testfire.net | SQLi, XSS, 认证绕过 | | DVWA (local) | http://localhost/dvwa | 完整 OWASP Top 10 | | WebGoat (local) | http://localhost:8080 | OWASP 官方训练平台 | | bWAPP (local) | http://localhost/bwapp | 100+ 漏洞类型 | ## 技术栈 | 组件 | 技术 | |---|---| | Language | Python 3.10+ | | GUI Framework | Streamlit | | HTTP Client | requests + urllib3 | | HTML Parsing | BeautifulSoup4 | | Data Analysis | pandas | | CLI Colors | colorama | | Reporting | Custom HTML/JSON generator | ## 路线图 - [ ] PDF 报告生成 - [ ] Nuclei 模板集成 - [ ] 认证测试 (JWT, OAuth) - [ ] 速率限制和 WAF 绕过技术 - [ ] 子域名接管检测 - [ ] 检测到的技术的 CVE 映射 - [ ] API 安全测试 (REST, GraphQL) - [ ] Slack / Email 告警集成 ## 免责声明 此工具仅为**教育目的和授权安全测试而创建**。 - 仅扫描您拥有或获得明确书面许可测试的系统 - 未经授权的扫描在《信息技术法 2000》(印度)及全球同等法律下均属违法 - 作者不对本工具的任何滥用行为承担责任 ## 作者 **Gaurav Kumar** B.Tech 计算机科学工程 NIIT University GitHub: https://github.com/gaurav5815 *如果这个项目对您有帮助,请考虑在 GitHub 上给它一个 ⭐。*
标签:BeEF, C2日志可视化, CISA项目, CTF工具, GUI工具, Kubernetes, MIT许可, OWASP Top 10, Python安全工具, Streamlit, VulnScan Pro, Web安全, 动态插桩, 反取证, 安全报告生成, 安全评估, 密码管理, 对称加密, 指纹识别, 漏洞搜索, 爬虫, 站点测绘, 网络安全, 自动化审计, 蓝队分析, 访问控制, 逆向工具, 隐私保护