dvlinuxx-max/vulnscope

GitHub: dvlinuxx-max/vulnscope

一款零依赖的 Web 安全扫描器,通过 scope 感知爬虫与非破坏性检查,为网站生成评分化的安全审计报告。

Stars: 0 | Forks: 0

# vulnscope 一款 web 安全扫描器。将其指向一个网站,它会在 scope 内进行爬取,运行 一系列针对常见错误配置和暴露风险的非破坏性检查,并 生成带有评分的报告,格式可以是文本、JSON 或 HTML。纯标准库实现 —— 无需 安装,无依赖。 请仅扫描您拥有或获得明确授权测试的目标。 ## 运行 ``` python vulnscope.py example.com python -m vulnscope example.com # same thing, as a module python vulnscope.py example.com --html report.html python vulnscope.py example.com --json > out.json ``` 常用 flags: ``` --active add light input-reflection probes (XSS/SQL surface) --max-pages N crawl budget (default 25) --depth N crawl depth (default 3) --delay S seconds between requests (be polite / avoid rate limits) --timeout S per-request timeout --html FILE write an HTML report --json machine-readable output ``` 如果报告了任何中/高危 finding,退出码为 `1`,否则为 `0`,因此可以适配 CI。 ## 检查 被动和配置检查(始终运行): - 安全 headers:HSTS、CSP、X-Content-Type-Options、X-Frame-Options、 Referrer-Policy、Permissions-Policy。 - Clickjacking:未限制 framing。 - Cookies:缺少 Secure / HttpOnly / SameSite flags。 - TLS:仅支持 HTTP 的站点、弱协议版本、已过期/即将过期的证书。 - HTTP 方法:TRACE (XST)、宣告的 PUT/DELETE。 - CORS:结合 credentials 的 origin-reflecting 或通配符策略。 - 暴露的文件:`.git`、`.env`、`.svn`、配置备份、`phpinfo`、 `server-status`、归档文件 —— 通过与站点的 404 进行指纹比对以避免 误报。 - 目录列表。 - 信息泄露:server/framework 版本横幅、语言堆栈 追踪、SQL/PHP 错误输出。 - Mixed content 以及通过 HTTP 提交或缺少 CSRF token 字段的表单。 主动检查(使用 `--active`,仍然是单一的无害探测,不进行利用): - 通过无害的 canary 值测试反射参数(XSS surface)。 - 通过单引号探测 SQL 错误面。 ## 输出 ``` vulnscope https://example.com score 67/100 (C) 0 high 3 medium 4 low 0 info [MEDIUM] Missing strict-transport-security https://example.com fix: Add HSTS to force HTTPS. ... ``` 分数从 100 开始,并根据严重程度扣除每个 finding 的权重。 `--html` 输出自包含的带样式报告;`--json` 输出完整的 finding 列表。 ## 结构 ``` vulnscope.py run without installing vulnscope/ __main__.py python -m vulnscope cli.py arguments and scan orchestration core.py HttpClient, Finding, scoring crawler.py scope-bound crawler (links + forms) checks.py all checks report.py text / json / html rendering ``` 检查会返回 `Finding` 对象,包含 severity、category、URL、detail、 evidence 和 remediation。添加检查只需编写一个返回 findings 列表的函数;然后将其接入 `cli.run`。 ## 环境要求 Python 3.9+。无需第三方包。 ## 许可证 MIT
标签:BeEF, Python, Web安全扫描器, 主机安全, 安全合规检查, 无后门, 爬虫, 逆向工具, 零依赖