1. 程式人生 > 實用技巧 >Windows Win32k 許可權提權漏洞

Windows Win32k 許可權提權漏洞

0X01  簡介:

  本篇文章將集中介紹兩個利用windows win32k服務提權的漏洞。

0X02  CVE-2018-8639:

   1、未正確處理視窗類成員物件導致的Double-free型別本地許可權提升漏洞。

   2、影響範圍:

來自CVE:
Windows 7
Windows Server 2012 R2
Windows RT 8.1
Windows Server 2008
Windows Server 2019
Windows Server 2012
Windows 8.1
Windows Server 2016
Windows Server 2008 R2
Windows 10 1607、1703、1709、1803、1809

來自CNVD:
Windows Server 2008 R2 SP1
Windows Server 2008 SP2
Windows 7 SP1
Windows Server 2012
Windows Server 2012 R2
Windows 8.1
Windows RT 8.1 SP0
Windows 10 1607、1703、1709、1803、1809
Windows Server 2016
Windows Server 2019

   3、exp:

1、https://github.com/ze0r/CVE-2018-8639-exp    來自ze0r大佬。(藍屏機率比較高,作為備用)
2、https://github.com/timwhitez/CVE-2018-8639-EXP    來自timwhite大佬

   4、復現:

    1)ze0r大佬的exp:(我未復現成功,這是別的大佬的圖)

    

    2)timwhite大佬的exp:

    使用方法:CVE-2018-8639-EXP.exe "命令" 這裡會直接以system許可權執行命令。

    

   5、總結:第一個exp可作為備用的來用,因為這個exp很容易藍屏導致目標崩潰。而且提權速度很感人。好處一點是,可以提一次權,然後就不用管了;第二個exp作為主要提權選擇,使用方式上面說的很清楚,很穩定、並且很速度很快,缺點是每次執行命令都必須使用這個exe程式。上述兩個exp均不支援webshell呼叫,只能用於本地提權。

   6、修復:https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8639 官方補丁地址,涉及到的補丁編號參考官方補丁地址。

   7、參考文章: https://mp.weixin.qq.com/s/AUk91ty4JQjKQ6X2jD_Twg

0X03  cve-2019-0803:

  1、漏洞描述:當 Win32k 元件無法正確處理記憶體中的物件時,Windows 中存在特權提升漏洞。成功利用此漏洞的攻擊者可以在核心模式中執行任意程式碼。攻擊者可隨後安裝程式;檢視、更改或刪除資料;或者建立擁有完全使用者許可權的新帳戶。

  2、影響版本:

Microsoft Windows Server 2019 0
Microsoft Windows Server 2016 0
Microsoft Windows Server 2012 R2 0
Microsoft Windows Server 2012 0
Microsoft Windows Server 2008 R2 for x64-based Systems SP1
Microsoft Windows Server 2008 R2 for Itanium-based Systems SP1
Microsoft Windows Server 2008 for x64-based Systems SP2
Microsoft Windows Server 2008 for Itanium-based Systems SP2
Microsoft Windows Server 2008 for 32-bit Systems SP2
Microsoft Windows Server 1803 0
Microsoft Windows Server 1709 0
Microsoft Windows RT 8.1
Microsoft Windows 8.1 for x64-based Systems 0
Microsoft Windows 8.1 for 32-bit Systems 0
Microsoft Windows 7 for x64-based Systems SP1
Microsoft Windows 7 for 32-bit Systems SP1
Microsoft Windows 10 Version 1809 for x64-based Systems 0
Microsoft Windows 10 Version 1809 for ARM64-based Systems 0
Microsoft Windows 10 Version 1809 for 32-bit Systems 0
Microsoft Windows 10 Version 1803 for x64-based Systems 0
Microsoft Windows 10 Version 1803 for ARM64-based Systems 0
Microsoft Windows 10 Version 1803 for 32-bit Systems 0
Microsoft Windows 10 version 1709 for x64-based Systems 0
Microsoft Windows 10 Version 1709 for ARM64-based Systems 0
Microsoft Windows 10 version 1709 for 32-bit Systems 0
Microsoft Windows 10 version 1703 for x64-based Systems 0
Microsoft Windows 10 version 1703 for 32-bit Systems 0
Microsoft Windows 10 Version 1607 for x64-based Systems 0
Microsoft Windows 10 Version 1607 for 32-bit Systems 0
Microsoft Windows 10 for x64-based Systems 0
Microsoft Windows 10 for 32-bit Systems 0

  3、exp:

1、https://github.com/k8gege/K8tools
2、https://github.com/ExpLife0011/CVE-2019-0803

  1)

  

  4、復現:

    1)

    

    

    2)

    

    

    比較:K8師傅的exp更穩定一些,一發入魂。但是執行命令的時候需要執行exp程式;ExpLife0011師傅的雖然不是很穩,但是一次提權,後面執行命令就不需要再執行exp程式了。

  5、修復:https://portal.msrc.microsoft.com/zh-cn/security-guidance/advisory/CVE-2019-0803

  6、參考文章:https://blog.csdn.net/weixin_30908649/article/details/97823518

0X04  總結:

  提權tips:   補丁號有很多個,不同的系統補丁號不一樣,有時新的補丁包含舊洞補丁舊的補丁號會被替換掉,所以每次提權都應該先到官方檢視下對應補丁號。 不要老是查詢有沒舊的補丁號,然後再去提權,沒有舊的補丁號不代表沒補。   漏洞修復連結:        https://portal.msrc.microsoft.com/zh-cn/security-guidance/advisory/CVE-2019-0803     https://portal.msrc.microsoft.com/zh-cn/security-guidance/advisory/CVE-2019-0708   兩者只是漏洞編號不一致,其他都相同。