windows内核提权

   Windows by default are vulnerable to several vulnerabilities that could allow an attacker to execute malicious code in order to abuse a system. From the other side patching systems sufficiently is one of the main problems in security. Even if an organization has a patching policy in place if important patches are not implemented immediately this can still give short window to an attacker to exploit a vulnerability and escalate his privileges inside a system and therefore inside the network.

This article will discuss how to identify missing patches related to privilege escalation and the necessary code to exploit the issue.

Discovery of Missing Patches

The discovery of missing patches can be identified easily either through manual methods or automatic. Manually this can be done easily be executing the following command which will enumerate all the installed patches.

wmic qfe get Caption,Description,HotFixID,InstalledOn

The output will be similar to this:

Enumeration of Installed Patches

Enumeration of Installed Patches

The HotFixID can be used in correlation with the table below in order to discover any missing patches related to privilege escalation. As the focus is on privilege escalation the command can be modified slightly to discover patches based on the KB number.

wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB3136041" /C:"KB4018483"

Alternatively this can be done automatically via Metasploit, Credential Nessus Scan or via a custom script that will look for missing patches related to privilege escalation.

Metasploit

There is a Metasploit module which can quickly identify any missing patches based on the Knowledge Base number and specifically patches for which there is a Metasploit module.

post/windows/gather/enum_patches
Metasploit - Patches Enumeration

Metasploit – Patches Enumeration

Windows Exploit Suggester

Gotham Digital Security released a tool with the name Windows Exploit Suggester which compares the patch level of a system against the Microsoft vulnerability database and can be used to identify those exploits that could lead to privilege escalation. The only requirement is that requires the system information from the target.

Windows Exploit Suggester

Windows Exploit Suggester

PowerShell

There is also a PowerShell script which target to identify patches that can lead to privilege escalation. This script is called Sherlock and it will check a system for the following:

  • MS10-015 : User Mode to Ring (KiTrap0D)
  • MS10-092 : Task Scheduler
  • MS13-053 : NTUserMessageCall Win32k Kernel Pool Overflow
  • MS13-081 : TrackPopupMenuEx Win32k NULL Page
  • MS14-058 : TrackPopupMenu Win32k Null Pointer Dereference
  • MS15-051 : ClientCopyImage Win32k
  • MS15-078 : Font Driver Buffer Overflow
  • MS16-016 : ‘mrxdav.sys’ WebDAV
  • MS16-032 : Secondary Logon Handle
  • CVE-2017-7199 : Nessus Agent 6.6.2 – 6.10.3 Priv Esc

The output of this tool can be seen below:

Sherlock - Missing Patches

Sherlock – Missing Patches

Sherlock - Missing Patches 2

Sherlock – Identification of Privilege Escalation Patches

Privilege Escalation Table

The following table has been compiled to assist in the process of privilege escalation due to lack of sufficient patching.

Operating SystemDescriptionSecurity BulletinKBExploit
Windows Server 2016Windows Kernel Mode DriversMS16-1353199135Exploit

 

Github

Windows Server 2008 ,7,8,10 Windows Server 2012Secondary Logon HandleMS16-0323143141 GitHub

 

ExploitDB

Metasploit

Windows Server 2008, Vista, 7WebDAVMS16-0163136041Github
Windows Server 2003, Windows Server 2008, Windows 7, Windows 8, Windows 2012Windows Kernel Mode DriversMS15-0513057191GitHub

 

ExploitDB

Metasploit

Windows Server 2003, Windows Server 2008, Windows Server 2012, 7, 8Win32k.sysMS14-0583000061GitHub

 

ExploitDB

Metasploit

Windows Server 2003, Windows Server 2008, 7, 8, Windows Server 2012AFD DriverMS14-0402975684Python

 

EXE

ExploitDB

Github

Windows XP, Windows Server 2003Windows KernelMS14-0022914368Metasploit
Windows Server 2003, Windows Server 2008, 7, 8, Windows Server 2012Kernel Mode DriverMS13-0052778930Metasploit

 

ExploitDB

GitHub

Windows Server 2008, 7Task SchedulerMS10-0922305420Metasploit

 

ExploitDB

Windows Server 2003, Windows Server 2008, 7, XP KiTrap0DMS10-015977165Exploit

 

ExploitDB

GitHub

Metasploit

Windows Server 2003, XPNDProxyMS14-0022914368Exploit

 

ExploitDB

ExploitDB

Github

Windows Server 2003, Windows Server 2008, 7, 8, Windows Server 2012Kernel DriverMS15-0613057839Github
Windows Server 2003, XPAFD.sysMS11-0802592799EXE

 

Metasploit

ExploitDB

Windows Server 2003, XPNDISTAPIMS11-0622566454ExploitDB
Windows Server 2003, Windows Server 2008, 7, 8, Windows Server 2012RPCMS15-0763067505Github
Windows Server 2003, Windows Server 2008, 7, 8, Windows Server 2012Hot PotatoMS16-0753164038GitHub

 

PowerShell

HotPotato

Windows Server 2003, Windows Server 2008, 7, XPKernel DriverMS15-0103036220GitHub

 

ExploitDB

Windows Server 2003, Windows Server 2008, 7, XPAFD.sysMS11-0462503665EXE

 

ExploitDB

转载于:https://www.cnblogs.com/backlion/p/7326649.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值