BUGTRAQ ID: 35593
CVE(CAN) ID: CVE-2009-0667
OCS Inventory NG(Open Computer and Software Inventory Next Generation)是一款系统管理软件,能帮助管理员掌握计算机软件安装和配置,在HTTP代理和服务器之间实现低网络流量通讯。
OCS Inventory套件中的代理组件没有安全地处理Perl模块搜索路径。在通过cron启动代理且默认的Perl模块路径中包含有当前目录的情况下,代理会在系统上的每个目录中扫描Perl模块。以下是Agent/Backend.pm中所执行的代码:
foreach my $d (@INC) {
next unless -d $d;
File::Find::find( sub {
push @installed_mod, $File::Find::name if $File::Find::name =~ /Ocsinventory\/Agent\/Backend\/.*\.pm$/;
}
, $d);
}
由于@INC中包含有“.”,这实际会导致从$pwd扫描所有的子目录。
如果攻击者在系统中放置了特制的ocsinventory-agent perl模块,在扫描到该模块时就会导致执行任意代码。
OCS Inventory NG 1.00
厂商补丁:
Debian已经为此发布了一个安全公告(DSA-1828-1)以及相应补丁:
DSA-1828-1:New ocsinventory-agent packages fix arbitrary code execution
链接:http://www.debian.org/security/2009/dsa-1828
补丁下载:
Source archives:
http://security.debian.org/pool/updates/main/o/ocsinventory-agent/ocsinventory-agent_0.0.9.2repack1-4lenny1.dsc
Size/MD5 checksum: 1334 cf43f5ea659d2ec4d4b854953e8c18c6
http://security.debian.org/pool/updates/main/o/ocsinventory-agent/ocsinventory-agent_0.0.9.2repack1.orig.tar.gz
Size/MD5 checksum: 207786 ce09d43d41596641dbb1bd66dc4f2b62
http://security.debian.org/pool/updates/main/o/ocsinventory-agent/ocsinventory-agent_0.0.9.2repack1-4lenny1.diff.gz
Size/MD5 checksum: 12171 d718e83817905e2e22edcfa25fa863b4
Architecture independent packages:
http://security.debian.org/pool/updates/main/o/ocsinventory-agent/ocsinventory-agent_0.0.9.2repack1-4lenny1_all.deb
Size/MD5 checksum: 83362 1d103ed0bb2520dfb3fc8b430ae30a6c
补丁安装方法:
首先,使用下面的命令来下载补丁软件:
然后,使用下面的命令来安装补丁:
使用apt-get自动安装补丁包:
首先,使用下面的命令更新内部数据库:
然后,使用下面的命令安装更新软件包: