C:IFS System()漏洞 [英] C: IFS System() Vulnerability

查看:136
本文介绍了C:IFS System()漏洞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于教育原因,我必须使用C代码

For educational reasons I have to exploit an C-Code

程序首先设置egid,然后使用system("/usr/bin/...");命令设置漏洞.

The Programm set the egid first, and then the vulnerability with the system("/usr/bin/..."); Command.

因此我在自己的Home-Directory中将一个'usr'执行为可执行文件,并将路径设置为Home PATH=$HOME:$PATH

So I made an 'usr' executeable in my Home-Directory and set the Path to the Home PATH=$HOME:$PATH

我想将bash中的IFS变量更改为/:export IFS='/'

And I want to change the IFS Variable in the bash to /: export IFS='/'

不幸的是,当我调用C-Programm时:我的漏洞无法使用

Unfortunatelly, when i call the C-Programm: my exploit doesn't work

有人能告诉我哪里出了问题吗?

Is anybody able to tell me what is wrong?

推荐答案

我想我们正在同一所大学学习,因为我目前面临着同样的问题.我不想给您整个解决方案,因为那太容易了=)

I suppose we are studying at the same university, because I am currently confronted with the same problem. I don't want to give you the whole solution, because that would be too easy =)

您的IFS变量不会被忽略,但是您可能认为它不起作用.当您调用C-Programm时,外壳中会有一个附加输出,该输出引用了lesspipe.使用此链接中的信息

Your IFS variable is not ignored, but it doesn't work as you might think. When you call the C-Programm there is an additional output in the shell, which refers to the lesspipe. With the information in this link and this german link you are able to solve the challenge1 ;)

这篇关于C:IFS System()漏洞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆