经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库/运维 » Windows » 查看文章
Windows CVE-2019-0708 远程桌面代码执行漏洞复现
来源:cnblogs  作者:雨中落叶  时间:2019/9/10 10:47:25  对本文有异议

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、下载攻击套件

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

3、替换msf中相应的文件 

  1. cve_2019_0708_bluekeep_rce.rb 添加 /usr/share/metasploit-framework/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb
  2. rdp.rb 替换 /usr/share/metasploit-framework/lib/msf/core/exploit/rdp.rb
  3. rdp_scanner.rb 替换 /usr/share//metasploit-framework/modules/auxiliary/scanner/rdp/rdp_scanner.rb
  4. 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. 1 下载文件进行解压。
  2. 2 使用win+R快捷键或开始菜单选择“运行”,输入cmd。调起命令行工具。
  3. 3 在命令行工具,执行命令到工具所在文件夹
  4. 4 输入命令对应功能,启用热补丁命令:QKShield.exe /enable ;禁用热补丁命令:QKShield.exe/disable
  5. 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

原文链接:http://www.cnblogs.com/yuzly/p/11485316.html

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号