The Day I was Hacked…

by Yan

For those of you who happened to visit my blog yesterday, I’m sorry to say that some mischievous hacker(s) had got the best of my WordPress database and wrecked this favorite blog of yours.

YES, I WAS HACKED….

I’m too tired to write anything now but I will update on my 15-hour journey through hell later in the day…..whatever it is,

PLEASE REMEMBER TO BACK UP YOUR BLOG NOW… it’s the best gift you owe it to yourself…

(to be continued…..)

What a way to celebrate the spectacular event of the 100th post of this blog with an article on how I recovered from “playing hide and seek” with the hacker(s). Well, as they say the worst happens when you least expect it and it did.

First of all, I’d like to express my gratitude to those who have supported me and left me an encouraging words comments of support, especially many thanks to Jay from SuiteJ.com, Aidi from IndoContest and Rajesh from TechBlissOnline who have helped and provided some possible solutions to me throughout the ordeal.

Getting hacked is pretty common nowadays and a quick search on Google that returns 31,600,000 results proves the point. I reckon WordPress is a victim of its own success or its vulnerability is probably still open to any mischievous hands of devils.

One of the regular readers here, Kouji had this to say….

It’s sad, the fact that a person with that much talent, directs it to something so unproductive, especially in light of the fact that the world has so many problems, and he could have instead been part of the solution.

Here’s another one from Rjani

….hackers don’t crack sites. Real hackers built the internet and they give away free programs to the community…..real hackers feel very uncomfortable when people mix them up with crackers

How Could It Happen…

To be frank, I wish someone in the know could shed some lights on the issue. I was clueless and I am still now. I remember 2 months ago, I wrote a post on 5 Essential WordPress Security Tips and I had taken all the necessary steps to protect my blog but alas, it wasn’t enough.

I woke up to discover that my blog was redirected to WordPress install mode

I'm hacked

Who the hell did this to me?

and a check later – through my cPanel – showed that all my data within the database were deleted. How the hell the hacker(s) got into it and if they did, why didn’t they erase everything? I mean they could have deleted all my databases but thanks God, they choose to delete one of them only.

The only unusual thing happening on my blog prior to the attack is the unusual number of user registration spams on my blog and I’m not too sure, I could be wrong though but it could probably be one of the cause of the problem.

There is little or nothing to prevent user registration spam and it was only recently that I’ve discovered a plugin called SABRE which claims to prevent the spammy registration. Did it help? Well, nothing is ever perfect. The event that followed suit proved otherwise. However, it’s still one of those plugins I’d not hesitate to recommend to you.

Backup Your Blog Now…

However, nothing was more comforting to know that I had a backup of my database to put everything – well, almost everything – back to its original state. I’m a big advocate of using WP DB Backup to back up all my vulnerable data.

In all honesty, it’s a God-sent tool that does the magic of backing up your database. Speaking out of my personal experience, I’d suggest you do a daily (not weekly) backup and have it sent to your email for safekeeping. That way you are not going to lose a few days of your posts should it happen at the end of the week. I couldn’t imagine the worst if I have not had done so.

My point is irregardless of how new your blog is, please remember to backup your blog NOW if you haven’t done so.

If it could happen to me, it could happen to you too

How Did I Restore My Blog…

So in the spirit of giving back to my readers, I’d like to share the steps I have taken to restore my blog back to its original state prior the attack (though I lost some of the comments, visitors tracking data, my advertisers’ banners, just to name a few) for the benefit of others who might in the future face the same predicament as mine.

In any case should you be in the similar situation, you need not go into a panic mode knowing well that you have a backup of your database. After all, the rest of the restoring process is just a matter of following the checklist below.

Credit goes to Jay who had patiently – in a sleep mode – run down a list of the necessary steps. Thanks, buddy…

20 Post-Hack Restore Checklist

  1. First thing first, check that you have the latest backup file usually in the format .sql.zip and download into your desktop.
  2. If you are yet using FireFTP – a nifty tool that will allow you upload files from within the browser itself – I’d suggest you install the addon on your Firefox.
  3. Connect to your host with your FTP details
  4. Once successfuly connected, go to your /www and download the whole /wp-content to your desktop. See the screenshot.
  5. Download WordPress install package as we going to initiate a fresh install.
  6. Select and upload the whole package file and override the old WordPress files. See the screenshot.
  7. Create a new database and here’s how you could create one.
  8. Download wp-config-sample.php and fill in the details of the database you have just created.
  9. Save it as wp-config.php and upload it where it was before.
  10. Now point your browser to www.yourdomain/wp-register.php and follow the instructions.
  11. You are now done with the first step and you should see your blog with its default theme.
  12. Next, login to your cPanel (www.yourdomain.com/cpanel)
  13. Under the “database” section, click on phpMyAdmin.
  14. You should be able to see your database on the left section of your phpMyAdmin.
  15. Click on your database _[name of your database]
  16. On the top navigation tab, click on the Import button
  17. Browse your backup file, see #1 and click Go
  18. Grab a coffee while awaiting the import of your database.
  19. Once done, you should have successfully restored your blog.
  20. Lastly, go to your plugins repository and activate some of the plugins that aren’t activated during the restore.

That’s all you are required to do. Gosh, this is worthy of a separate post if you ask me. I hope you are following me well here and in any case, if anything goes wrong, don’t go to WordPress support forum. It’s the worst place to search for answers. Leverage on your relationship with other bloggers instead.

Shoot me an email. I’ll do my best to help. The whole episode has made me a better blogger and fact is I have gained a couple of lessons I wouldn’t have otherwise learned. I call it “A Blessing in Disguise”.

Final Words

In all fairness, I wouldn’t rule out the possibility that it could also be due to some issues with my host. Probably my blog wasn’t hacked, there is a good chance that my database was deleted unintentionally on their routine maintenance or upgrading or whatever they call it. The possibilities are endless and no one will ever come forward to admit their mistakes – if any.

Whosoever mistake it may be, the lesson learned is that prevention is always better than cure. It’s absolutely important to automate the backup daily of your blog irregardless of what. It’s one of those things you can’t afford to procrastinate.

DO IT NOW and don’t take it for granted. I’ve came back from hell alive and for God’s sake, I’m entitled to force you to do it.

And to those who have successful hacked my blog, it’s one hell of a hack and thank you for the experience. It’s the best of the worst experience.

Related posts

{ 6 trackbacks }

What To Do When Your Wordpress Blog Gets Hacked | Brad Blogging
September 22, 2008 at 5:30 am
The Indispensible Wordpress Plugins I Use | Web Copywriting Tips To Increase Online Conversion Rate
September 28, 2008 at 3:21 pm
I’m Just Sharing » Blog Archive » Fear Of The Hack
October 1, 2008 at 1:15 pm
Link Love-Links Round Up No.7 | Work From Home Business Blog
October 5, 2008 at 2:48 pm
The Night My Blog Got Hacked | Work From Home Business Blog
October 16, 2008 at 12:15 am
101 Blogging Tips I’ve Learned in 2008
December 22, 2008 at 11:56 pm

{ 93 comments… read them below or add one }

Lida February 2, 2009 at 8:01 pm

thx man

Reply

Indo Contest March 11, 2009 at 10:28 pm

Hm… How could I miss this post?
BTW, Thanks for the love link, Buddy.

Best,
Aidi

Indo Contest´s lastest post..Win A MacBook Air From Ben Behrouzi

Reply

akhlis September 14, 2009 at 3:51 pm

Looks like the trauma has some positive impacts on you..^_^
Precautionary measures are better than the best cure, couldn’t agree more. Sadly, what you explain is WP not blogger. I’m using blogger and pretty much clueless about the backup stuff. I did import the blog and saved the xml file on my hard disk, is it enough? or not?Somebody tell me, please?
“Forewarned is forearmed”, I guess that’s the title that best suits your post.

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Post Install To-Do List – 10 Plugins You Ought To Install

Next post: 16 WordPress Premium Themes for $19.95?