<?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>Internet Business &#38; Marketing Strategy - Andy Beard &#187; WordPress Hacked</title>
	<atom:link href="http://andybeard.eu/tag/wordpress-hacked/feed" rel="self" type="application/rss+xml" />
	<link>http://andybeard.eu</link>
	<description>Internet Marketing, Lead Acquisition, Online Business Strategy and Social Media with Original Opinion and Loads of Attitude</description>
	<lastBuildDate>Sun, 12 Feb 2012 06:16:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WordPress Hacked? Total Security Lockdown</title>
		<link>http://andybeard.eu/2517/wordpress-hacked.html</link>
		<comments>http://andybeard.eu/2517/wordpress-hacked.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 10:34:11 +0000</pubDate>
		<dc:creator>Andy Beard</dc:creator>
				<category><![CDATA[blogging tips]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[301 redirect]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[http user agent]]></category>
		<category><![CDATA[WordPress Hacked]]></category>
		<category><![CDATA[WordPress Security]]></category>

		<guid isPermaLink="false">http://andybeard.eu/?p=2517</guid>
		<description><![CDATA[
<p>It is no huge secret that I have had this WordPress blog hacked twice this year but some consolation is that <a href="http://themeshaper.com/dont-get-hacked-wordpress-security-tips/">I am not alone</a>.</p>
<h2>Helpful resources</h2>
<p>Alex recently launched a DVD course on <a href="http://lockyourblog.com/">WordPress security</a> that is available for FREE + shipping<br />
Stop &#8211; I know what you are thinking &#8211; FREE + Shipping these days normally comes with lots of strings attached, forced continuity often hidden etc. Whilst Alex does cross-sell a few related products, the main offer is genuinely free.</p>
<p><a href="http://andybeard.eu/2517/wordpress-hacked.html" class="more-link">Read more on WordPress Hacked? Total Security Lockdown&#8230;</a></p>
<div class="topsy_widget_data topsy_theme_brick-red" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fandybeard.eu%252F2517%252Fwordpress-hacked.html%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22WordPress%20Hacked%3F%20Total%20Security%20Lockdown%22%20%7D);"></div>


	Tags: <a href="http://andybeard.eu/tag/301-redirect" title="301 redirect" rel="tag">301 redirect</a>, <a href="http://andybeard.eu/tag/htaccess" title="htaccess" rel="tag">htaccess</a>, <a href="http://andybeard.eu/tag/http-user-agent" title="http user agent" rel="tag">http user agent</a>, <a href="http://andybeard.eu/tag/wordpress" title="wordpress" rel="tag">wordpress</a>, <a href="http://andybeard.eu/tag/wordpress-hacked" title="WordPress Hacked" rel="tag">WordPress Hacked</a>, <a href="http://andybeard.eu/tag/wordpress-security" title="WordPress Security" rel="tag">WordPress Security</a><br />
]]></description>
			<content:encoded><![CDATA[
<p>It is no huge secret that I have had this WordPress blog hacked twice this year but some consolation is that <a href="http://themeshaper.com/dont-get-hacked-wordpress-security-tips/">I am not alone</a>.</p>
<h2>Helpful resources</h2>
<p>Alex recently launched a DVD course on <a href="http://lockyourblog.com/">WordPress security</a> that is available for FREE + shipping<br />
Stop &#8211; I know what you are thinking &#8211; FREE + Shipping these days normally comes with lots of strings attached, forced continuity often hidden etc. Whilst Alex does cross-sell a few related products, the main offer is genuinely free.</p>
<p>Michael VanDeMar has a useful plugin to <a href="http://www.bad-neighborhood.com/login-lockdown.html">lock down your login</a> process</p>
<p>SEO Egg Head offers a <a href="http://www.seoegghead.com/software/wordpress-firewall.seo">WordPress firewall</a></p>
<p>Donna has a useful script for <a href="http://www.webchicklet.com/tools/monitorhackdfiles-tool-helps-fight-site-hackers/">monitoring your files</a></p>
<p>Of course you should also keep backups which you have total control over &#8211; this includes both database and files and you shouldn&#8217;t rely on claims that your webhost has a backup. With a VPS I find being able to &#8220;roll back&#8221; to a previous version useful, but backup with shared hosting plans supposedly made by admins isn&#8217;t a solution when you need to fix things in minutes.</p>
<p>Keep WordPress up to date, plugins up to date etc</p>
<p>Part of security is controlling what bots can crawl and index on your site, so some pamphlets would be useful as well</p>
<p><a href="http://sebastians-pamphlets.com/getting-urls-out-of-google-the-good-popular-definitive-way/">Getting URLs outta Google &#8211; the good, the popular, and the definitive way</a><br />
<a href="http://sebastians-pamphlets.com/handling-googles-neat-x-robots-tag-sending-rep-header-tags-with-php/">Handling Google’s neat X-Robots-Tag &#8211; Sending REP header tags with PHP</a> </p>
<h2>Nasty Bots &#038; Users</h2>
<p>A lot of security relies on identifying nasty bots, detecting rogue activity such as failed logins or preventing access to all but approved users using an additional layer of password protection, or only allowing access to a server from a specific IP or range of IP addresses.</p>
<p>Also it is important to realise that different WordPress implementations require different levels of access control. With WordPress frequently being used for membership sites, you need to allow access to members. This reduces the number of security options available.</p>
<h2>SEO Benefits</h2>
<p>Lots of the pages you want to block from being crawled for security purposes also need to somehow be blocked or removed from indexation for SEO purposes, so tightening up security using the right methods will have natural SEO benefits.</p>
<p>Robots.txt isn&#8217;t the best option because you end up with lots of blocked pages appearing in search results and potentially indexed instead of pages you want in the index. As Sebastian explained, you have to let the bots in to crawl a URL before you can redirect them.<br />
Not all bots can be identified, and not all bots obey robots.txt, though you can trap the naughty ones. If you are serious about your bot control you might also consider <a href="http://searchbotbase.com/">Fantomasters Searchbot Database</a>.</p>
<h2>User Agent Access Control For Total Lockdown</h2>
<p>Lots of security and SEO methods rely on identifying various bots and kicking them somewhere else with 301 redirects, or denying them access to areas they are not wanted.</p>
<p>Far better would be to only allow access to one specific user agent, and globally kick out anything that doesn&#8217;t match &#8211; this is the user agent equivalent to restricting access to only a single IP address.</p>
<p>But how could this be achieved?</p>
<p>Many SEOs would already be familiar with <a href="https://addons.mozilla.org/en-US/firefox/addon/59">User Agent Switcher</a> for Firefox. This allows you to wander around the web pretending to be someone else, or something else such as Googlebot.</p>
<p>Unfortunately User Agent Switcher has a nasty problem &#8211; you often forget you have it switched to something different and then suddenly realise when a website starts misbehaving, refusing you entry, redirecting you to funny places etc.</p>
<p>If you created a custom user agent for security purposes, it wouldn&#8217;t be very secure  if there was a chance you could broadcast it to lots of other webmasters by mistake. It is bad enough that user agent is broadcast &#8220;in the clear&#8221; unless you use SSL connections.</p>
<p>Then I came across an article discussing how to <a href="http://mirzmaster.wordpress.com/2009/10/09/helpful-hints-apple-movie-trailers-download-using-firefox-greasemonkey-and-user-agent-hack/">fake your user agent specifically for itunes</a> but not other sites.</p>
<p>The <a href="https://addons.mozilla.org/en-US/firefox/addon/11327">Header Control</a> Firefox plugin allows you to set your User Agent specific to a domain.</p>
<p>This would allow you to set a specific unique or relatively obscure user agent, and for it to only be used when accessing your own websites.</p>
<p>Even more useful this can be set up in multiple locations, work with variable IPs etc.</p>
<h2>Experimental</h2>
<p>This is something I am still experimenting with &#8211; I haven&#8217;t decided whether it is best to use .htaccess, php or a combination of both, and I am convinced the best option is to 301 redirect everything rather than deny access.<br />
The best option might be to use a combination htaccess > php so you can do some enhanced logging.</p>
<p>The user agent doesn&#8217;t have to be unique, it could just be an obscure out of date version of Firefox or Chrome.</p>
<p>Example .htaccess to deny access</p>
<pre class="brush: plain; title: ; notranslate">
RewriteEngine on
#
RewriteCond %{HTTP_user_agent} !^RareUserAgent
RewriteRule .* - [F,L]
#
</pre>
<p>Example .htaccess to 301 redirect </p>
<pre class="brush: plain; title: ; notranslate">
RewriteEngine on
#
RewriteCond %{HTTP_user_agent} !^RareUserAgent
RewriteRule ^ http://WhereIWantPagerank.com/MyMoneyPage/ [R=301,L]
#
</pre>
<p>What I haven&#8217;t included are rewrite conditions based on specific paths as I haven&#8217;t worked out exactly what paths I need to block whilst using specific <a href="http://www.newmedias.co.uk/wordpress-membership/">WordPress Membership Plugins</a>.</p>
<p><strong>Warning 1 &#8211; always have backups</strong><br />
<strong>Warning 2 &#8211; you can majorly mess up access to your website with htaccess it you get it wrong and can&#8217;t restore a working version</strong></p>
<p>Disclaimer/License: <a href="http://www.gnu.org/copyleft/fdl.html">GNU FDL</a> &#8211; run with it, make it useful</p>
<div class="topsy_widget_data topsy_theme_brick-red" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fandybeard.eu%252F2517%252Fwordpress-hacked.html%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22WordPress%20Hacked%3F%20Total%20Security%20Lockdown%22%20%7D);"></div>


	Tags: <a href="http://andybeard.eu/tag/301-redirect" title="301 redirect" rel="tag">301 redirect</a>, <a href="http://andybeard.eu/tag/htaccess" title="htaccess" rel="tag">htaccess</a>, <a href="http://andybeard.eu/tag/http-user-agent" title="http user agent" rel="tag">http user agent</a>, <a href="http://andybeard.eu/tag/wordpress" title="wordpress" rel="tag">wordpress</a>, <a href="http://andybeard.eu/tag/wordpress-hacked" title="WordPress Hacked" rel="tag">WordPress Hacked</a>, <a href="http://andybeard.eu/tag/wordpress-security" title="WordPress Security" rel="tag">WordPress Security</a><br />
]]></content:encoded>
			<wfw:commentRss>http://andybeard.eu/2517/wordpress-hacked.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How Google &amp; StopBadware.org Handle Hacked WordPress</title>
		<link>http://andybeard.eu/2210/google-stopbadware.html</link>
		<comments>http://andybeard.eu/2210/google-stopbadware.html#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:25:44 +0000</pubDate>
		<dc:creator>Andy Beard</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[SEO Blog]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Google Webmaster]]></category>
		<category><![CDATA[reinclusion request]]></category>
		<category><![CDATA[Search Quality]]></category>
		<category><![CDATA[Stopbadware]]></category>
		<category><![CDATA[Website Hacked]]></category>
		<category><![CDATA[WordPress Hacked]]></category>

		<guid isPermaLink="false">http://andybeard.eu/?p=2210</guid>
		<description><![CDATA[This post hopefully can act as a bit of a counter-balance to all the stories of dread you will find if searching of how hard it is to fix a site after it has been hacked, and what it takes to get Google to reconsider your site after it has been happened.]]></description>
			<content:encoded><![CDATA[
<p>Yesterday I had the fun challenge of dealing with this blog being hacked. I live for challenges.</p>
<p>I was greeted with a nice message from Firefox in the morning</p>
<div id="attachment_2212" class="wp-caption aligncenter" style="width: 514px"><img src="http://cdn5.andybeard.name/wp-content/uploads/malware-detected.png" alt="Firefox&#039;s Warning That A Site Might Be Harmful" title="malware-detected" width="504" height="469" class="size-full wp-image-2212" /><p class="wp-caption-text">Firefox's Warning That A Site Might Be Harmful</p></div>
<p>If someone was searching Google and came across one of my results, there was a clear warning that my site was dangerous, and if they clicked through on a result they would be greeted with this.</p>
<div id="attachment_2211" class="wp-caption aligncenter" style="width: 510px"><img src="http://cdn5.andybeard.name/wp-content/uploads/warning-hacked.png" alt="Googles Hacked Warning From Search Results" title="warning-hacked" width="500" height="398" class="size-full wp-image-2211" /><p class="wp-caption-text">Googles Hacked Warning From Search Results</p></div>
<h2>What Affect Does This Have On Search Traffic</h2>
<p>What do you think? Kills it dead&#8230;</p>
<div id="attachment_2213" class="wp-caption aligncenter" style="width: 283px"><img src="http://cdn5.andybeard.name/wp-content/uploads/search-traffic-killed.png" alt="Search Traffic Killed By Security Warnings" title="search-traffic-killed" width="273" height="115" class="size-full wp-image-2213" /><p class="wp-caption-text">Search Traffic Killed By Security Warnings</p></div>
<p>Over 90% of Google search traffic was wiped out</p>
<h2>How Dare They Do That</h2>
<p>The first reaction by many people is probably shock, horror, outrage&#8230; I mean how dare they take away all that free traffic.</p>
<p>My first reaction was to upload a new index.php file that shut off the blog, gave a warning, and a 503 header (that I checked to make sure that it was being sent correctly)</p>
<p>I don&#8217;t want anyone to suffer from visiting my site due to injected iframes for suspicious sites injected into my pages.</p>
<p>I renamed my existing index.php</p>
<p>I then uploaded a new index.php with the following code</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
ob_start();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
header('X-Powered-By:');
?&gt;&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;&gt;
&lt;html&gt;&lt;head&gt;
&lt;title&gt;503 Service Temporarily Unavailable&lt;/title&gt;
&lt;/head&gt;&lt;body&gt;
&lt;h1&gt;Service Temporarily Unavailable&lt;/h1&gt;
&lt;p&gt;Cleaning up a hacked server, might be a while&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;
</pre>
<p>This wasn&#8217;t a total cure&#8230; there were a few extreme situations where this wouldn&#8217;t have been effective such as a few static files, but it was a very good fast measure, and the next step would probably have been to use htaccess to redirect all traffic to that page that was outside WordPress.</p>
<h2>Fixing Hacked WordPress Installation</h2>
<p>Lorelle has a great recent compilation of how to diagnose a <a href="http://lorelle.wordpress.com/2009/09/04/old-wordpress-versions-under-attack/">hacked WordPress blog</a>, and how to fix it.</p>
<p>I determined that what happened to my site wasn&#8217;t the new worm based attack, and that my database wasn&#8217;t affected.</p>
<p>Here is the procedure I used:-</p>
<ol>
<li>Backed up database &#8211; I already have backups sent daily to Gmail &#8211; I don&#8217;t store backups using WordPress plugins for S3 etc as these can actually introduce another attack vector.</li>
<li>Backed up server image &#8211; one of the advantages of using VPS Hosting is often the ability to create an immediate snapshot of the whole server.</li>
<li>Rolled back to previous server snapshot &#8211; I have daily, weekly and monthly snapshots of the whole server backed up, and the best option was the weekly one taken Sunday night.</li>
<li>Uploaded backed up database to server</li>
<li>Restored database using simple mysql command via terminal</li>
<li>Tons of passwords changed</li>
</ol>
<p>The WordPress export is a useful alternative to what I did, but just imagine using that cleanup method suggested by Lorelle if you were running a busy membership site using WordPress, or have lots of SEO and other special tweaks not supported by WordPress export.<br />
Ultimately solutions for cleaning a database would be a lot more appropriate. </p>
<h2>Google Reinclusion Request?</h2>
<p>The final step is a reinclusion request with Google which in theory might take 4 or 5 days for them to take a look at, but here is an interesting chain of events.</p>
<p>I filed a reinclusion request with Google possibly 8 hours after I discovered I had been hacked &#8211; I was a little busy with other offline events so fixing server took a little more time than I would otherwise expect.</p>
<p>Some feedback for the Google Webmaster team if they read this</p>
<ul>
<li>When you file a reinclusion request, currently a copy of what you send Google is not CCed back to you, even in the webmaster interface</li>
<li>The form for filing reinclusion requests has some very wierd scrolling/focusing events going on, so it is impossible to use when filing a long request with the detailed information asked.</li>
<li>6 hours after I filed my reinclusion request, I recieved notification in Webmaster Tools from the Google Search Quality Team that my website had been spotted by Google as compromised. That is at least 14 hours after it happened.</li>
</ul>
<blockquote><p>Malware notification regarding http://andybeard.eu/ September 16, 2009</p>
<p>Dear site owner or webmaster of http://andybeard.eu/,</p>
<p>We recently discovered that some of your pages can cause users to be infected with malicious software. We have begun showing a warning page to users who visit these pages by clicking a search result on Google.com.</p>
<p>Below are one or more example URLs on your site which can cause users to be infected:</p>
<p>http://andybeard.eu/</p>
<p>http://andybeard.eu/1297/</p>
<p>http://andybeard.eu/1298/</p>
<p>Here is a link to a sample warning page: http://www.google.com/interstitial?url=http://andybeard.eu/</p>
<p>We strongly encourage you to investigate this immediately to protect your visitors. Although some sites intentionally distribute malicious software, in many cases the webmaster is unaware because:</p>
<p>1) the site was compromised</p>
<p>2) the site doesn&#8217;t monitor for malicious user-contributed content</p>
<p>3) the site displays content from an ad network that has a malicious advertiser</p>
<p>If your site was compromised, it&#8217;s important to not only remove the malicious (and usually hidden) content from your pages, but to also identify and fix the vulnerability. We suggest contacting your hosting provider if you are unsure of how to proceed. StopBadware also has a resource page for securing compromised sites: http://www.stopbadware.org/home/security</p>
<p>Once you&#8217;ve secured your site, you can request that the warning be removed by visiting this Webmaster Help Center article and requesting a review. If your site is no longer harmful to users, we will remove the warning.</p>
<p>Sincerely,</p>
<p>Google Search Quality Team</p></blockquote>
<p>You would think if Google are notifying Stopbadware.org who in turn are notifying other sites such as I noticed Tweetmeme blocked my site very quickly, that somehow the notification to the webmaster would be listed in Webmaster tools at around the same time.<br />
I can understand 15mins difference, even an hour, but attentive webmasters are going to have their servers rectified before this notification is sent.</p>
<h2>You Might Not Need The Reinclusion Request Any More</h2>
<p>Better safe than sorry, but here is the normal series of events for a reinclusion request.</p>
<ol>
<li>You file it and get sent a message that you filed it (without the details of what you sent attached)</li>
<blockquote><p>Reconsideration request for http://andybeard.eu/ {Date}</p>
<p>We&#8217;ve received a request from a site owner to reconsider how we index the following site: http://andybeard.eu/</p>
<p>We&#8217;ll review the site. If we find that it&#8217;s no longer in violation of our Webmaster Guidelines, we&#8217;ll reconsider our indexing of the site. Please allow several weeks for the reconsideration request. We do review all requests, but unfortunately we can&#8217;t reply individually to each request.</p></blockquote>
<li>Some time passes</li>
<li>Google send you notification that they have looked at the request</li>
</ol>
<blockquote><p>We&#8217;ve processed your reconsideration request for http://andybeard.eu/ {date}</p>
<p>We received a request from a site owner to reconsider how we index the following site: http://andybeard.eu/.</p>
<p>We&#8217;ve now reviewed your site. When we review a site, we check to see if it&#8217;s in violation of our Webmaster Guidelines. If we don&#8217;t find any problems, we&#8217;ll reconsider our indexing of your site. If your site still doesn&#8217;t appear in our search results, check our Help Center for steps you can take.</p></blockquote>
<p>But I am still at the &#8220;some time passes&#8221; stage, which I honestly expected to last 4-5 days, and felt was quite reasonable &#8211; even Google don&#8217;t have unlimited resources.</p>
<ul>
<li>I filed my reinclusion request sometime around 9am PST (6pm CET) Wednesday</li>
<li>By 10am CET Thursday my site was no longer being blocked.</li>
</ul>
<p><strong>This is somehow now being automated.</strong></p>
<p>There wasn&#8217;t any exceptional crawl activity, but Google average crawling over 800 pages of my site every day anyway. A big enough cross-section to detect anything unusual.</p>
<p>Other than the feedback items I noted above, Google are doing a great job with handling hacked sites, at least based upon the experience I have just undergone.</p>
<p>Effectively 24hrs from seeing my site being blocked, fixing the hacked site, notifying Google, and finally having my site back without horrible security warnings everywhere is amazingly efficient.<br />
The data seems to have also been pushed out to those that use it extremely fast, as all my Tweetmeme buttons are already active again.</p>
<p>This post hopefully can act as a bit of a counter-balance to all the stories of dread you will find if searching of how hard it is to fix a site after it has been hacked, and what it takes to get Google to reconsider your site after it has happened.</p>
<p><strong>Bravo Google Webmaster and Search Quality team &#038; Stopbadware</strong></p>
<div class="topsy_widget_data topsy_theme_brick-red" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fandybeard.eu%252F2210%252Fgoogle-stopbadware.html%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22How%20Google%20%26%20StopBadware.org%20Handle%20Hacked%20WordPress%22%20%7D);"></div>


	Tags: <a href="http://andybeard.eu/tag/google-webmaster" title="Google Webmaster" rel="tag">Google Webmaster</a>, <a href="http://andybeard.eu/tag/reinclusion-request" title="reinclusion request" rel="tag">reinclusion request</a>, <a href="http://andybeard.eu/tag/search-quality" title="Search Quality" rel="tag">Search Quality</a>, <a href="http://andybeard.eu/tag/stopbadware" title="Stopbadware" rel="tag">Stopbadware</a>, <a href="http://andybeard.eu/tag/website-hacked" title="Website Hacked" rel="tag">Website Hacked</a>, <a href="http://andybeard.eu/tag/wordpress" title="wordpress" rel="tag">wordpress</a>, <a href="http://andybeard.eu/tag/wordpress-hacked" title="WordPress Hacked" rel="tag">WordPress Hacked</a><br />
]]></content:encoded>
			<wfw:commentRss>http://andybeard.eu/2210/google-stopbadware.html/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic
Database Caching 32/52 queries in 0.009 seconds using disk: basic
Object Caching 913/952 objects using disk: basic
Content Delivery Network via cdn5.andybeard.name

Served from: andybeard.eu @ 2012-02-13 06:56:14 -->
