set-uid 实验

csdn不能直接复制粘贴图片真的很麻烦啊啊啊啊。。。所以下面的没有图片。。

具体的操作流程可以看http://www.cnblogs.com/20125127bxx/p/4472261.html这个博客。


Set-UID Program Vulnerability


个人收获:通过本次实验,对set-uid的理解更加深入了,set-uid提供给了普通用户一个临时使用root功能的途径。对有些功能,例如更改密码来说,这样的功能是很方便并且有必要的。但是如果滥用这个功能,就会使系统失去保护。

在实验中需要注意的是,在2.4中更改了PATH之后,需要把PATH路径改回默认的路径:export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin  

以下是本次实验的过程。

 

2.1 Figure out why "passwd", "chsh", "su", and"sudo" commands need to be Set-UID programs. What will happen if theyare not? If you are not familiar with these programs, you should first learnwhat they can do by reading their manuals. Please copy these commands to yourown directory; the copies will not be Set-UID programs. Run the copiedprograms, and observe what happens。

分析:可以看到,copytmppasswd没有get-uid的权限。同理,复制的chshshsudo文件也没有get-uid的权限。

 

2.2 Run Set-UID shell programs in Linux, and describe and explain yourobservations.

(a) Login as root, copy /bin/zsh to/tmp, and make it a set-root-uid program with permission

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值