【红队战术】Windows系统补丁提权辅助

文章介绍了一个用于检测Windows系统缺失补丁并查找潜在提权手段的工具。该工具基于`systeminfo`命令的输出,对比Microsoft的安全公告数据库,找出可利用的公共漏洞和Metasploit模块。它可以自动更新数据库,并能处理误报问题。文章提供了使用示例和相关项目的链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.命令查询补丁

systeminfo

在这里插入图片描述
【需要将结果复制到】Windows提权辅助工具地址:
https://i.hacking8.com/tiquan
在这里插入图片描述
根据查询结果在这两个项目上寻找相关的编号的EXP进行提权:

  • https://github.com/Ascotbe/Kernelhub
  • https://github.com/SecWiki/windows-kernel-exploits

2.缺失补丁检测辅助工具

描述

该工具将目标补丁级别与 Microsoft 漏洞数据库进行比较,以检测目标上潜在的缺失补丁。它还会通知用户是否存在可用于缺失公告的公共漏洞和 Metasploit 模块。

它需要 Windows 主机的“systeminfo”命令输出,以便比较 Microsoft 安全公告数据库并确定主机的补丁级别。

它能够使用 --update 标志自动从 Microsoft 下载安全公告数据库,并将其保存为 Excel 电子表格。

查看命令输出时,需要注意的是,它假设了所有漏洞,然后根据修补程序数据有选择地删除它们。这可能会导致许多误报,了解目标主机上实际运行的软件至关重要。例如,如果存在已知的 IIS 漏洞,即使 IIS 未在目标主机上运行,​​它也会标记它们。

输出显示公共漏洞 (E) 或 Metasploit 模块 (M),如字符值所示。

它很大程度上受到 Pentura 的 Linux_Exploit_Suggester 的启发。

博客文章:“Windows 漏洞利用建议器简介”,https://blog.gdssecurity.com/labs/2014/7/11/introducing-windows-exploit-suggester.html

用法

更新数据库

$ ./windows-exploit-suggester.py --update
[*] initiating...
[*] successfully requested base url
[*] scraped ms download url
[+] writing to file 2014-06-06-mssb.xlsx
[*] done

安装依赖项

(安装 python-xlrd,$ pip install xlrd --upgrade)

向其提供“systeminfo”输入,并将其指向微软数据库

$ ./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --systeminfo win7sp1-systeminfo.txt 
[*] initiating...
[*] database file detected as xls or xlsx based on extension
[*] reading from the systeminfo input file
[*] querying database file for potential vulnerabilities
[*] comparing the 15 hotfix(es) against the 173 potential bulletins(s)
[*] there are now 168 remaining vulns
[+] windows version identified as 'Windows 7 SP1 32-bit'
[*] 
[M] MS14-012: Cumulative Security Update for Internet Explorer (2925418) - Critical
[E] MS13-101: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (2880430) - Important
[M] MS13-090: Cumulative Security Update of ActiveX Kill Bits (2900986) - Critical
[M] MS13-080: Cumulative Security Update for Internet Explorer (2879017) - Critical
[M] MS13-069: Cumulative Security Update for Internet Explorer (2870699) - Critical
[M] MS13-059: Cumulative Security Update for Internet Explorer (2862772) - Critical
[M] MS13-055: Cumulative Security Update for Internet Explorer (2846071) - Critical
[M] MS13-053: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Remote Code Execution (2850851) - Critical
[M] MS13-009: Cumulative Security Update for Internet Explorer (2792100) - Critical
[M] MS13-005: Vulnerability in Windows Kernel-Mode Driver Could Allow Elevation of Privilege (2778930) - Important
[*] done

无需修补程序数据即可利用操作系统的可能漏洞

$ ./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --ostext 'windows server 2008 r2' 
[*] initiating...
[*] database file detected as xls or xlsx based on extension
[*] getting OS information from command line text
[*] querying database file for potential vulnerabilities
[*] comparing the 0 hotfix(es) against the 196 potential bulletins(s)
[*] there are now 196 remaining vulns
[+] windows version identified as 'Windows 2008 R2 64-bit'
[*] 
[M] MS13-009: Cumulative Security Update for Internet Explorer (2792100) - Critical
[M] MS13-005: Vulnerability in Windows Kernel-Mode Driver Could Allow Elevation of Privilege (2778930) - Important
[E] MS11-011: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (2393802) - Important
[M] MS10-073: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (981957) - Important
[M] MS10-061: Vulnerability in Print Spooler Service Could Allow Remote Code Execution (2347290) - Critical
[E] MS10-059: Vulnerabilities in the Tracing Feature for Services Could Allow Elevation of Privilege (982799) - Important
[E] MS10-047: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (981852) - Important
[M] MS10-002: Cumulative Security Update for Internet Explorer (978207) - Critical
[M] MS09-072: Cumulative Security Update for Internet Explorer (976325) - Critical

项目地址:

  • https://github.com/SecWiki/windows-kernel-exploits/tree/master/win-exp-suggester
### 关于内网渗透测试中针对 Windows 系统方法 #### 利用弱密码和服务配置错误 在许多情况下,管理员可能会设置容易猜测的服务账户密码或使用默认凭证。攻击者可以尝试暴力破解这些服务账号的密码,从而获得更高的限。 #### 使用Mimikatz取明文密码和其他凭据 当成功登录一台机器后,可以通过运行 Mimikatz 这样的工具来转储内存中的 NTLM 哈希值以及可能存在的明文密码[^2]。这允许横向移动并进一步探索网络内的其他资源。 #### 漏洞利用框架 Metasploit (MSF) Metasploit 是一个强大的开源平台,用于开发、测试和使用已知的安全漏洞代码。对于特定版本的操作系统中存在的软件缺陷,比如 Web 应用服务器上的 ASP.NET 配置不当等问题,都可以借助 MSF 实现远程命令执行进而完成本地至更高限级别的转换过程。 #### PowerShell 脚本与 Empire 框架 PowerShell 供了一种灵活的方式来管理和控制 Windows 计算机及其应用程序。Empire 是一款基于 Python 和 PowerShell 的后期开发框架,能够帮助红队成员绕过各种防御机制,在目标主机上建立持久化连接的同时寻找可被用来实施 UAC 绕过的策略或其他形式的特升级路径[^1]。 ```powershell # 示例:加载 Empire stager 并启动监听器 usemodule code_execution/invoke_powershell_empire set Listener http execute ``` #### 社交工程学和社会工程技术的应用 有时最简单的途径并非技术性的而是社会层面的——即说服内部人员无意间泄露敏感资料或者授予访问限给未经授的人士。这类手法往往能有效规避传统意义上的防火墙和技术屏障。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

David_Jou

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值