Windows CVE-2019-0708 遠程桌面代碼執行漏洞復現 一、漏洞說明 2019年5月15日微軟發佈安全補丁修複了CVE編號為CVE-2019-0708的Windows遠程桌面服務(RDP)遠程代碼執行漏洞,該漏洞在不需身份認證的情況下即可遠程觸發,危害與影響面極大。 目前,9月7日EX ...
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