Database Cleanup for Security

Several of my web sites use custom databases. Some of those web sites are gone (on purpose). But the databases were still there.

So I spent a bit of time deleting some unused databases and database users. It’s a security thing: there might be some personal information on some of the databases, and deleting unused data is a ‘good thing’.

Database security is important. Here are a few things to think about:

  • Do you have unused databases anywhere?
  • Is there public/personal information in the data tables?
  • Have you secured the user rights to those databases — not giving full access to a user out of convenience?
  • Do you have backup copies of the databases?
  • Are databases that contain personal information encrypted?

Any other considerations? Let me know in the comments.

FormSpammerTrap for Comments WordPress Plugin

My new WordPress plugin to block form spammers/bots is now publicly visible at https://wordpress.org/plugins/formspammertrap-for-comments/ . It blocks comment spam from ‘bots’ with a simple technique. It doesn’t have captchas, hidden fields, silly questions, or other things that don’t work. It just looks for ‘human activity’ on the comment form, and if a ‘bot’ tries to submit a comment, they immediately get sent to my FormSpammerTrap web site.

It uses the same techniques that I use for comment forms (more info about that here and here and here ), but now it is a WordPress plugin, so it is quite easy to install and configure. And it is quite effective…I’ve never gotten any ‘bot’ spam on any site that I have installed it.

The whole plugin coding process was interesting, and a good learning process. I’ve already got some enhancements in mind for newer versions. But I was quite proud of myself for getting this one to work…and that it is now available among the millions of other WordPress plugins.

Getting and Staying Safe

You’ll find lots of places that will advise you on safe computing. Here’s my quick advice.

  • Install all Windows updates
  • Install Microsoft Security Essentials – free antivirus program. If you already have an antivirus program on your computer, and it is current, go ahead and use that. If it has expired, just uninstall it, then install MSE from the Microsoft Protect site (www.microsoft.com/protect) . After installation, get any updates, then do a quick scan of your computer. Do a full scan later; they take a while. If MSE finds anything, delete it. (BTW, some good computer safety tips on that site.)
  • Install Personal Software Inspector from Secunia (www.secunia.com). It’s free. It will keep all of your other programs current. Do a scan, update everything.
  • Uninstall Java. Look for it in Control Panel, Add/Remove Programs. It is probably not needed on your computer. (Some business applications use it; if so, make sure it is updated.)
  • Change all of your online passwords. Don’t use the same password everywhere. Don’t use dictionary words. This is important, especially on financial sites.
  • If you access your financials on-line, don’t do it at a public place. Do it at home, where you have a password for your wireless Internet. (You do have your home wireless password-protected, right?)
  • Be careful about clicking on any links in emails or Facebook or other social sites. Be careful when any place asks you for your user name and password. Make sure it is legit.

So there’s some quick tips about getting and staying safe.

Oh, and one other thing. Your data is important. I use Carbonite to automatically back up all of my data without any effort on my part. Use this link: http://refer.carbonite.com/a/clk/1Tjw3f (Disclosure: I get a finder’s fee if you sign up, but there is no additional cost to you. I’ve been a Carbonite user for more than two years, and am very satisfied.)

Insecure FileZilla FTP Program

I manage several web sites, among them WordPress-based. And other sites I manage/own are PHP-based. So I often need to transfer files from my laptop to the hosting site. To do that, I use an FTP client program called FileZilla.

At least, I used to.

And the reason for ‘used to’ could be helpful to you.

One of the sites I manage has an intermittent problem with some injected malware. Usually, it is a small bit of code that uses an ‘iframe’ (sort of inserted content on a web page) to hide content that does search click-jacking. That’s when the code displays a search results page, then ‘clicks’ links on the page to earn search-click revenue. The actual search page is not displayed, but the ‘clicking’ happens.

So that injected code gets displayed on every WordPress page on the site. Which means that somehow the WordPress code on the site host is being modified by malware.

It’s not clear how the code gets modified, but one way is by a compromised FTP account. The hacker somehow gets the FTP login and password for a site, then looks at that site for PHP files that can be modified with an insertion of the malware code.

And the only way to figure out that the site has been compromised is to take a look at the page code, which can be quite complex. Or you can look at file dates on the host, but that can take quite a while.

Now, I keep my computer systems current with patches. I do Window patches as soon as they are released. I have Secunia’s PSI program which automatically patches my non-MS programs. I’ve got a good anti-virus program.  And I use strong passwords everywhere.

But even these good security practices can be bypassed with a ‘zero-day’ attack. And that’s what I think happened. Some malware got into my system somehow. And this particular bit of malware tries to compromise my FTP program.

And it turns out that FileZilla, the FTP client on my computer, stores FTP user names and passwords in a clear-text file in an easily accessed location.

What. The. ???!!!

Why would they do that?

Yes, the program is open-source, so someone can easily figure out where the FTP user/passwords are stored. But there is no reason not to encrypt the file that contains the passwords.

No reason at all.

It is a major vulnerability. One that the FileZilla developers continue to ignore.

And FileZilla is very popular. Millions of downloads.

Each and every one is vulnerable to malware attack that will get your FTP user credentials.

What. The. ???!!!!

And that’s why FileZilla has been removed from my computer. And banned from any computer I own or manage.

But I still need an FTP client. Yeah, I could do it all manually, but a FTP GUI is just convenient. So I need an alternative.

And that alternative is WinSCP (available here http://winscp.net/eng/index.php ).

It’s pretty easy to use. Has a nice GUI. Allows for multiple FTP site settings. Will save the FTP user credentials. Is open-source, and free (donations accepted).

And has an option to have a ‘master password’, that, if enabled, will encrypt the file that stores your FTP user credentials.

So far, it is working fine, and appears to be a good and secure FTP client.

Which is why WinSCP is on my computer.

And FileZilla isn’t.

I recommend the same conclusion for your computers.

 

(Added 25 May 2012) Note that if you do uninstall FileZilla, the password file is not removed (even after a restart). You will need to remove it manually.

Careful

Windows Update time. Do it.

Then install Secunia’s Personal Software Inspector. Run it. Update as needed.

And you Mac guys. You are not safe from viruses any more. Deal with it.

Saving Your Data

An important part of information security is making your data available, and keeping that data available. Loss of data can be a minor inconvenience, or it can kill your business. And it is not just businesses that need to worry about data loss.

Think of your personal data. All of those pictures on your camera, your phone, your laptop, or your computer. Or even the non-electronic data like printed pictures, slides, important papers, journals — the list is almost endless. Protecting that data from different kinds of loss is important to a business, and to individuals.

And there are lots of ways to back up that data, no matter what it is. On a personal level, you can copy files to CD/DVDs, or to an external hard drive (USB thumb drive, external hard disk). Those are valid solutions. But only if you remember to do them. And then there is the storage issue. Where do you keep these backup copies? Keeping them in the same physical location protects the data — until there is a flood, or a fire, or tornado, or a theft, or … well, the possibilities for data loss have not been fully mitigated.

One of the solutions I have used for a couple of years is an on-line backup service. The service I use is from Carbonite (www.carbonite.com), and costs $59/year for unlimited, automatic on-line backup. Tree important words in that statement. Unlimited backup takes care of all of my files at the same basic cost. Automatic means that I don’t have to worry about doing it. And the third important part is “on-line” — the data is stored off-site in ‘the cloud’.

With Carbonite, everything is automatic. I install the software on one computer at home (they have a multiple-computer plan also). I designate the folders to back up. The Carbonite software automatically copies my files to their servers, over my Interwebs connection, and does it with a minimal impact on my other on-line activities. If I make a change to a file, that changed file is added to the backup list.

And it is all done automatically. It meets the requirements for keeping my backups current; the files are available if I need them; and I don’t have to remember to do anything.

But what about the multiple computers around your house? You may have a couple of laptops or  desktops at your house. How do you keep all of your computers backed up?

With Carbonite,  you have to pay for one yearly subscription ($59) for every computer you back up. If you have multiple computers at home, that can start getting expensive. A bit of adjustment on your end will fix that.

In my case, the desktop computer downstairs is Carbonited. That computer, plus our two laptops, are all networked together. So a process of copying data from laptops to desktop gets our laptop files as part of the Carbonite backup. That’s done with the free Microsoft SyncToy, which syncs the files from laptop to desktop.  It’s pretty fast (much faster than a straight copy command), since it only works on files that have changed.

So my important personal data is backed up with Carbonite. There are other services that perform similar functions; some have better pricing for multiple computers. But my data is safe from a local (home) disaster, and it is mostly hands-free.

Poor Kenneth

Got this in my email today:

Hi,

Just writing to let you know our trip to Madrid, Spain has been a mess. We were having a great time until last night when we got mugged and lost all my cash,credit card cellphone It has been a scary experience, I was hit at the back of my neck with a club. Anyway, I’m still alive and that’s whats important. I’m financially strapped right now and need your help. I need you to loan me some $$, I’ll refund it to you as soon as i arrive home.Write me back so i can tell you how to get it to me.

Regards, Kenneth

This is quite sad. Poor Kenneth. Stuck in a foreign country, no cash, no credit cards, so he can’t get home. I should send him some money to help out.

Except I don’t know a Kenneth. Even if I did (and this scam sometimes is from a name you recognize), not a good practice to send money to someone without verification. Unless you don’t care if you ever see that money again.

These types of messages might come to you from you “cousin” or “granddaughter”, and might include information that seems valid. But it is a scam.

Be careful out there!