<?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>Sneaky Bastard &#187; WordPress</title>
	<atom:link href="http://sneakybastard.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://sneakybastard.com</link>
	<description>Web Hosting for the Chemically Unstable</description>
	<lastBuildDate>Tue, 01 Jun 2010 06:44:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quick WordPress Intrusion Detection</title>
		<link>http://sneakybastard.com/2009/09/quick-wordpress-intrusion-detection/</link>
		<comments>http://sneakybastard.com/2009/09/quick-wordpress-intrusion-detection/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 02:17:23 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sneakybastard.com/?p=390</guid>
		<description><![CDATA[
To satisfy my curiosity after the increase in worm activity affecting WordPress websites, I decided to run a quick query of the wp_users table in all the WordPress databases on a server. Adjust the database names as necessary, and create a MySQL password file as /root/.my.cnf before running the loop:

for U in adam baker charlie [...]]]></description>
			<content:encoded><![CDATA[<p>
To satisfy my curiosity after the increase in <a href="http://mashable.com/2009/09/05/wordpress-attack/">worm activity</a> affecting WordPress websites, I decided to run a quick query of the <kbd>wp_users</kbd> table in all the WordPress databases on a server. Adjust the database names as necessary, and create a MySQL password file as <kbd>/root/.my.cnf</kbd> before running the loop:
</p>
<p><code>for U in adam baker charlie delta; do<br />
&nbsp;&nbsp;DB="${U}_wordpress"<br />
&nbsp;&nbsp;echo "Database: $DB"<br />
&nbsp;&nbsp;sudo -H mysql -D $DB -e "<br />
&nbsp;&nbsp;&nbsp;&nbsp;SELECT u.user_login, u.user_registered, um.meta_value<br />
&nbsp;&nbsp;&nbsp;&nbsp;FROM wp_users u INNER JOIN wp_usermeta um ON (u.id = um.user_id)<br />
&nbsp;&nbsp;&nbsp;&nbsp;WHERE um.meta_key = 'wp_capabilities'<br />
&nbsp;&nbsp;&nbsp;&nbsp;ORDER BY u.user_registered DESC"<br />
&nbsp;&nbsp;echo ""<br />
done<br />
</code></p>
<p>
The output will show the most recently created user accounts for each WordPress installation. Apparently the current worm creates an administrator account called &ldquo;Administrator (2)&rdquo; that is used to login and make changes to the site. I don&#8217;t know if that string appears in the nickname field, or what, so I didn&#8217;t query for it explicitly.
</p></p>
]]></content:encoded>
			<wfw:commentRss>http://sneakybastard.com/2009/09/quick-wordpress-intrusion-detection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird WordPress Problem in ThickBox CSS</title>
		<link>http://sneakybastard.com/2009/07/weird-wordpress-problem-in-thickbox-css/</link>
		<comments>http://sneakybastard.com/2009/07/weird-wordpress-problem-in-thickbox-css/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 16:44:52 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sneakybastard.com/?p=319</guid>
		<description><![CDATA[For some bizarre reason, the ThickBox CSS file (/wp-includes/js/thickbox/thickbox.css) was hanging display of the administrative interface. An HTTP request for the file would not get a response &#8212; I even tried connecting via telnet and typing the request by hand. I moved the file elsewhere and made the same request; the WordPress PHP handler correctly [...]]]></description>
			<content:encoded><![CDATA[<p>For some bizarre reason, the ThickBox CSS file (<kbd>/wp-includes/js/thickbox/thickbox.css</kbd>) was hanging display of the administrative interface. An HTTP request for the file would not get a response &#8212; I even tried connecting via telnet and typing the request by hand. I moved the file elsewhere and made the same request; the WordPress PHP handler correctly responded with the theme&#8217;s 404 page. I put a placeholder file in place, and it worked fine.</p>
<p>The solution was to remove the CSS comments in the stylesheet. I don&#8217;t know why this would cause trouble at the web server level. Makes no sense.</p>
<p><code>/* -------------------------------------------------------------*/<br />
/* ----&gt;&gt;&gt; thickbox specific link and font settings &lt;&lt;&lt;---------*/<br />
/* -------------------------------------------------------------*/<br />
...<br />
/* -------------------------------------------------------------*/<br />
/* ----&gt;&gt; thickbox settings &lt;&lt;&lt;---------------------------------*/<br />
/* -------------------------------------------------------------*/<br />
...</code></p>
]]></content:encoded>
			<wfw:commentRss>http://sneakybastard.com/2009/07/weird-wordpress-problem-in-thickbox-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating WordPress</title>
		<link>http://sneakybastard.com/2009/07/updating-wordpress/</link>
		<comments>http://sneakybastard.com/2009/07/updating-wordpress/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 02:43:14 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sneakybastard.com/?p=244</guid>
		<description><![CDATA[
The release of WordPress 2.8.1 was announced this week. I thought it would be useful to other WordPress users, and provide a good history for myself, to document how I do the update. I first visit the WordPress Download page and copy the URL for the tarball; currently it&#8217;s a link to latest.tar.gz, but who [...]]]></description>
			<content:encoded><![CDATA[<p>
The release of <a href="http://wordpress.org/development/2009/07/wordpress-2-8-1/">WordPress 2.8.1</a> was announced this week. I thought it would be useful to other WordPress users, and provide a good history for myself, to document how I do the update. I first visit the <a href="http://wordpress.org/download/">WordPress Download</a> page and copy the URL for the tarball; currently it&#8217;s a link to <a href="http://wordpress.org/latest.tar.gz">latest.tar.gz</a>, but who knows if that will always redirect to the correct release. With the URL in the clipboard, I switch to my SSH terminal window. I change to my <kbd>~/src</kbd> directory and use <a href="http://www.gnu.org/software/wget/">wget</a> to download the file and extract the tarball right there. I then use <a href="http://www.samba.org/rsync/">rsync</a> to update the files from the new release to my production site. Here&#8217;s the process:
</p>
<p><code>cd ~/src<br />
wget http://wordpress.org/latest.tar.gz<br />
tar -zxf wordpress-*.tar.gz<br />
rsync -niruW wordpress/ ~/websites/sneakybastard.com/<br />
# looks reasonable, run it<br />
rsync -ruW wordpress/ ~/websites/sneakybastard.com/<br />
</code></p>
<p>
The <kbd>-n</kbd> options it to perform a dry-run. I like to see what it plans to do before committing. It&#8217;s not a bad idea to clean up the permissions on the <kbd>wp-content</kbd> directory too.
</p>
<p><code>cd ~/websites/sneakybastard.com<br />
sudo chown -R slappy wp-content<br />
sudo chgrp -R apache wp-content<br />
sudo find wp-content -type d -exec chmod 2775 {} \;<br />
sudo find wp-content -type f -exec chmod 0664 {} \;<br />
</code></p>
<p>
The permissions allow file uploads through PHP as the apache user, while the shell account user can make changes to theme and plugin files.</p>
]]></content:encoded>
			<wfw:commentRss>http://sneakybastard.com/2009/07/updating-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
