bitsadmin/wesng
GitHub: bitsadmin/wesng
WES-NG 通过分析 Windows systeminfo 输出比对漏洞数据库,快速识别目标系统缺失补丁及潜在可利用漏洞。
Stars: 4900 | Forks: 605
# Windows Exploit Suggester - Next Generation (WES-NG)
WES-NG 是一款基于 Windows `systeminfo` 实用程序输出的工具,它提供操作系统易受攻击的漏洞列表,包括针对这些漏洞的任何 exploits。支持 Windows XP 到 Windows 11 之间的所有 Windows OS,以及它们对应的 Windows Server 版本。
在 BITSADMIN 博客上有一篇关于 WES-NG 的深度文章:[面向黑客的 Windows 安全更新](https://blog.bitsadmin.com/windows-security-updates-for-hackers)。
## 用法
1. 使用 `pip install wesng` 或以下命令行下载 WES-NG:`git clone https://github.com/bitsadmin/wesng --depth 1`
2. 执行 `wes.py --update` 命令获取最新的漏洞数据库
3. 检查缺失的补丁有两种方法:
a. 在主机上运行 `missingkbs.vbs` 或 `missingkbs.ps1`,让 Windows 决定缺失哪些补丁
b. 使用 Windows 内置的 `systeminfo.exe` 工具获取本地系统的信息,或者通过 `systeminfo /S MyRemoteHost` 获取远程系统的信息,并将其重定向到文件中:`systeminfo > systeminfo.txt`
4. 根据步骤 3 中选择的方法执行 WES-NG:
a. 以 `missing.txt` 文件作为输入:`wes.py --missing missing.txt`(或 `wes.py -m missing.txt`)
b. 以 `systeminfo.txt` 文件作为参数:`wes.py systeminfo.txt`
然后,WES-NG 会使用数据库确定适用于该系统的补丁,以及当前暴露于哪些漏洞中(如果可用,还包括 exploits)。
5. 由于 Microsoft MSRC feed 提供的数据通常不完整,且 `wes.py` 会报告误报情况,@DominicBreuker 贡献了 `--muc-lookup` 参数,以便根据 Microsoft Update Catalog 对 `systeminfo.txt` 文件中识别出的缺失补丁进行验证。此外,请务必查阅 Wiki 上的[消除误报](https://github.com/bitsadmin/wesng/wiki/Eliminating-false-positives)页面,了解如何解释结果。
有关 `missingkbs.vbs`、`missingkbs.ps1` 和 `wes.py` 所有可用参数的概述,请查看 [CMDLINE.md](https://github.com/bitsadmin/wesng/blob/master/CMDLINE.md)。
## 演示

## 收集器
这个 GitHub 仓库会定期更新漏洞数据库,因此使用 `--update` 参数运行 `wes.py` 即可获取最新版本。
如果需要手动生成包含补丁信息的 .csv 文件,请使用 [/collector](collector) 文件夹中的脚本编译数据库。阅读每个脚本顶部的注释,并按照下面列出的顺序执行。执行这些脚本将生成 definitions.zip。
WES-NG 收集器从各种来源提取信息:
- Microsoft Security Bulletin Data:旧系统的 KB [1]
- MSRC:Microsoft 安全响应中心 (MSRC) 的 Microsoft Security Update API:现代 Microsoft Updates 的标准信息源 [2]
- NIST National Vulnerability Database (NVD):补充漏洞的 Exploit-DB 链接 [3]
- OffSec Exploit-DB [4]
这些信息被合并到一个单独的 .csv 文件中,经过压缩后托管在此 GitHub 仓库中。
## 起因
我开发 WES-NG 是因为虽然 [GDSSecurity 的 Windows-Exploit-Suggester](https://github.com/GDSSecurity/Windows-Exploit-Suggester/) 在 Windows XP 和 Windows Vista 时代的操作系统上表现极佳,但 GDSSecurity 的 Windows-Exploit-Suggester 无法用于像 Windows 11 这样的操作系统以及近年来发布的漏洞。这是因为 Microsoft 用 MSRC API [2] 替换了 GDSSecurity 的 Windows-Exploit-Suggester 完全依赖的 Microsoft Security Bulletin Data Excel 文件 [1]。该 Microsoft Security Bulletin Data Excel 文件自 2017 年第一季度以来就没有更新过,因此无法检测到更新的操作系统和漏洞。感谢 [@gdssecurity](https://twitter.com/gdssecurity),这款出色的工具已经为我们服务了这么多年!
## Bug
- 可以通过 [Issues](https://github.com/bitsadmin/wesng/issues) 页面提交 Bug
- 关于结果中的误报,请先阅读 Wiki 上的[消除误报](https://github.com/bitsadmin/wesng/wiki/Eliminating-false-positives)页面。如果这不能显著减少误报数量,请按照 [Wiki](https://github.com/bitsadmin/wesng/wiki) 上的[报告误报](https://github.com/bitsadmin/wesng/wiki/Reporting-false-positives)页面中的步骤操作。
## 更新日志
见 [CHANGELOG.md](https://github.com/bitsadmin/wesng/blob/master/CHANGELOG.md)
## 改进
- 添加对 [NoPowerShell](https://github.com/bitsadmin/nopowershell/) 的 `Get-SystemInfo` cmdlet 输出的支持
- 添加对 `systeminfo` 其他输出格式(csv、table)的支持
- 对返回的误报漏洞进行更多测试——另见 [wiki](https://github.com/bitsadmin/wesng/wiki)
## 参考文献
[1] https://www.microsoft.com/download/details.aspx?id=36982
[2] https://portal.msrc.microsoft.com/en-us/developer
[3] https://nvd.nist.gov/vuln/data-feeds
[4] https://www.exploit-db.com/
#
**作者:Arris Huijgen ([@bitsadmin](https://twitter.com/bitsadmin/) - https://github.com/bitsadmin/)**
标签:AI合规, Python, Web报告查看器, 提权辅助, 无后门, 无线安全, 逆向工具, 防御框架