首页 -> 安全研究

安全研究

安全漏洞
H-Sphere Webshell flist()远程缓冲区溢出漏洞

发布日期:2003-01-06
更新日期:2003-01-13

受影响系统:
Positive Software H-Sphere 2.3 RC3
不受影响系统:
Positive Software H-Sphere 2.4
描述:
BUGTRAQ  ID: 6538

Webshell是一款基于WEB的应用程序,可以作为文件管理器进行文件上传和下载处理,使用用户名/密码方式进行认证,以suid root属性运行。

Webshell使用的flist()函数存在缓冲区溢出,远程攻击者可以利用这个漏洞覆盖堆栈中数据,可能以root用户权限在系统上执行任意指令。

flist.c包含如下flist()函数:

char fname[256];
int esize=strlen(ext);
int fsize;
if ((cdir=opendir(dname))!=NULL) {
   while ((cfile=readdir(cdir)) != NULL) {
     if ((esize>=(fsize=strlen(cfile->d_name))) ||
         (strstr(cfile->d_name+fsize-esize,ext)==NULL)) continue;

     strcpy(fname, dname);
     strcat(fname, "/");
     strcat(fname, cfile->d_name);

其中接收外部参数拷贝到fname[]数组时缺少正确检查,可导致EIP覆盖,精心构建提交数据可能以root用户权限在系统上执行任意指令。

<*来源:Carl Livitt (carl@learningshophull.co.uk
  
  链接:http://marc.theaimsgroup.com/?l=bugtraq&m=104187147309413&w=2
*>

建议:
厂商补丁:

Positive Software
-----------------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

升级程序:

http://www.hsphere.com/WebShell-2.4.tar.gz

或下载补丁:

http://www.psoft.net/misc/webshell_patch.html

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