<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>SimpleBits Articles</title>
<link>http://www.simplebits.com/</link>
<description>Hand-crafted web sites, pixels and text by Dan Cederholm.</description>
<managingEditor>dan@simplebits.com</managingEditor>
<language>en-us</language>
<copyright>Copyright 1999-2007, SimpleBits</copyright>
<lastBuildDate>Thu, 08 May 2008 13:42:33 -0500</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.15</generator>
<webMaster>dan@simplebits.com</webMaster>







<item>
<title>Hack&amp;#8217;d</title>
<link>http://www.simplebits.com/notebook/2008/05/02/hacked.html</link>
<description><![CDATA[<p>I spent yesterday cleaning up some awful link spam that littered <a href="http://toupeepal.com">several</a> of the <a href="http://dowebsitesneedtolookexactlythesameineverybrowser.com/">domains</a> I own.  Some crafty fellow had stuffed hidden links to illegal <abbr><span class="caps">MP3</span></abbr> sites in the footer of as many index files as they could find. I thought it&#8217;d be a good idea to document it in case anyone else runs into the same dilemma.  Plus, hey, an excuse to write a multi-paragraph entry.  Go me.</p>

<p>I&#8217;m not exactly sure <em>how</em> the account was compromised, and I&#8217;d hate to point fingers without knowing.  Could&#8217;ve been either of the two popular blogging software applications that are installed.  Or it could&#8217;ve been a hack to the server in general.  After some digging and some Googling, it turned out <a href="http://literalbarrage.org/blog/archives/2007/10/02/haxx0red/">someone else had the exact same problem</a>.  A hidden directory was including a <abbr><span class="caps">PHP</span></abbr> file that was in turn including a <code>.txt</code> file filled with <abbr><span class="caps">SEO</span></abbr> spam and inserting it by <abbr>IP</abbr> address to most of my domains.  I quickly deleted these files, but the links were still there. </p>

<p>The baffling part was that when opening any of the compromised files, the links weren&#8217;t in the source.  Grepp&#8217;ing for the spam had it showing up in multiple files, but opening the file to edit showed nothing, leaving me to believe that the links were being dynamically inserted somehow. It took a helpful tech support agent to show me I&#8217;d fallen for one of the oldest tricks in the book: the huge block of spam links was just <em>indented</em> a ridiculous amount.  I hadn&#8217;t noticed the horizontal scrollbar at the bottom of the text editor, and sure enough scrolling over approximately 10,367 pixels to the right, there the spam was.</p>

<p>So after cleaning up 20 or so index files, changing passwords and updating software, all seems well again.  If you run into link spam, and the usual fixes don&#8217;t help, check your logs for suspicious <code>.txt</code> includes, and beware of the &#8220;massive indent&#8221;.</p>]]></description>
<guid isPermaLink="false">1402@http://www.simplebits.com/</guid>
<pubDate>Fri, 02 May 2008 09:43:22 -0500</pubDate>
</item>








</channel>
</rss>