3

攻防世界 level0

 3 years ago
source link: https://blog.csdn.net/weixin_45846085/article/details/116853943
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
攻防世界 level0_b0ck的博客-CSDN博客

攻防世界第一题,很简单一个栈溢出。
首先拿到一个elf文件,把它放到ubuntu中检查一下在这里插入图片描述
动态链接,小端序,64位只打开了NX保护,接下来看一下文件中引用的字符串在这里插入图片描述
发现有system和/bin/sh,使用64位的IDA反编译一下。
在这里插入图片描述
只有一个脆弱函数,很明显了。
在这里插入图片描述
read出存在栈溢出漏洞,接下来寻找一下system和/bin/sh

在这里插入图片描述
发现存在后门函数,我们之接利用栈溢出漏洞控制程序跳转到callsystem处就可以getshell了。
gdb调试得到需要填充的垃圾数据
在这里插入图片描述
接下来看exp
在这里插入图片描述
运行脚本,成功getshell在这里插入图片描述


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK