Hacked: Lessons Learned and Relearned

Hacked!A couple of weeks ago while I was on vacation my WordPress site was hacked. It started first with a weird email from Wordfence trying to tell me something but it was so garbled I knew either it was in serious need of an update or something worse had happened. When I got to my site, I found something worse had happened. What was weird was I could only see the hack on one device. So when I contacted my hosting provider, they of course said it was my PC (I was on an iPad).  The reason for contacting them was early evidence seemed to point to something hacking into my site from the host. This would mean the host server was hacked. As I didn’t have my laptop with me with my usual tools to look at things securely (such as turning off all JavaScript and Flash in the browser so I could minimize the chances of compromising my laptop. My wife had her work laptop but I was not going to compromise it. So I just decided to leave my site down. This is not something a commercial site could do. Imagine the sales Amazon would lose if it were down for an hour. But my site isn’t an e-commerce site. Instead it is just a blog.

The early answers from my provider were I should scan my PC to make sure it isn’t affected. Agreed, always a good measure. I run antivirus that is pretty highly respected and a malware prevention program but as we all know, the vulnerabilities they don’t know about they can’t protect you from and even then they are not foolproof. I knew the hack was on the site and not my PC. I had logged in local and looked at the code and there it was “Hacked By Explo!T3r”.  Don’t do a Google Search for that as you will be surprised how many sites have been hacked by the same or similar group and are still hacked and un-repaired and may not even know, but Google knows. Okay, search but don’t visit their sites just in case. And the worse part about it was it was all tangled up the cache so I would have to make sure to wipe my cache once I cleared up the mess. I backed up my site as it was so that I could download it and do a file by file comparison with a previous backup to see what was changed or infected. Additionally I scanned it with both antivirus and malware scanners to see if there was something evidently evil about it. Nothing found.

A senior engineer at my hosting provider asked me when was my site working. I hadn’t logged in in over a week so I told him when I was last on the site. And they said they would restore a backup for me from that time period. Now, I wasn’t aware they were backing up things also. I know I have to run manual backups and I download them to a cloud provider so I have “off site” backups so to speak. I know I could automate this process and I have in the past but the free plugins that do backups have some limitations and being that my site isn’t for commercial gain, I have to keep things low to no budget. Plus that is in keeping with my open source spirit. So when I finally got back from vacation I looked and my site was really down now. Database Connection error. I guess their backup didn’t massage my database before backing up. So I knew what I had to do.

First I checked the modified date on all files on my site and decided I would wipe the site and roll in the last manual backup I ran. When did I run this backup? The end of June. I have violated my very own rule. Backup and backup often. Also backup before going forward. So I lost all of my July posts, which was a shame as they were really good and have brought a lot of traffic to my site.  Don’t worry my “Social Media for Small Business” series will return and soon have some additional entries.

So after restoring my site to the June backup and changing my passwords to the most complicated passwords I have ever used the site is back up and running. I looked through the code and the hack modified entries in my database so either they compromised MySQL for my site, did a SQL Injection hack, used an account with author privs that had a less than awesome password, or even an exploit of one of the recent vulnerabilities that were fixed by the latest update to WordPress 4.2.3

Here are some lessons learned:

1. Backup and backup often (I failed my own rules here).

2. Update often. (I didn’t have any pending updates of plugins or WordPress so I was technically as good as I could get).

3. Complex passwords. I use complex passwords but I had an account that did not. Wordfence offers a scanner that checks password complexity.

4. Compare backups. There is a lot to learn by comparing files from one backup to a newer one. What has changed since the last backup?

5. Verify your .htaccess files are set correctly.

6. This one will be controversial. Country blocking. Wordfence (paid version) has an option to block by country. I had turned this off because my site seemed slow and I was looking to see if my .htaccess file had become unruly with too many entries. However if you have a topic on your blog that might be controversial (my entries about my Faith), then you know you may offend someone. While I want my site open for everyone, there are some countries where the majority of hackers come from so blocking their countries (determined by IP address ranges and domain suffixes) will save you some headaches.

Look at my WordPress Security Essentials to see the things I do and should have done to protect my site. In this case, do as I suggest, not as I do.

My old Audiovox CDM 9000 and Trail Magic on the AT

I recently saw an article about our mobile phones from the past. It got me to thinking about the mobile phones I have had over the years.

When I graduated from the local Technical College, I decided to reward myself with a mobile phone. Work had me tethered via a pager, but if I ever needed to call into work I would either have to go home or go to a payphone (yes, payphones still sort of existed when I got my first mobile phone).

Here is a link to a PC Mag review

My first cell phone was an Audiovox CDM 9000. It was a candy bar phone. This was before smart phones existed. Steve Jobs had not even talked about the iPhone. Bluetooth wasn’t a thing yet either. So I had this phone, which worked great. It was both digital and analog. So where it could it make digital calls and where it couldn’t it made analog. The funny thing about this phone is that it could receive text messages but could not send them. I do not know why. I never figured out why. But it was such a good phone that I had a car kit installed into my car (a Chevy Impala at the time). My ImpalaIt was a nice car. I love the phone as it seemed to be the only phone among my friends that could actually make a call when we were hiking.

 

 

Warning: This next part is a little graphic, a littleClick To Tweet

In fact, when a group of friends and I hiked a part of the Appalachian Trail in Georgia we happened upon an elderly man at the top of Justus Mountain. This man motioned toward us as we reached the top as if something was wrong. So we went over to inquire. He told us he needed help, he was peeing blood, and that he needed water. So luckily we had just filled up so I offered him some of mine. I then called 911 from the top of the mountain. We had all pulled our phones out and mine was the only one that had gotten enough bars to make a call. So we called the 911 dispatcher and luckily, while we often didn’t on this hike, we actually knew where we were. So I told the dispatcher we were on Justus Mountain and that we had just crossed a forestry road that cross the AT. So Gary and I took the man’s pack and helped him descend down the mountain while the others waited with our stuff at the top of the mountain. This was in April of 2001. Luckily an ambulance was able to make it to our location and carry the man out on a stretcher. I gave the man my address as we were all curious to know what happened afterwards. Months passed and we heard nothing.

Two weeks after September 11 I received a package at the post office. I wasn’t expecting one and being so close to 9/11, I was concerned. But I decided, I am a nobody so why would I get a mysterious package. So I opened up the package and found four jars of homemade strawberry preserves and a letter. The man told me he had hiked a trail in Florida two weeks before his trip on the AT and with the drought that year, he had a hard time finding water and basically wound up drinking out of a mud puddle or two. He felt he must have caught some time of intestinal bug because of it and he spent a week in the hospital from that and dehydration. The preserves were a thank you gift for helping him. I gave the jars out to the others. Though they were scared to try them, again so close to 9/11. So I opened my jar and it was great. Everyone else hopefully tried theirs or else they missed out.

Gary And I On AT

 

Here is a picture from that trip. I am not sure what mountain this was on but it was the same trip.