安全研究

安全漏洞
AFFLIB多个Shell元字符注入漏洞

发布日期:2007-04-27
更新日期:2007-04-29

受影响系统:
AFFLIB AFFLIB 2.2.0 - 2.2.8
描述:
CVE(CAN) ID: CVE-2007-2055

AFFLIB是用于操作高级取证格式(AFF)文件的开源函数库。

AFFLIB的一些popen()调用未经验证或转义便使用了用户提供的命令行参数,本地攻击者可能利用这些漏洞提升权限。

具体漏洞如下:

* 解压调用Shell命令注入 *

文件:tools/afconvert.cpp
行数:245 & 255

popen()调用未经验证或转义便使用了一个命令行参数,如果这个命令或这个函数接受了不可信任来源的参数,就可能导致执行任意命令。240-257行说明了这个问题:

    /* Check to see if it is a gzip file... */
    if(probe_gzip(infile)
       && yesno("infile looks like a gzip file","Uncompress it","Uncompressing")){
       /* Open with a subprocess. We will need to use zlib when we move to Windows. */
       char buf[256];
       sprintf(buf,"gzcat %s",infile);
       a_in = af_popen(buf,"r");
    }

    /* Check to see if it is a bzip2 file... */
    if(!a_in
       && probe_bzip2(infile)
       && yesno("infile looks like a bzip2 file","Uncompress it","Uncompressing")){
       /* Open with a subprocess. We will need to use bzip2zlib when we move to Windows. */
       char buf[256];
       sprintf(buf,"bzcat %s",infile);
       a_in = af_popen(buf,"r");
    }

    char buf[256];
    sprintf(buf,"gzcat %s",infile);
    a_in = af_popen(buf,"r");

由于af_popen()最终使用了popen()系统调用,且infile直接来自于命令行参数,因此攻击者能够控制输入的话就可以注入特殊的命令行字符。

* 未使用的get_parameter函数Shell命令注入 *

文件:aimage/ident.cpp
行数:190

popen()调用未经验证或转义便使用了一个命令行参数,如果get_parameter函数接受了不可信任来源的参数,就可能导致执行任意命令。但目前这个函数未被使用。

<*来源:Timothy D. Morgan (tmorgan@vsecurity.com
  
  链接:http://marc.info/?l=bugtraq&m=117770462106593&w=2
*>

建议:
厂商补丁:

AFFLIB
------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.afflib.org/index.php

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