近20年Windows权限提升集合(上)

2020-10-27 10,269

声明

郑重声明:文中所涉及的技术、思路和工具仅供以安全为目的的学习交流使用,任何人不得将其用于非法用途以及盈利等目的,否则后果自行承担!

前言

这篇文章是基于红蓝功防中的一个小结提取出来的文章,主要都是一些CVE的利用

文章所使用的源码地址

各位师傅麻烦点个Star

  https://github.com/Ascotbe/KernelHub

复现环境

  • 系统环境

    #Windows 7 SP1 X64 
    ed2k://|file|cn_windows_7_home_premium_with_sp1_x64_dvd_u_676691.iso|3420557312|1A3CF44F3F5E0BE9BBC1A938706A3471|/
    #Windows 7 SP1 X86
    ed2k://|file|cn_windows_7_home_premium_with_sp1_x86_dvd_u_676770.iso|2653276160|A8E8BD4421174DF34BD14D60750B3CDB|/
    #Windows Server 2008 R2 SP1 X64
    ed2k://|file|cn_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617598.iso|3368839168|D282F613A80C2F45FF23B79212A3CF67|/
    #Windows Server 2003 R2 SP2 x86
    ed2k://|file|cn_win_srv_2003_r2_enterprise_with_sp2_vl_cd1_X13-46432.iso|637917184|284DC0E76945125035B9208B9199E465|/
    #Windows Server 2003 R2 SP2 x64
    ed2k://|file|cn_win_srv_2003_r2_enterprise_x64_with_sp2_vl_cd1_X13-47314.iso|647686144|107F10D2A7FF12FFF0602FF60602BB37|/
    #Windows Server 2008 SP2 x86
    ed2k://|file|cn_windows_server_standard_enterprise_and_datacenter_with_sp2_x86_dvd_x15-41045.iso|2190057472|E93B029**42F19024AA9EF8FB02AC90B|/
    #Windows Server 2000 SP4 x86
    ed2k://|file|ZRMPSEL_CN.iso|402690048|00D1BDA0F057EDB8DA0B29CF5E188788|/
    #Windows Server 2003 SP2 x86
    thunder://QUFodHRwOi8vcy5zYWZlNS5jb20vV2luZG93c1NlcnZlcjIwMDNTUDJFbnRlcnByaXNlRWRpdGlvbi5pc29aWg==
    #Windows 8.1 x86
    ed2k://|file|cn_windows_8_1_enterprise_x86_dvd_2972257.iso|3050842112|6B60ABF8282F943FE92327463920FB67|/
    #Windows 8.1 x64
    ed2k://|file|cn_windows_8_1_x64_dvd_2707237.iso|4076017664|839CBE17F3CE8411E8206B92658A91FA|/
    #Windows 10 1709 x64
    ed2k://|file|cn_windows_10_multi-edition_vl_version_1709_updated_dec_2017_x64_dvd_100406208.iso|5007116288|317BDC520FA2DD6005CBA8293EA06DF6|/
    #Windows 10 2004 x64 (2020-05-21 release version)
    magnet:?xt=urn:btih:8E49569FDE852E4F3CCB3D13EFB296B6B02D82A6
  • 所需Linux编译环境

    sudo vim /etc/apt/sources.list
    #在sources.list末尾添加deb http://us.archive.ubuntu.com/ubuntu trusty main universe
    sudo apt-get update
    sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
    sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools
  • 所需Windows编译环境

    VS2019(内置V142、V141、V120、V110、V120_xp、V110_xp、MFC)

CVE-2020-16938

描述

Windows 内核存在信息泄露漏洞。该漏洞允许攻击者可以获取信息,从而进一步入侵用户系统。

影响版本

Product Version Update Edition Tested
Windows 10 X86/x64/ARM64 2004
✔️

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-16938

利用方式

编译环境

  • VS2019(V142)X64 Release

  • VS2019(V142)X86 Release

测试系统windows 10 2004 x64

第一种利用方式

直接利用7Z GUI的方式,即可在非管理员权限下查看config文件夹中的sam文件,而在Windows文件夹中查看会弹出UAC弹框

CVE-2020-16938_win10_2004.png

第二种方式

ioncodes写的exp,目前我没没搞懂怎么操作

项目来源

CVE-2020-16898

描述

CVE-2020-16898被称为“坏邻居”漏洞。Windows TCP/IP协议栈在处理 ICMPv6 路由广告包时,存在此远程代码执行漏洞。由于使用选项类型25和偶数长度字段对ICMPv6路由器播发数据包的处理不当,导致存在此漏洞。攻击者可通过向受影响主机发送特制ICMPv6路由广告包来利用此漏洞,成功利用此漏洞的攻击者可在目标服务器或客户端上执行任意代码。

影响版本

Product Version Update Edition Tested
Windows 10 X86/x64/ARM64 1709
✔️
Windows 10 X86/x64/ARM64 1803

Windows 10 X86/x64/ARM64 1809

Windows 10 X86/x64/ARM64 1903

Windows 10 X86/x64/ARM64 1909

Windows 10 X86/x64/ARM64 2004

Windows Server 2019



Windows Server 2019 (Server Core installation)



Windows Server, version 1903 (Server Core installation)



Windows Server, version 1909 (Server Core installation)



Windows Server, version 2004 (Server Core installation)



修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-16898

利用方式

目前只空开蓝屏POC,充其量就算个CVE-2020-16899,利用前需要在虚拟机中开启IPV6,如图所示

CVE-2020-16898_ipv6_open.png

接着把CVE-2020-16898.py脚本中的IPV6地址修改下

CVE-2020-16898_py.png

最后使用命令pip install scapy,安装依赖包,接着直接利用即可蓝屏

脚本来源


CVE-2020-0787

描述

当Windows Background Intelligent Transfer Service(BITS)未能正确地处理符号链接时,存在权限提升漏洞。成功利用此漏洞的攻击者可以覆盖导致提升状态的目标文件。要利用此漏洞,攻击者首先必须登录到系统。然后,攻击者可以运行巧尽心思构建的应用程序,利用此漏洞并控制受影响的系统。

影响版本

Microsoft Windows 7 SP1,Windows 8.1,Windows RT 8.1,Windows 10,Windows Server 2008 SP2,Windows Server 2008 R2 SP1,Windows Server 2012,Windows Server 2012 R2,Windows Server 2016,Windows Server 2019,Windows 10版本1607,Windows 10版本1709,Windows 10版本1803,Windows 10版本1809,Windows 10版本1903,Windows 10版本1909,Windows Server版本1803,Windows Server版本1903,Windows Server版本1909。

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-0787

利用方式

编译环境

  • VS2019 (V120)X64 Debug

编译好的文件

https://github.com/Ascotbe/WindowsKernelExploits/blob/master/CVE-2020-0787/BitsArbitraryFileMoveExploit.exe

直接上GIF图

1.gif


CVE-2020-0796

描述

该漏洞无需授权验证即可被远程利用,可能形成蠕虫级漏洞。目前利用方式是提权

影响版本

Windows 10 Version 1903 for 32-bit Systems
Windows 10 Version 1903 for x64-based Systems
Windows 10 Version 1903 for ARM64-based Systems
Windows Server, version 1903 (Server Core installation)
Windows 10 Version 1909 for 32-bit Systems
Windows 10 Version 1909 for x64-based Systems
Windows 10 Version 1909 for ARM64-based Systems
Windows Server, version 1909 (Server Core installation)
只影响 SMB v3.1.1,1903和1909

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-0796

利用方式

这个有点鸡肋特定的windows10 才行还有一个Windows Server 2016

编译方式

  • VS2019(V142)X64 Debug

编译好的文件位置

https://github.com/Ascotbe/WindowsKernelExploits/blob/master/CVE-2020-0796/cve-2020-0796-local.exe

环境下载,这边用的是windows 10 Version 1903

ed2k://|file|cn_windows_10_business_editions_version_1903_x64_dvd_e001dd2c.iso|4815527936|47D4C57E638DF8BF74C59261E2CE702D|/

查看MD5值

Get-FileHash -Path c:/windows/system32/drivers/srv2.sys

5.png

然后就直接上GIF图了

6.gif

CVE-2019-1388

描述

该漏洞位于Windows的UAC(User Account Control,用户帐户控制)机制中。默认情况下,Windows会在一个单独的桌面上显示所有的UAC提示——Secure Desktop。这些提示是由名为consent.exe的可执行文件产生的,该可执行文件以NT AUTHORITY\SYSTEM权限运行,完整性级别为System。因为用户可以与该UI交互,因此必须对UI进行严格限制。否则,低权限的用户可能可以通过UI操作的循环路由以SYSTEM权限执行操作。即使隔离状态的看似无害的UI特征都可能会成为引发任意控制的动作链的第一步。事实上,UAC对话框已被精简,仅包含最少的可单击选项。

影响版本

Microsoft Windows Server 2019
Microsoft Windows Server 2016
Microsoft Windows Server 2012
Microsoft Windows Server 2008 R2
Microsoft Windows Server 2008
Microsoft Windows RT 8.1
Microsoft Windows 8.1
Microsoft Windows 7

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-1388

利用方式

这边直接贴一个GIF图就好了,利用文件位置

https://github.com/Ascotbe/WindowsKernelExploits/blob/master/CVE-2019-1388/HHUPD.EXE

2.gif


CVE-2019-1458

描述

CVE-2019-1458是Win32k中的特权提升漏洞,Win32k组件无法正确处理内存中的对象时,导致Windows中存在一个特权提升漏洞。成功利用此漏洞的攻击者可以在内核模式下运行任意代码。然后攻击者可能会安装程序、查看、更改或删除数据;或创建具有完全用户权限的新帐户。

影响版本

Microsoft Windows 10 Version 1607 for 32-bit Systems
Microsoft Windows 10 Version 1607 for x64-based Systems
Microsoft Windows 10 for 32-bit Systems
Microsoft Windows 10 for x64-based Systems
Microsoft Windows 7 for 32-bit Systems SP1
Microsoft Windows 7 for x64-based Systems SP1
Microsoft Windows 8.1 for 32-bit Systems
Microsoft Windows 8.1 for x64-based Systems
Microsoft Windows RT 8.1
Microsoft Windows Server 2008 R2 for Itanium-based Systems SP1
Microsoft Windows Server 2008 R2 for x64-based Systems SP1
Microsoft Windows Server 2008 for 32-bit Systems SP2
Microsoft Windows Server 2008 for Itanium-based Systems SP2
Microsoft Windows Server 2008 for x64-based Systems SP2
Microsoft Windows Server 2012
Microsoft Windows Server 2012 R2
Microsoft Windows Server 2016

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-1458

利用方式

编译环境

  • VS2019(V120)X64 Release

编译好的文件

https://github.com/Ascotbe/WindowsKernelExploits/blob/master/CVE-2019-1458/cve-2019-1458.exe

然后直接上GIF图

3.gif

CVE-2019-0803

描述

Win32k 权限提升漏洞

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1607


Windows 10 1703


Windows 10 1709


Windows 10 1803


Windows 10 1809


Windows 7 - SP1

Windows 8.1 -


Windows Rt 8.1 -


Windows Server 2008 - SP2
✔️
Windows Server 2008 R2 SP1 itanium
Windows Server 2008 R2 SP1 x64
Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016 -


Windows Server 2016 1709


Windows Server 2016 1803


Windows Server 2019 -


修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0803

利用方式

编译环境

  • VS2019(V142)X64 Debug

这里测试机器是windows server 2008 R2 x64,上GIF图

4.gif

CVE-2018-8639

描述

这个漏洞属于未正确处理窗口类成员对象导致的Double-free类型本地权限提升漏洞

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1607


Windows 10 1703


Windows 10 1709


Windows 10 1803


Windows 10 1809


Windows 7 - SP1

Windows 8.1 -
pro N
Windows Rt 8.1 -


Windows Server 2008 - SP2

Windows Server 2008 R2
itanium
Windows Server 2008 R2
x64
Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016 -


Windows Server 2016 1709


Windows Server 2016 1803


Windows Server 2019 -


修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8639

利用方式

编译环境

  • VS2019(V140)X64 Release

在Windows 2008 X64上测试通过的EXP,直接上GIF图

7.gif

编译环境

  • VS2019(V120)X64 Debug,需要安装如下包作为支撑

    https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=40770

Windows 7 X64测试通过的EXP,上GIF图

8.gif

CVE-2019-0859

描述

当Win32k组件无法正确处理内存中的对象时,Windows即存在一个特权提升漏洞

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1607


Windows 10 1703


Windows 10 1709


Windows 10 1803


Windows 10 1809


Windows 7 - SP1

Windows 8.1 -


Windows Rt 8.1 -


Windows Server 2008 - SP2

Windows Server 2008 R2 SP1 itanium
Windows Server 2008 R2 SP1 x64
Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016 -


Windows Server 2016 1709


Windows Server 2016 1803


Windows Server 2019 -


修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0859

利用方式

暂无


CVE-2018-1038

描述

Windows内核由于处理内存中对象的方式而存在特权提升漏洞

影响版本

Product Version Update Edition Tested
Windows 7 - SP1 x64
Windows Server 2008 R2 SP1 x64

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-1038

利用方式

暂无找到可以测试通过的POC


CVE-2018-0743

描述

Windows Subsystem for Linux in Windows 10 version 1703, Windows 10 version 1709, and Windows Server, version 1709 allows an elevation of privilege vulnerability due to the way objects are handled in memory, aka "Windows Subsystem for Linux Elevation of Privilege Vulnerability".

影响版本

Product Version Update Edition Tested
Windows 10 1703


Windows 10 1709


Windows Server 2016 1709


修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-0743

利用方式

暂无


CVE-2018-8453

描述

Microsoft Windows中存在提权漏洞,该漏洞源于Win32k组件没有正确的处理内存对象。本地攻击者可通过登录系统并运行特制的应用程序,利用该漏洞在内核模式下以提升的权限执行代码。

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1607


Windows 10 1703


Windows 10 1709


Windows 10 1803


Windows 10 1809


Windows 7 - SP1

Windows 8.1



Windows Rt 8.1 -


Windows Server 2008 - SP2

Windows Server 2008 R2 SP1

Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016 -


Windows Server 2016 1709


Windows Server 2016 1803


Windows Server 2019 -


修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8453

利用方式

编译环境

  • VS2019 (V140)X64 Release

测试系统Windows 10 1709 x64


项目来源


CVE-2018-8440

描述

An elevation of privilege vulnerability exists when Windows improperly handles calls to Advanced Local Procedure Call (ALPC), aka "Windows ALPC Elevation of Privilege Vulnerability." This affects Windows 7, Windows Server 2012 R2, Windows RT 8.1, Windows Server 2008, Windows Server 2012, Windows 8.1, Windows Server 2016, Windows Server 2008 R2, Windows 10, Windows 10 Servers.

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1607


Windows 10 1703


Windows 10 1709


Windows 10 1803


Windows 7 - SP1

Windows 8.1 -


Windows Rt 8.1 -


Windows Server 2008 - SP2

Windows Server 2008 R2 SP1

Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016 -


Windows Server 2016 1709


Windows Server 2016 1803


修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8440

利用方式

暂无


CVE-2018-8120

描述

Microsoft Windows中存在提权漏洞,该漏洞源于Win32k组件NtUserSetImeInfoEx函数内部SetImeInfoEx函数的没有正确的处理内存中的空指针对象。攻击者可利用该空指针漏洞在内核模式下以提升的权限执行任意代码。

影响版本

Product Version Update Edition Tested
Windows 7 - SP1
✔️
Windows Server 2008 - SP2

Windows Server 2008 R2 SP1 itanium
Windows Server 2008 R2 SP1 x64 ✔️

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8120

利用方式

编译环境

  • VS2019(V120)X64 Release

  • VS2019(V120)X32 Release,需要移除shellcode.asm这个文件后编译

当前测试系统Windows 7 x64

CVE-2018-8120_win7_x64.gif


CVE-2017-8464

描述

该漏洞的原理同2010年美国和以色列入侵并破坏伊朗核设施的震网行动中所使用的穿透核设施隔离网络的漏洞(CVE-2010-2568)非常类似,当存在漏洞的电脑被插上保存有漏洞文件的U盘时,不需要额外操作,漏洞攻击程序就可以执行并完全控制用户的电脑系统

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1511


Windows 10 1607


Windows 10 1703


Windows 7 - SP1

Windows 8.1 -


Windows Rt 8.1 -


Windows Server 2008 - SP2

Windows Server 2008 R2 SP1 itanium
Windows Server 2008 R2 SP1 x64
Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016 -


修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-8464

利用方式

直接用msf来利用

use exploits/windows/fileformat/cve_2017_8464_lnk_rce
set payload windows/x64/exec #要是x86使用windows/exec,还可以设置后门windows/x64/meterpreter/reverse_tcp
set cmd cmd.exe
set EXITFUNC thread
run

生成文件

CVE-2017-8464_win7_x86_msf.png

运行命令把它拷贝到test目录下

cp -r /root/.msf4/local/ /root/test

CVE-2017-8464_win7_x86_msf2.png

接着把这些文件全部拷贝到U盘中,然后插上电脑即可

测试机器是虚拟机,所以需要打一个补丁KB2533623和装一个驱动Intel(R)_USB_3.0_eXtensible_Host_Controller_Driver_5.0.4.43_v2,然后USB设置为3.0,windows7的补丁放在了这里

https://github.com/Ascotbe/WinKernelhub/tree/master/Patch

GIF图如下

CVE-2017-0213_win7_x86.gif


CVE-2017-0213

描述

特权提升存在于Windows COM封装。攻击者成功地利用该漏洞可以运行任意代码具有较高的特权。为了利用该漏洞,攻击者可以运行一个特制的应用程序,可以利用漏洞。此漏洞本身不允许任意代码运行。但是,该漏洞可以与一个或多个漏洞(例如远程代码执行漏洞和另一个特权级别)一起使用,可以在运行时利用提升特权。

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1511


Windows 10 1607


Windows 10 1703


Windows 7
SP1

Windows 8.1



Windows Rt 8.1



Windows Server 2008
SP2

Windows Server 2008 R2 SP1

Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016



修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-0213

利用方式

编译环境

  • VS2019(V120)X64 Release

  • VS2019(V120)X32 Release

CVE-2017-0213_win7_x86.gif

CVE-2017-0101

描述

GDI调色板对象本地特权升级,允许本地用户通过精心设计的应用程序(也称为“ Windows特权提升漏洞”)获得特权。

影响版本

Product Version Update Edition Tested
Windows 10



Windows 10 1511


Windows 10 1607


Windows 7 - SP1
✔️
Windows 8.1



Windows Rt 8.1 -


Windows Server 2008 - SP2

Windows Server 2008 R2


Windows Server 2012 R2


Windows Vista - SP2

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-0101

利用方式

编译环境

  • VS2019(V142)X32 Release

测试windows 7 sp1 x86通过,windows 7 sp1 x64不通过,直接上GIF图

CVE-2017-0101_win7_x86.gif

CVE-2017-0143

描述

Eternalblue通过TCP端口445和139来利用SMBv1和NBT中的远程代码执行漏洞,恶意代码会扫描开放445文件共享端口的Windows机器,无需用户任何操作,只要开机上网。大名鼎鼎的永恒之蓝漏洞

影响版本

Product Version Update Edition Tested
Windows 10



Windows 10 1511


Windows 10 1607


Windows 7 - SP1
✔️
Windows 8.1



Windows Rt 8.1 -


Windows Server 2008 - SP2

Windows Server 2008 R2 SP1

Windows Server 2012 R2


Windows Server 2012 Gold


Windows Server 2016



Windows Vista
SP2

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-0143

利用方式

直接用msf就行,方便快捷,测试系统windows 7 sp1 x64

use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 192.168.0.128
run

CVE-2017-0143_msf_2.png

并且权限是system的

CVE-2017-0143_msf_2.png


CVE-2016-7255

描述

如果 Windows 内核模式驱动程序无法正确处理内存中对象,则会存在多个特权提升漏洞。成功利用此漏洞的攻击者可以在内核模式下运行任意代码。攻击者可随后安装程序;查看、更改或删除数据;或者创建拥有完全用户权限的新帐户。

影响版本

Product Version Update Edition Tested
Windows 10 -

✔️
Windows 10 1511

✔️
Windows 10 1607


Windows 7
SP1
✔️
Windows 8.1


✔️
Windows Rt 8.1



Windows Server 2008
SP2
✔️
Windows Server 2008 R2 SP1
✔️
Windows Server 2012 -


Windows Server 2012 R2


Windows Server 2016



Windows Vista
SP2

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2016-7255

利用方式

编译环境

  • VS2019(V140)X64 Release

该漏洞通杀所有受影响的系统X64版本,有三个EXP可以使用,目前windows_7_8_10_2008_x64文件夹内的文件和CVE-2016-7255.ps1通杀所有系统,CVE-2016-7255_windows_2008_x64文件夹内文件在windows server 2008 R2 sp1 x64上可以使用,windows 7 sp1 x64系统上会导致蓝屏

通过ps脚本进行演示,直接上GIF图

CVE-2016-7255_win7_x86.gif

CVE-2016-3371

描述

内核API无法正确实施权限, 允许本地用户通过精心设计的应用程序特权提升

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1511


Windows 10 1607


Windows 7
SP1

Windows 8.1



Windows Rt 8.1



Windows Server 2008
SP2

Windows Server 2008 R2 SP1

Windows Server 2012 -


Windows Server 2012 R2


Windows Vista
SP2

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2016-3371

利用方式

测试系统Windows 8.1 x64

CVE-2016-3371_win_8.1_x64.gif

项目来源

CVE-2016-3309

描述

内核模式驱动程序允许本地用户通过精心设计的应用程序获得特权

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1511


Windows 10 1607


Windows 7
SP1

Windows 8.1



Windows Rt 8.1



Windows Server 2008
SP2

Windows Server 2008 R2 SP1

Windows Server 2012 -


Windows Server 2012 R2


Windows Vista
SP2

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2016-3309

利用方式

暂无


CVE-2016-3225

描述

Windows SMB 服务器特权提升漏洞(CVE漏洞编号:CVE-2016-3225)当攻击者转发适用于在同一计算机上运行的其他服务的身份验证请求时,Microsoft 服务器消息块 (SMB) 中存在特权提升漏洞,成功利用此漏洞的攻击者可以使用提升的特权执行任意代码。若要利用此漏洞,攻击者首先必须登录系统。然后,攻击者可以运行一个为利用此漏洞而经特殊设计的应用程序,从而控制受影响的系统。

影响版本

Product Version Update Edition Tested
Windows 10 -


Windows 10 1511


Windows 7
SP1
✔️
Windows 8.1



Windows Rt 8.1



Windows Server 2008
SP2

Windows Server 2008 R2 SP1

Windows Server 2012 -


Windows Server 2012 R2


Windows Vista
SP2

修复补丁

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2016-3225

利用方式

注意:需要用管理员权限运行MSF生成的文件才能提权到system权限

windows 7 sp1 x64测试中,使用whoami /priv命令查看发现并无SeImpersonatePrivilege特权烂土豆提权需要该特权为开启状态,所以测试的时候直接用管理员权限运行

CVE-2016-3225_win7_x64.png

利用MSF+烂土豆提权,首先我们假定机器已经上线,通过msf中自带的插件来识别当前系统中可以利用的EXP来进行提权

use multi/recon/local_exploit_suggester
set session 1 #当前机器的session
run

如果没有用管理员权限运行MSF生成的exe的话,脚本检测是这样的

CVE-2016-3225_win7_x64_msf_1.png

如果使用管理员权限运行的话检测是这样的,可以看到比上面多了个ms16_075

CVE-2016-3225_win7_x64_msf_2.png

编译好烂土豆的文件,接着上传编译好的文件

upload /Users/ascotbe/Downloads/Potato.exe C:/Users/ascotbe #上传potato.exe到目标机器中的C:\Users\ascotbe目录下,msf无法识别\符号所以必须使用/符号

然后执行如下命令即可提权成功了

use incognito #加载incoginto功能(用来盗窃目标主机的令牌或是假冒用户)
list_tokens -u #列出目标主机用户的可用令牌
execute -cH -f C:/Users/ascotbe/potato.exe #创建新的进程
list_tokens -u #列出目标主机用户的可用令牌
impersonate_token "NT AUTHORITY\SYSTEM"#假冒目标主机上的可用令牌

CVE-2016-3225_win7_x64_msf_4.png

进入shell查看

CVE-2016-3225_win7_x64_msf_4.png

第二种利用方式

编译方式

  • VS2019(V141)X64 Release

由于普通账号没有SeImpersonatePrivilege特权,这边用管理员账号来演示,利用程序potatoNG.exe,直接上GIF图

CVE-2016-3225_win7_x64.gif


本文作者:ascotbe

本文为安全脉搏专栏作者发布,转载请注明:https://www.secpulse.com/archives/144441.html

Tags:
评论  (0)
快来写下你的想法吧!

ascotbe

文章数:12 积分: 190

安全问答社区

安全问答社区

脉搏官方公众号

脉搏公众号