Breaking! TailRank Exposes Massive Number Of Blogs Hacked

by Tony Hung on April 7, 2008

UPDATE 4.7.08: Looks like ZDnet was hacked as well (although they’ve since cleaned up)

So in some innocent conversation earlier today with Allen Stern, he noticed that Tailrank was getting hammered with spam, via Tailrank’s River — something Duncan Riley also noticed. To be honest, I’ve noticed it as well, noting snarkily that perhaps it wasn’t so much that Tailrank was getting hammered, as much as Tailrank’s algorithm was getting fooled, as it looks to grab content by skimming the content of feeds. That is, perhaps Tailrank was grabbing rotten spammy content.

Or … was it?

I had a closer look at many of the blogs concerned that had spammy content — pages promoting credit cards, pharmaceuticals and the like, and I realized that if you go to the root domain they are all legitimate blogs. Not scraper blogs that were being auto-generated with adsense / affiliate links, which was extremely curious, and actually reminiscient of something that hit home a few months ago.

A few months ago, this blog got hacked — but in a sneaky way. Not only did the hackers insert “invisible” code into my template, so that I was getting listed in Google for all manner of sneaky (and NSFW terms), so that people could click on those links with the hacker getting the affiliate cash — but *actually*, said hackers also inserted fake tempates into my wordpress theme.

I didn’t notice, because Dreamhost automatically installed a ton of themes, and so they were buried in there, but I only noticed when I started looking at my analytics and really odd pages started getting hits. Randomly.

I never got around to blogging about it before because it was all too strange, but with Tailrank, its clear that I’m not the only one that was buggered — its happening to a TON of blogs, and people don’t even know about it.

There seems to be two kinds of hackery going on, just like I’ve described:

1. Inserting “invisible” HTML full of links (for NSFW sites) into your WP template that isn’t obvious when you go to your blog, but is VERY obvious when you look at the source code (and start seeing that you’re getting traffic for some “peculiar” terms).

2. Inserting whole new source code / new sneaky themes that copy other blogs / content *exactly*, which is full of spammy content and affiliate links.

Why are there two? Why would you have any pages with nothing obvious to the reader?

Read on, because this is where it gets really nefarious.

First here are some examples.

  • http://www.helmethairblog.com: Blogs about motorbikes. Has a ton of invisible code inserted into the WP theme right in his header. Check out the source code or try this file (I saved it): helmethairblog-source Note how all of the adsense if for *credit cards* (and not on motorbicycles)
  • http://www.andysummers.com: A professional site for a guitarist named Andy Summers. Inside the press directory you can find at least six directories that contain pages for pharmacy, credit cards, and loans. Here is one of those pages.
  • http://blog.jimnovo.com: the marketing and productivity blog for Jim Novo, who has a book called Drilling Down. This is probably one of the sneakiest (yet to be verified personally from Mr. Novo however) — the blog is running on WordPress, however, it looks like someone has sneaked in some extra php code, under a separate file called news.php. Given a particular value for the variable “blog”, it serves up different pages. For example, serving up “credit”, serves up this page which is ranking very well for Mr. Novo (accidentally of course).

The devious thing? The entire site is ripped off from CreditHit.com, and its a little unclear if this is therefore something perpetrated *by* CreditHit (because links are tracked and go back to them), or an affiliate *of* CreditHit (which would be strange, as the site is an affiliate portal for credit cards).

At any rate, if the number of blogs on TailRank are any judge (through the Tailrank River –> tailrank.com/river), there are a HUGE number of blogs / sites that are hacked and don’t even know it.

http://www.internmentcamp.com –> silent HTML spam
http://www.vinokeeno.com/ –> silent HTML spam
http://www.alexharford.com/ –> silent HTML spam
http://www.gossiportruth.com –> silent HTML spam
http://amandabanana.net/ –> silent HTML spam
http://license2code.com–> silent HTML spam
http://selfportraitchallenge.net/–> silent HTML spam
http://www.firstcrackpodcast.com/–> silent HTML spam

So, let’s get back to the two kinds of spam. Why is there all of this content that is “invisible” (and even selected out to be invisible by some CSS?)

The *REAL* Devious thing, and the heart of the matter, is that the pages full of *silent* spam are tracking back to a few particular sites, such as the jimnovo.com site and the andysummers site. The reason why? One need only look at the TailRank.com/River site to know why, as Jimnovo.com’s blog is headlining almost every node.

The other blog that many of those blogs link to is Interaccess.org, which is a site for a not-for-profit organization that focuses on art and technology. Its blog is here, called Axon, Interaccess.org/blog. But of course, the money is in the pages that have been sneaked in, like this one: http://interaccess.org/blog/?drug=4/pill-377-tramadol.html

What does this really all mean?

It means that these silent pages are a blackhat SEO tactic to *promote* a few select blogs / sites that have been hacked with prominent affiliate / spam links and spam content, thereby bumping up their relative standing on Google.

That’s right.

Some enterprising hackers have put together a scheme whereby they hack a number of blogs, so that they can create their own network pages and links back to a few select blogs, to pages that are not easily visible. It takes advantage of the organic and real page rank of all of the sites in question, and probably makes some bucks for the hacker involved.

Why is this bad for *you*?

Other than the knowledge that someone is profiting off of your back, what can happen is that if you’re running Adsense, Google might notice all the hidden text and penalize you and pull you right out of the Index.

De-indexed. It happened to me, and the above, in retrospect, is the very reason for it.

So, at this moment you might be wondering — what can I do to protect myself? How can *you* tell if your blog has been hacked?

Here are three ways (pray it doesn’t get to the three).

1. You start getting traffic from google for terms you never write about (say, credit cards)

2. If you use Adsense, you start seeing ads on your blog for stuff that in no way matches your content (credit cards for example)

3. If you get banned from Adsense for promoting content in a sneaky way.

My suggestion is that if you find yourself in this position, comb through your templates carefully to find the hidden HTML and delete it.

THEN, go through your blog / site directory with FTP, turn ON the “look for hidden things” and start hunting for any potential directories that look suspicious — i.e. you didn’t put them there.

Bottom Line: This all happened to DJI a few months ago, both as a “host” site for the affiliate / spam content (I’ve since deleted the fake WP theme) and a site that hosted silent / invisible links, but I didn’t have the wherewithal to figure it out.

I’m not a security expert, so I can’t tell you if the security breach is through WordPress (perhaps an older version) or higher up — on a wholescale level through hosting providers.

But irrespective of where the leak is, I think this should be a bit of a wake up call to everyone. Look real carefully to see if your blog has been compromised — because you in fact, may be the stooge for someone else’s nefariously devious Blackhat tactics.

ADDENDUM: oh … and Tailrank should also get its act together and realize what kind of content they’re promoting. They exposed this large scale hackery, but did so unintentionally. :P

Update: Looks like JimNovo.com *was* hacked … he removed the offending piece of code, and so you won’t be able to see the changes. Interaccess.org was also fixed as well.

85 comments

[...] Hung, former editor here at The Blog Herald, believes that there is. He writes: Some enterprising hackers have put together a scheme whereby they hack a number of [...]

by Is there a deliberate effort to hack a large number of blogs for SEO? : The Blog Herald on April 7, 2008 at 1:04 am. #

[...] Hung of Deep Jive Interests has made some very interesting discoveries this Sunday [...]

by » Possible Massive Blog Hacking Scheme Unearthed? (Fiat Lux) on April 7, 2008 at 1:40 am. #

Thanks for this — it turns out I was hit by the invisible HTML link hack, giving me weird Google Adsense ads for bad credit and viagra. Ugh.

by Biggie @ Lunch in a Box on April 7, 2008 at 1:49 am. #

@Biggie — pleasure. Thought there were more than just a couple bloggers affected :)

by Tony Hung on April 7, 2008 at 2:12 am. #

[...] Your Blog, or Else… Deep Jive Interests: TailRank Exposes Massive Number Of Blogs Hacked — turns out all the latest spam sites are legitimate but hacked WordPress sites. I have also [...]

by Securing Your Blog, or Else… | SYP on April 7, 2008 at 2:15 am. #

Thanks for the interesting background material. I had one of my sites hit in this fashion a couple of weeks back and I’m still picking up the pieces!

by Mark Avey on April 7, 2008 at 3:14 am. #

Yep, this (the first option) is exactly what happened to me last year (october)

I blogged about it here (very much a ramble):
http://simonevanhattem.com/2007/12/techcrunched-and-hacked-october-2007/

I only noticed Google had deindexed me. Duncan was kind enough(and saw a good story obviously :D ) to use it as an example for a techcrunch post. But someone who commented checked my source code and saw the hidden code!
I hadn’t noticed any weird search terms, and don’t think my google ads were affected.
We found the links and removed, but they were back the next day. Then I upgraded wordpress and they haven’t come back. Anyway, post above has more ramble :D

by Simone on April 7, 2008 at 3:16 am. #

[...] Tony of DJI talks about an unexpected outcome from TailRank’s River, a blog monitoring service. A large number of blogs turned out to have been hacked to promote spammy content and affiliate links. [...]

by Massive Blog Hackery Exposed | YugaTech | Philippines, Technology News & Reviews on April 7, 2008 at 3:22 am. #

Thanks for the heads up

by Jesper on April 7, 2008 at 4:33 am. #

i am not going to start by suggesting you should be studying not fixing the internet :)

great post as always! on a weird note, wouldn’t the credit ads pay better on adsense than the crap tech type ads? :-P

by Allen Stern on April 7, 2008 at 7:52 am. #

[...] Breaking! TailRank Exposes Massive Number Of Blogs Hacked I had a closer look at many of the blogs concerned that had spammy content — pages promoting credit cards, pharmaceuticals and the like, and I realized that if you go to the root domain they are all legitimate blogs. … [...]

by Breaking! TailRank Exposes Massive Number Of Blogs Hacked at Credit Cards For Bad Credit On Credit Speak on April 7, 2008 at 10:29 am. #

[...] Tony Hung has completed an analysis of the spam on Tailrank and apparently it goes to hacked WordPress blogs. Have a look at Tony’s post for information about how the hackers are able to gain control over a blog without the author ever realizing it. Basically the hackers put hidden links into every page on your site using CSS to hide the links. [...]

by The Good Doctor Exposes Blog Hacking and Tailrank Spam  »TechAddress on April 7, 2008 at 11:34 am. #

My WP blog was hacked w invisible code added to footer. But I thought it was only bc I was a slacker and forgot to upgrade for over a year (was on 2.1.2). I’m in the process of upgrading now but it is complicated bc of my custom theme…

Btw I knew something was wrong bc from one day to the next, my google search word referrals dropped off a cliff. I posted about the problem in google webmaster groups and someone there pointed me to the TEXT version of my site cache in google and that was the only place to see the hacked spam outlinks. The links did NOT appear in the page HTML. So add that tip as another way to determine whether you’ve been hacked wo knowing… And wish me luck until my site gets reindexed…

by Dr. Vino on April 7, 2008 at 11:52 am. #

[...] recap: earlier, I documented how Tailrank’s “spam” was accidentally documenting some massive hacking efforts into blogs around the world.  What I didn’t realize was that one of the “victims” were one of the more more [...]

by Deep Jive Interests » UPDATE: Has ZDnet Been Hacked As Well? on April 7, 2008 at 12:21 pm. #

That’s a good set of steps to start with; however, you still need to address the root cause. If somebody was able to make changes on your blog or upload new templates (or whole new files), then you have an issue somewhere that the attacker exploited. If all you do is clean up the mess and you don’t find & correct that issue, you’ll have the same problem all over again sometime in the near future.

by Neil Carpenter on April 7, 2008 at 2:31 pm. #

@Neil — seeing as the common denominator is probably wordpress, I’m advocating upgrading to the most recent version. But I’m no security guy, so I can’t suggest anything more elaborate than that as a ‘fix’.

If there’s anything else you can suggest let me know! :D

(i am looking for guest bloggers)

t @ dji

by Tony Hung on April 7, 2008 at 2:40 pm. #

Hey.

Thanks for covering this. I’ve been TRYING to get more people to pay attention to this issue as this is happening with THOUSANDS of compromised blogs in the wild.

I don’t have the time to reach out to each and every blog in our 12 million blog index and contact them directly about being exploited.

This spammer is particularly nasty :-/

Anyway.. I’ll follow up more on my blog.

Also, this is hitting anyone out there that has a large corpus of blogs including Technorati, Google, etc.

If you’re on WordPress upgrade to 2.5 ASAP to fix this problem.

Onward!

Kevin

by Kevin Burton on April 7, 2008 at 2:48 pm. #

@Kevin — Thanks for stopping by. If that many blogs have been affected and its a WP issue, I wonder why its never been mentioned before in official WP channels? Or perhaps it has and I haven’t picked up on it?

Also — what is Tailrank doing to sift through this stuff? I’ve noticed that every now and again it crops up in bunches (and that’s putting it charitably)

Cheers
tony.

by Tony Hung on April 7, 2008 at 2:59 pm. #

Also, what’s the deal with the trackback post from:

http://creditcardsforbadcredit.creditspeak.com

Is this is a spam blog?

How ironic!

by Kevin Burton on April 7, 2008 at 3:02 pm. #

[...] issue is FINALLY getting the attention it deserves: I had a closer look at many of the blogs concerned that had spammy content — pages promoting [...]

by Massive Blog Spam Epidemic Gets More Attention « Kevin Burton’s NEW FeedBlog on April 7, 2008 at 3:16 pm. #

@Kevin — yeah, I’m slow in deleting the trackback spam, but then again … well, DJI’s isn’t really my day job either. :)

by Tony Hung on April 7, 2008 at 3:19 pm. #

Tony,

Thanks for bringing this to everyone’s attention, great job on this report. I checked my code and I appear to be ok, though my lack of Adsense removes some of my early warning.

I upgraded to 2.5 the day it came out so hopefully that will help keep me a little bit ahead of the bad guys in this front.

Now I just have to worry about the 1 million other things…

Thank you again for this!

by Jonathan Bailey on April 7, 2008 at 4:45 pm. #

[...] them is Deep Jive: “I was getting listed in Google for all manner of sneaky (and NSFW terms), so that people [...]

by Blog Hacks Coming Back to Roost? - GigaOM on April 7, 2008 at 6:22 pm. #

@Johnathan — good to see you, man! :D
– If you head over to the other article, John at CNet was mentioning how it was an XML-PRC vulnerability that got to him, and he wasn’t “really” running WP2.1.3 … makes you wonder how vulnerable 2.5 is. One can only cross one’s fingers I suppose and upgrade diligently. :P

by Tony Hung on April 7, 2008 at 10:08 pm. #

@DrVino — good luck, brother.

In my experience once you clean out your template, Google does index you eventually. Took me a few weeks, I think, unfortunately. :P

by Tony Hung on April 7, 2008 at 10:11 pm. #

[...] Earlier this week, we reported on a deliberate effort to hack a large number of blogs for SEO and cash – a story originally broken by Tony Hung over at Deep Jive Interests. [...]

by Technorati no longer indexing hacked or vulnerable Wordpress blogs : The Blog Herald on April 8, 2008 at 7:52 am. #

[...] you want to say. We appear to have been hit by spammers / black hat SEO types. It turns out that we are not alone. So let’s talk about what happened and why. First, though, if you use WordPress on your blog [...]

by Voice of VOIPSA » Blog Archive » This blog site was hacked - how it was done and why you need to upgrade WordPress NOW! on April 8, 2008 at 9:13 am. #

[...] read Tony’s first article: Breaking! TailRank Exposes Massive Number Of Blogs Hacked and UPDATE: Has ZDnet Been Hacked As [...]

by Your Blog Might Be Hacked » Webomatica - Technology and Entertainment Digest on April 8, 2008 at 10:45 am. #

[...] and exploited WordPress blogs. This comes after the recent spat of hacks that were discovered on various high profile blogs and websites. What was even more interesting was the fact that some of these hacks and exploitations might have [...]

by Weblog Tools Collection » Blog Archive » Vulnerable WordPress Blogs Not Being Indexed on April 8, 2008 at 11:05 am. #

[...] and exploited WordPress blogs. This comes after the recent spat of hacks that were discovered on various high profile blogs and websites. What was even more interesting was the fact that some of these hacks and exploitations might have [...]

by Vulnerable WordPress Blogs Not Being Indexed | BlogBroker24-7 on April 8, 2008 at 11:10 am. #

[...] WordPress Blogs Not Being Indexed > Massive Blog Hackery Exposed > TailRank Exposes Massive Number of Blogs Hacked) It seems like if you’re running WordPress, it’s advisable to upgrade to 2.5 (which was [...]

by 2718.us blog - covert blog hacks? on April 8, 2008 at 11:25 am. #

[...] TailRank Exposes Massive Number Of Blogs Hacked — Can cause them to be delisted from [...]

by tech news blog » Linkpost | 4.8.2008 on April 8, 2008 at 11:34 am. #

Coming right on the heels of this attack:

http://smackdown.blogsblogsblogs.com/2008/03/23/new-wordpress-233-exploitvulnerability-adds-spam-directory-wp-content1/

I wonder if the attackers aren’t getting in using the same method? The cure for that one appears to be upgrading your WP to 2.5 and changing your password… were you hacked before or after your upgrade, and did you change your password afterwards?

by Michael VanDeMar on April 8, 2008 at 11:42 am. #

This process has been going on for months. Just do a search for ‘WordPress Blog Hacked’ and you’ll see multiple instances. The solution since the hackers won’t be persuaded to mend their ways:
1. Be continually vigilant.
2. Make sure your security is as good as it can be, so that other websites are easier targets than yours.

by Barry Welford on April 8, 2008 at 11:58 am. #

By linking out to those spammy pages (wich probably be linkspammed by the hacker), you could lose your rankings on Google, because you are linking out to “bad neighborhoods”. A nofollow link should prevent this.

by Geld Lenen on April 8, 2008 at 1:07 pm. #

[...] Deep Jive Interests’ blog is one of the million blogs infected and hacked by such loosers. [...]

by Blog Hacking | The Rock | xTended on April 8, 2008 at 1:13 pm. #

[...] and exploited WordPress blogs. This comes after the recent spat of hacks that were discovered on various high profile blogs and websites. What was even more interesting was the fact that some of these hacks and exploitations might have [...]

by Wp Wordpress » Blog Archive » Vulnerable WordPress Blogs Not Being Indexed on April 8, 2008 at 1:33 pm. #

a third type of hackery…

one of my wordpress sites was hacked two weeks ago and the host couldnt tell me how they got it. they “think” it might have been a slightly older version of wordpress.

the hacker managed to install an email spamming program and send out a few messages before we got them out.

so be on the lookout for cgi scripts and files popping up on your system which can send out spam

by marc on April 8, 2008 at 2:26 pm. #

You do know who guitarist Andy Summers is, right?

db

by David Bradley on April 8, 2008 at 4:01 pm. #

@David — of Police fame, known for playing guitar on such hits as “Every Breath You Take”, right?

by Tony Hung on April 8, 2008 at 4:32 pm. #

[...] Deep Jive Interests wird beleuchtet, was für ein Plan hinter den Injections stecken [...]

by Webrocker » Wordpress Cracks - Fortsetzung on April 8, 2008 at 5:02 pm. #

[...] ejemplos de código insertado en las plantillas en [ Deep Jeeves: Breaking! TailRank Exposes Massive Number Of Blogs Hacked ] April 8, 2008 | In Blog, Seguridad [...]

by bsod » Wordpress 2.5 on April 8, 2008 at 5:03 pm. #

[...] Addendum: Big blog ZDnet was hacked as well, and the problem is pretty wide-spread among non-upgraded sites.  [...]

by Interactive Media Tips » Blog Archive » Upgrade Your Installations… now. on April 8, 2008 at 10:43 pm. #

I’m not convinced this is a problem in WordPress since my site was hacked and I didnt use WordPress. However, I am on shared hosting, so it’s possible that anotherr user on the site was compromised and that infection spread.

I found all kinds of odd traffic arriving from Google searches, ending up at pages that didnt seem to exist. When I browsed my published directory structure I found lots of small randomly named .php files each with a .htaccess file, and it looks like these were trying to serve a custom 404 type message for any hits in that directory.

I cleared eveything away and so far nothing has returned.

by Rob on April 9, 2008 at 10:10 am. #

For what it’s worth, we identified this problem in early March and have been trying to solve it ever since. We’ve been hit seven or eight times, the latest one being immediately after we upgraded to WordPress 2.5, which makes me less confident that an upgrade is the fix.

One thing to note is that when the spam hits, the “allow comments” box is simultaneously unchecked.

by Debbie Notkin on April 9, 2008 at 10:54 am. #

There are a handful of different hacks going on that I’ve seen thus far. First, for a client of mine who has thus far refused to upgrade from WP 2.1.3, there appears to be an injection vulnerability in the theme editor that allows hackers to edit files in your themes. This allows them to replace or add files in the theme, and they seem to love to add root kits (yes, there are PHP root kits out there).

After fighting this one for a week of more, I simply removed the theme editor (and plugin editor, just to be safe) altogether and the problem has gone away. Perhaps there is still a vulnerability, but the hackers have at least moved on to lower-hanging fruit for now. These hacks seemed to center on credit card and pill links, and were not terribly sophisticated in that the spam links showed up if you did a normal “View Source” on the site.

FYI, the theme editor is wp-admin/theme-editor.php and the plugin editor is wp-admin/plugin-editor.php. Obviously, removing these breaks your ability to edit themes or plugins, but you can always put them back on the rare occasion you do need to edit something.

The second, and more sophisticated, hack I’ve seen was on WP 2.3.X (don’t recall if it was 2.3.1 or 2.3.2). I never did figure out how they got their code in, but I suspect it was the XML-RPC vulnerability. In this one, they actually added code to the footer file in my theme that would add the spam links, but only for certain user-agents (i.e. Googlebot or Yahoo’s crawler).

View-source with a normal web browser wouldn’t show the links. I found it using view source on the Google cache (after seeing high page rankings for strange search terms in my Google Webmaster reports). Cleaning out the footer file and upgrading to 2.3.3 (and now 2.5) seems to have stopped this one. But it was quite embarrassing for a beer blog to have top ten rankings for search terms dealing with naked filipinos. :-(

Other tips to consider are adding a .htaccess to your uploads directory to remove the ability to run PHP code, turning off uploads altogether if you don’t use them, and locking down the permissions on your plugins and themes directories to prevent writing to the files (this breaks WP 2.5′s automatic plugin upgrades though).

Above all, though, the best advice is to upgrade to 2.5 now, and 2.5.1 when it comes out. Keep an eye on your dashboard and upgrade when they tell you to, especially if they call it a critical security patch. It’s a shame that people are out there doing these sorts of hacks, but it’s a fact of internet life and keeping your code current is one of the ways to mitigate the risk.

-Jason

by Jason Burks on April 9, 2008 at 11:30 am. #

[...] this post provided a good tip as to what has happened. Those infected blog pages point, in turn, to other [...]

by taint.org: Justin Mason’s Weblog » IIA’s nasty infection on April 9, 2008 at 3:25 pm. #

[...] etliche veraltete WordPress-Installationen der Version 2.3.2 oder älter gehackt wurden und für Spamzwecke zum Einsatz kommen, sah sich Technorati gezwungen, betroffene Blogs aus [...]

by BlogSchafftWissen - WissenSchaftsBlog » WordPress-Exploits verursachen Spam-Epidemie » Exploit, google, Spam, Technorati, WordPress on April 10, 2008 at 2:53 am. #

[...] a more detailed look at the issue you can read Deep Jive’s overview but basically here’s what [...]

by I never knew » Blog Archive » Hack Update on April 10, 2008 at 5:29 pm. #

[...] and exploited WordPress blogs. This comes after the recent spat of hacks that were discovered on various high profile blogs and websites. What was even more interesting was the fact that some of these hacks and exploitations might have [...]

by Ultimate Guide to the WordPress Loop on April 10, 2008 at 8:00 pm. #